2 Commits

Author SHA1 Message Date
alterware
6f241dffe2 v0.11.2 2025-06-13 08:35:26 +02:00
Spencer
806758088d maint: use UMU if found (#11) 2025-06-13 08:30:55 +02:00
3 changed files with 15 additions and 6 deletions

2
Cargo.lock generated
View File

@@ -19,7 +19,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "alterware-launcher"
version = "0.11.1"
version = "0.11.2"
dependencies = [
"blake3",
"colored",

View File

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

View File

@@ -549,9 +549,18 @@ fn launch(file_path: &PathBuf, args: &str) {
fn launch(file_path: &PathBuf, args: &str) {
println!("\n\nJoin the AlterWare Discord server:\nhttps://discord.gg/2ETE8engZM\n\n");
crate::println_info!("Launching {} {args}", file_path.display());
let exit_status = if misc::is_program_in_path("wine") {
println!("Found wine, launching game using wine.\nIf you run into issues or want to launch a different way, run {} manually.", file_path.display());
std::process::Command::new("wine")
let launcher = if misc::is_program_in_path("umu-run") {
Some("umu-run")
} else if misc::is_program_in_path("wine") {
Some("wine")
} else {
None
};
let exit_status = if let Some(launcher) = launcher {
println!("Found {launcher}, launching game using {launcher}.\nIf you run into issues or want to launch a different way, run {} manually.", file_path.display());
std::process::Command::new(launcher)
.args([file_path.to_str().unwrap(), args.trim()])
.current_dir(file_path.parent().unwrap())
.spawn()
@@ -627,7 +636,7 @@ fn show_iw4x_info() {
"{}",
"IW4x is not provided through AlterWare anymore.".bright_red()
);
println!("Please use iw4x-launcher.exe instead or visit www.iw4x.dev/install");
println!("Please visit https://aka.alterware.dev/iw4x for more information");
misc::stdin();
std::process::exit(0);
}