mirror of
https://github.com/open-goal/launcher.git
synced 2024-10-19 14:47:36 -04:00
backend: fix semver checking logic for jak 2 (#370)
This commit is contained in:
parent
407b0fc07f
commit
9810f94013
|
@ -298,7 +298,7 @@ pub async fn extract_and_validate_iso(
|
|||
args.push("--folder".to_string());
|
||||
}
|
||||
// Add new --game argument
|
||||
if config_info.tooling_version.minor >= 1 && config_info.tooling_version.patch >= 44 {
|
||||
if config_info.tooling_version.minor > 1 || config_info.tooling_version.patch >= 44 {
|
||||
args.push("--game".to_string());
|
||||
args.push(game_name.clone());
|
||||
}
|
||||
|
@ -306,6 +306,8 @@ pub async fn extract_and_validate_iso(
|
|||
// This is the first install step, reset the file
|
||||
let log_file = create_log_file(&app_handle, "extractor.log", false)?;
|
||||
|
||||
log::info!("Running extractor with args: {:?}", args);
|
||||
|
||||
let mut command = Command::new(exec_info.executable_path);
|
||||
command
|
||||
.args(args)
|
||||
|
@ -397,11 +399,13 @@ pub async fn run_decompiler(
|
|||
data_folder.to_string_lossy().into_owned(),
|
||||
];
|
||||
// Add new --game argument
|
||||
if config_info.tooling_version.minor >= 1 && config_info.tooling_version.patch >= 44 {
|
||||
if config_info.tooling_version.minor > 1 || config_info.tooling_version.patch >= 44 {
|
||||
args.push("--game".to_string());
|
||||
args.push(game_name.clone());
|
||||
}
|
||||
|
||||
log::info!("Running extractor with args: {:?}", args);
|
||||
|
||||
command
|
||||
.args(args)
|
||||
.stdout(log_file.try_clone()?)
|
||||
|
@ -489,10 +493,13 @@ pub async fn run_compiler(
|
|||
data_folder.to_string_lossy().into_owned(),
|
||||
];
|
||||
// Add new --game argument
|
||||
if config_info.tooling_version.minor >= 1 && config_info.tooling_version.patch >= 44 {
|
||||
if config_info.tooling_version.minor > 1 || config_info.tooling_version.patch >= 44 {
|
||||
args.push("--game".to_string());
|
||||
args.push(game_name.clone());
|
||||
}
|
||||
|
||||
log::info!("Running compiler with args: {:?}", args);
|
||||
|
||||
let mut command = Command::new(exec_info.executable_path);
|
||||
command
|
||||
.args(args)
|
||||
|
@ -680,7 +687,7 @@ fn generate_launch_game_string(
|
|||
data_folder.to_string_lossy().into_owned(),
|
||||
];
|
||||
// Add new --game argument
|
||||
if config_info.tooling_version.minor >= 1 && config_info.tooling_version.patch >= 44 {
|
||||
if config_info.tooling_version.minor > 1 || config_info.tooling_version.patch >= 44 {
|
||||
args.push("--game".to_string());
|
||||
args.push(game_name.clone());
|
||||
}
|
||||
|
|
|
@ -410,7 +410,7 @@ pub async fn does_active_tooling_version_support_game(
|
|||
.unwrap_or(Version::new(0, 0, 1));
|
||||
match game_name.as_str() {
|
||||
"jak1" => Ok(true),
|
||||
"jak2" => Ok(tooling_version.minor >= 1 && tooling_version.patch >= 44),
|
||||
"jak2" => Ok(tooling_version.minor > 1 || tooling_version.patch >= 44),
|
||||
_ => Ok(false),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue