2 Commits

Author SHA1 Message Date
f4fe1c6699 v0.5.1 2023-09-18 12:27:01 +02:00
59f1b09337 set current_dir when launching 2023-09-18 12:26:47 +02:00
3 changed files with 3 additions and 2 deletions

2
Cargo.lock generated
View File

@ -30,7 +30,7 @@ dependencies = [
[[package]] [[package]]
name = "alterware-launcher" name = "alterware-launcher"
version = "0.5.0" version = "0.5.1"
dependencies = [ dependencies = [
"colored", "colored",
"http_req", "http_req",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "alterware-launcher" name = "alterware-launcher"
version = "0.5.0" version = "0.5.1"
edition = "2021" edition = "2021"
build = "res/build.rs" build = "res/build.rs"

View File

@ -267,6 +267,7 @@ fn launch(file_path: &PathBuf, args: &str) {
println!("Launching {} {}", file_path.display(), args); println!("Launching {} {}", file_path.display(), args);
std::process::Command::new(file_path) std::process::Command::new(file_path)
.args(args.trim().split(' ')) .args(args.trim().split(' '))
.current_dir(file_path.parent().unwrap())
.spawn() .spawn()
.expect("Failed to launch the game") .expect("Failed to launch the game")
.wait() .wait()