Conversation
|
Keeping as draft cause I wanna make separate PR for restructuring the vuex commit payload |
| let mut args = vec!["/C", "start", "", &ns_exe_path]; | ||
| // We cannot add the params directly because of limitations with cmd.exe | ||
| // https://stackoverflow.com/questions/9964865/c-system-not-working-when-there-are-spaces-in-two-different-parameters/9965141#9965141 | ||
|
|
||
| let launch_parameters = launch_parameters.unwrap_or_default(); | ||
| let ns_params: Vec<&str> = launch_parameters.split_whitespace().collect(); | ||
| dbg!(ns_params.clone()); | ||
| args.extend(ns_params); | ||
| let _output = std::process::Command::new("C:\\Windows\\System32\\cmd.exe") | ||
| .args(["/C", "start", "", &ns_exe_path]) | ||
| .args(args) |
There was a problem hiding this comment.
cc @Jan200101 cause this will 100% merge conflict with #444 so we should probably figure out how to best merge it ^^"
I.e. turn profile command into launch arg and then pass it or keep profile arg in GameInstall struct and then combine inside the Rust code.
(second one probably makes more sense)
There was a problem hiding this comment.
A lot of APIs rely on having profile information available, that would require adapting, which is why I made the profile part of GameInstall.
There was a problem hiding this comment.
Yeah, profile should stay in GameInstall so second option it is then ^^
|
|
||
| let mut args = vec!["/C", "start", "", &ns_exe_path]; | ||
| let ns_profile_arg = format!("-profile={}", game_install.profile); | ||
| // We cannot add the params directly because of limitations with cmd.exe |
There was a problem hiding this comment.
did you try powershell? or is it the same thing for powershell?
Uh oh!
There was an error while loading. Please reload this page.