From ad739c45c89d3ac53654861df1bf0e0b4f706d4f Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Tue, 7 Nov 2023 19:05:36 -0800 Subject: [PATCH 1/3] pass --game to goalc haven't tested yet --- src-tauri/src/commands/binaries.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-tauri/src/commands/binaries.rs b/src-tauri/src/commands/binaries.rs index 153dd7a3..4942f19e 100644 --- a/src-tauri/src/commands/binaries.rs +++ b/src-tauri/src/commands/binaries.rs @@ -570,6 +570,8 @@ pub async fn open_repl( &bin_ext("goalc"), "--proj-path", &data_folder.to_string_lossy(), + "--game", + game_name, ]) .current_dir(exec_info.executable_dir); #[cfg(windows)] From 8fd9289b6a316334433f9d2281797aa9fe3b79b4 Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Tue, 7 Nov 2023 19:21:50 -0800 Subject: [PATCH 2/3] Update binaries.rs --- src-tauri/src/commands/binaries.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/commands/binaries.rs b/src-tauri/src/commands/binaries.rs index 4942f19e..8dfe0a32 100644 --- a/src-tauri/src/commands/binaries.rs +++ b/src-tauri/src/commands/binaries.rs @@ -571,7 +571,7 @@ pub async fn open_repl( "--proj-path", &data_folder.to_string_lossy(), "--game", - game_name, + &game_name, ]) .current_dir(exec_info.executable_dir); #[cfg(windows)] From 6f3c8dba591924c6048a4933ff37969045cc5849 Mon Sep 17 00:00:00 2001 From: dallmeyer <2515356+dallmeyer@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:17:11 -0800 Subject: [PATCH 3/3] conditional --game flag --- src-tauri/src/commands/binaries.rs | 34 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src-tauri/src/commands/binaries.rs b/src-tauri/src/commands/binaries.rs index 8dfe0a32..c5a2e0c0 100644 --- a/src-tauri/src/commands/binaries.rs +++ b/src-tauri/src/commands/binaries.rs @@ -563,17 +563,29 @@ pub async fn open_repl( let data_folder = get_data_dir(&config_info, &game_name, false)?; let exec_info = get_exec_location(&config_info, "goalc")?; let mut command = Command::new("cmd"); - command - .args([ - "/K", - "start", - &bin_ext("goalc"), - "--proj-path", - &data_folder.to_string_lossy(), - "--game", - &game_name, - ]) - .current_dir(exec_info.executable_dir); + if game_name == "jak1" { + command + .args([ + "/K", + "start", + &bin_ext("goalc"), + "--proj-path", + &data_folder.to_string_lossy(), + ]) + .current_dir(exec_info.executable_dir); + } else { + command + .args([ + "/K", + "start", + &bin_ext("goalc"), + "--proj-path", + &data_folder.to_string_lossy(), + "--game", + &game_name, + ]) + .current_dir(exec_info.executable_dir); + } #[cfg(windows)] { command.creation_flags(0x08000000);