Skip to content
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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

GeckoEidechse
Copy link
Member

@GeckoEidechse GeckoEidechse commented Jul 24, 2023

image

@GeckoEidechse GeckoEidechse added the enhancement New feature or request label Jul 24, 2023
@GeckoEidechse
Copy link
Member Author

Keeping as draft cause I wanna make separate PR for restructuring the vuex commit payload

Comment on lines 117 to 126
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)
Copy link
Member Author

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)

Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

@catornot catornot Sep 20, 2023

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?

@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request merge conflicts Blocked by merge conflicts, waiting on the author to resolve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants