-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Primitive dev-only launch params #449
base: main
Are you sure you want to change the base?
Conversation
GeckoEidechse
commented
Jul 24, 2023
•
edited
Loading
edited
- Simply adds a field to DevView to launch with specified launch params. Does not store the launch params in any way.
- This is basically a reduced Add support for launch parameters #419, not to be confused with feat: Launch arguments #301 which is completely separate.
Keeping as draft cause I wanna make separate PR for restructuring the vuex commit payload |
src-tauri/src/northstar/mod.rs
Outdated
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?