Initial commit
Test and release / Run Tests (push) Successful in 2m58s
Test and release / Build and Release (push) Successful in 4m36s

This commit is contained in:
Shy
2026-04-19 17:16:29 +02:00
commit 7e354c2e04
8 changed files with 358 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
use std::{error::Error, process::Command};
use shy_launcher::{config::Config, downloader};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn Error>> {
println!("Starting app launcher...");
let config = Config::load("config.json")?;
println!("Starting download...");
downloader::download(config.downloads()).await;
println!("Freeing memory...");
if unsafe { libc::malloc_trim(0) } == 1 {
println!("Freed up some memory.");
}
println!("Launching app...");
println!();
println!("--------------------------");
println!();
let mut child = Command::new(config.run())
.args(config.args())
.spawn()?;
let exit = child.wait()?;
println!();
println!("--------------------------");
println!();
println!("Child exited: {exit}");
Ok(())
}