Skip to content

victory: a menu when opened from Explorer, instead of help that closes at once - #7

Merged
MagiccConch merged 1 commit into
mainfrom
ux/launcher-menu
Nov 24, 2026
Merged

MagiccConch merged 1 commit into
mainfrom
ux/launcher-menu

Conversation

@MagiccConch

Copy link
Copy Markdown
Owner

Implements part 2 of (upstream tracking) Marvisak#910 (upstream PR: Marvisak#959). Part 1, issue forms, is intentionally not included — the upstream author withdrew it in favor of the existing upstream PRs #9/Marvisak#113/Marvisak#380/Marvisak#543.

What changed

Port of EduBertozzi's ux/launcher-menu (head 6614cc26), squashed from its seven commits; +1386/−0 across four files, none of them runtime code:

  • apps/victory/src/menu.rs (new, ~1358 lines): the menu. Shown when the process owns its console (GetConsoleProcessList — i.e. a double-click from Explorer) or when VICTORY_MENU=1 is set. Options: run a game (path cleaned of quotes/PowerShell & '...' wrappers), run again (last game remembered in the data folder), "Check this PC" (Windows build, GPU name/driver, SM 6.6/mesh/wave-size probe, with one-line hints — the Agility-runtime hint only appears when SM 6.6 is actually missing, after MichaelSmithAI's Wine review), open the data folder, quit. A game runs as a child victory run <exe> --execute in the same console, so a crash or ExitProcess leaves the menu up; the run's exit code is reported (hex for NTSTATUS, e.g. 0xC0000005). 12 unit tests.
  • apps/victory/src/main.rs (+6): menu::wanted() hook before clap parsing; every explicit command-line use is unchanged.
  • apps/victory/Cargo.toml (+18): windows-sys/windows features under cfg(windows), and tempfile/toml dev-dependencies for the tests.
  • Cargo.lock (+4): the new dependency edges.

Why

A double-click on victory.exe printed clap usage and closed the window instantly — the confusion in upstream Marvisak#527. "Check this PC" answers what most "can't run" issues ask for.

Validation here

  • The combined upstream diff applies as-is on our main (verified base-file drift: none in apps/victory).
  • cargo check and cargo clippy -- -D warnings, full workspace, x86_64-pc-windows-msvc, --all-targets, both with and without --all-features — clean (this type-checks menu.rs and its tests, which are Windows-gated).
  • cargo fmt --check -p victory — clean.
  • Linux limitation, pre-existing and unrelated: victory-gpu does not compile for the Linux host target on clean main (host_resource is #[cfg(windows)] with a Linux-visible caller), so cargo test -p victory cannot run here; on Windows CI it does. Upstream runtime verification: Wine (menu + CLI paths, forced-menu edge cases) and native AMD RDNA3/Windows 11 (cargo test -p victory 10 passed/0 failed).
  • Known leftover for CI to catch or for Windows hands-on: the Explorer double-click detection (GetConsoleProcessList) is only hand-tested upstream.

This PR was created by an AI agent (OpenHands) on behalf of the user.

…s at once

Port of EduBertozzi's ux/launcher-menu as PR Marvisak#959 (upstream issue Marvisak#910,
part 2), squashed from its seven commits, base ffe310e; the diff applies
as-is.

When victory.exe is opened from Explorer (no arguments, a console of its
own, checked with GetConsoleProcessList, or forced with VICTORY_MENU=1),
it shows a menu instead of clap's usage that closes at once. Every
command-line use is unchanged. The menu runs a game as a child
victory run <game> --execute in the same console, so a crash leaves the
menu up and reports the exit code (hex for an NTSTATUS); "Check this PC"
answers the questions most "can't run" issues ask, with one-line hints;
the Agility runtime hint only appears when SM 6.6 is missing. Neither
the runtime nor the GPU crates are touched: it is apps/victory plus its
dependencies.

Co-authored-by: Eduardo Bertozzi <bertozzidudu@gmail.com>
Co-authored-by: openhands <openhands@all-hands.dev>
@MagiccConch
MagiccConch marked this pull request as ready for review November 24, 2026 20:52
@MagiccConch
MagiccConch merged commit 1fbd5f5 into main Nov 24, 2026
1 check passed
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.

2 participants