You've already forked AstralRinth
forked from didirus/AstralRinth
Jre api (#66)
* basic push * actual push * JRE detection, and autosetting * removed a println, retrying CI/CD * new game version compare; preset java 7 and 8 using our jre * 1.8 mislabeled * working JRE changes * fixed bugs with JRE setup * fixed bugs with JRE setup * manual merge * prettier * fixes + jre 17 * clippy, prettier * typo * forgot to hook up a function * pr fix + comment fix * added loader_version * take 2
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
)]
|
||||
|
||||
use dunce::canonicalize;
|
||||
use std::path::Path;
|
||||
use theseus::prelude::*;
|
||||
use tokio::time::{sleep, Duration};
|
||||
|
||||
@@ -32,7 +31,7 @@ async fn main() -> theseus::Result<()> {
|
||||
|
||||
// Initialize state
|
||||
let st = State::get().await?;
|
||||
st.settings.write().await.max_concurrent_downloads = 100;
|
||||
st.settings.write().await.max_concurrent_downloads = 1;
|
||||
|
||||
// Clear profiles
|
||||
println!("Clearing profiles.");
|
||||
@@ -52,13 +51,14 @@ async fn main() -> theseus::Result<()> {
|
||||
|
||||
// async closure for testing any desired edits
|
||||
// (ie: changing the java runtime of an added profile)
|
||||
println!("Editing.");
|
||||
profile::edit(&profile_path, |profile| {
|
||||
// Eg: Java. TODO: hook up to jre.rs class to pick optimal java
|
||||
profile.java = Some(JavaSettings {
|
||||
install: Some(Path::new("/usr/bin/java").to_path_buf()),
|
||||
extra_arguments: None,
|
||||
});
|
||||
// println!("Editing.");
|
||||
profile::edit(&profile_path, |_profile| {
|
||||
// Eg: Java- this would let you change the java runtime of the profile instead of using the default
|
||||
// use theseus::prelude::jre::JAVA__KEY;
|
||||
// profile.java = Some(JavaSettings {
|
||||
// jre_key: Some(JAVA_17_KEY.to_string()),
|
||||
// extra_arguments: None,
|
||||
// });
|
||||
async { Ok(()) }
|
||||
})
|
||||
.await?;
|
||||
@@ -107,8 +107,8 @@ async fn main() -> theseus::Result<()> {
|
||||
println!("Minecraft PID: {}", pid);
|
||||
|
||||
// Wait 5 seconds
|
||||
println!("Waiting 10 seconds to gather logs...");
|
||||
sleep(Duration::from_secs(10)).await;
|
||||
println!("Waiting 20 seconds to gather logs...");
|
||||
sleep(Duration::from_secs(20)).await;
|
||||
let stdout = process::get_stdout_by_pid(pid).await?;
|
||||
println!("Logs after 5sec <<< {stdout} >>> end stdout");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user