Should fix linux/macos BIE support?
This commit is contained in:
1 file changed
+18
-3
+18
-3
@@ -558,7 +558,12 @@ fn launch_game(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if platform() == "macos" {
|
let bepinex_folder = match app.path().app_local_data_dir() {
|
||||||
|
Ok(p) => p.join("game").join(&name).join("BepInEx"),
|
||||||
|
Err(_) => return,
|
||||||
|
};
|
||||||
|
|
||||||
|
if platform() == "macos" && !bepinex_folder.exists() {
|
||||||
if let Err(_) = Command::new("open")
|
if let Err(_) = Command::new("open")
|
||||||
.arg(&executable)
|
.arg(&executable)
|
||||||
.current_dir(&game_folder)
|
.current_dir(&game_folder)
|
||||||
@@ -567,8 +572,18 @@ fn launch_game(
|
|||||||
eprintln!("Failed to launch game on macOS");
|
eprintln!("Failed to launch game on macOS");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if let Err(_) = Command::new(&exe_path).current_dir(&game_folder).spawn() {
|
if (platform() == "macos" || platform() == "linux") && bepinex_folder.exists() {
|
||||||
eprintln!("Failed to launch game");
|
if let Err(_) = Command::new("./run_bepinex.sh")
|
||||||
|
.arg(&executable)
|
||||||
|
.current_dir(&game_folder)
|
||||||
|
.spawn()
|
||||||
|
{
|
||||||
|
eprintln!("Failed to launch game");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let Err(_) = Command::new(&exe_path).current_dir(&game_folder).spawn() {
|
||||||
|
eprintln!("Failed to launch game");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user