-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Primitive dev-only launch params #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you try powershell? or is it the same thing for powershell?
Uh oh!
There was an error while loading. Please reload this page.