Skip to content

cli: forward and display title_args in victory run - #1031

Closed
Pradhyumna51 wants to merge 1 commit into
Marvisak:mainfrom
Pradhyumna51:fix/run-forward-title-args
Closed

Pradhyumna51 wants to merge 1 commit into
Marvisak:mainfrom
Pradhyumna51:fix/run-forward-title-args

Conversation

@Pradhyumna51

@Pradhyumna51 Pradhyumna51 commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

victory run defines title_args after -- in Clap, but discarded it with title_args: _ in main().

This change wires the CLI plumbing:

  • Parses title arguments after -- into itle_args.
  • Forwards title_args into
    un::run() and prints them in the launch banner when present.
  • Updates the non-Windows
    un() fallback signature.
  • Adds unit tests in �pps/victory verifying that arguments after -- parse correctly.

Guest delivery via GetCommandLine or PEB hooks is outside the scope of this PR and left for follow-up work.

'victory run' defines title_args after '--' in clap for passing arguments to the title image, but discarded it with 'title_args: _' in main().

Forward title_args into run::run(), display them in the console banner when non-empty, update the non-Windows stub, and add unit tests in apps/victory asserting that title_args after '--' are parsed and preserved.

@DoubleD17 DoubleD17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested 19b4cc4 against ffe310e on Windows with a minimal synthetic x64 PE. Both revisions mapped and bound the PE without --execute. With -- --review-flag "with spaces", the PR printed the new title args line. The base and a PR run without arguments omitted that line. Both CLI parsing tests also passed.

The scope is worth clarifying in the PR description. title_args reaches run(), where it is used to print the banner. The guest launch still calls spawn_main(dlls) unchanged. If delivering the arguments to the guest is part of this change, could you add a guest-side check for that separately? The test above stops before guest execution. Banner code · Guest launch

AI-assisted.

@Pradhyumna51

Copy link
Copy Markdown
Author

Thanks for testing on Windows.

This change is just the CLI wiring and banner output. Passing arguments to the guest process via GetCommandLine or PEB patching requires loader changes, so I left that for a separate PR.

I updated the PR description to clarify the scope.

@Zipettte

Copy link
Copy Markdown

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 19b4cc4: cargo test -p victory passes, 3 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #513. Same as #513 (prints title_args, which the title already reads from the process command line) plus two tests of clap's own parsing.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants