Add a Linux launcher and smoke test for Proton #191

Closed
ligmaSec wants to merge 2 commits from upstream-pr/191 into main
ligmaSec commented 2026-11-24 01:16:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ligmaSec on 2026-11-24T01:16:39Z.


This adds a Linux launcher for the Windows executable. It accepts a Linux path to the title, preserves the remaining victory run arguments, and starts VIctory in a dedicated Proton prefix through UMU. The README includes cross-build instructions and a smoke test that runs without game files.

The Linux build uses Rust’s x86_64-pc-windows-gnullvm target. A build with the GCC-based Windows target aborted when a title DLL called into Rust during thread startup. LLVM-MinGW provides native Windows thread-local storage, which lets the loader restore the thread state before the Rust worker starts. The unwinder is linked statically so the executable works in a fresh prefix.

Verification

  • On Debian 13 with UMU-Proton 11.0-2e, both loader integration tests passed, including thread notifications, delayed imports, and loading a title DLL by name.
  • A synthetic title ran through the launcher, called an Xbox runtime function and a host function, and returned the expected value of 42.
  • Game rendering remains unverified. The available Vulkan adapter did not expose D3D feature level 12.0, so the texture readback test skipped.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6572378118 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-11-24T01:16:39Z. --- This adds a Linux launcher for the Windows executable. It accepts a Linux path to the title, preserves the remaining `victory run` arguments, and starts VIctory in a dedicated Proton prefix through UMU. The README includes cross-build instructions and a smoke test that runs without game files. The Linux build uses Rust’s `x86_64-pc-windows-gnullvm` target. A build with the GCC-based Windows target aborted when a title DLL called into Rust during thread startup. LLVM-MinGW provides native Windows thread-local storage, which lets the loader restore the thread state before the Rust worker starts. The unwinder is linked statically so the executable works in a fresh prefix. ### Verification - On Debian 13 with UMU-Proton 11.0-2e, both loader integration tests passed, including thread notifications, delayed imports, and loading a title DLL by name. - A synthetic title ran through the launcher, called an Xbox runtime function and a host function, and returned the expected value of 42. - Game rendering remains unverified. The available Vulkan adapter did not expose D3D feature level 12.0, so the texture readback test skipped.
SkippySteve commented 2026-11-24 01:30:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T01:30:30Z.

Review: COMMENTED


Thanks. A thin launcher plus a smoke test that needs no game files is a good addition, and the asset story is clean: the fixture is Rust source compiled into a temp dir at test time, the README uses /path/to/game/title.exe, and nothing checked in points at a real install.

What I checked (Arch, on the PR head)

  • cargo xtask policy reports asset policy: 154 files ok. bash -n passes on both scripts.
  • I tested scripts/victory-proton.sh with a stub umu-run that only prints its environment and argv, so nothing was launched:
    • --help exits 0, no args exits 2, and a missing build, missing title, or missing umu-run each exit 1 with a clear message.
    • With "<dir>/my title.exe" --execute --console series-s -- -foo "a b", argv arrives as Z:\…\victory.exe, run, Z:\…\my title.exe, --execute, --console, series-s, --, -foo, a b. Spaces survive and -- passthrough works. WINEPREFIX defaults to $XDG_DATA_HOME/victory/proton and STEAM_COMPAT_INSTALL_PATH is the build's directory.
  • I did not run tests/proton-smoke.sh end to end because this box has no LLVM-MinGW. So this review covers the shell and Rust logic, not the gnullvm TLS claim.

Toolchain overlap with #149 / #195

Both open Linux PRs build x86_64-pc-windows-msvc: #195 uses cargo xwin and #149 (docs) uses clang-cl/lld-link with an xwin sysroot. That build runs under UMU-Proton for us. This PR makes x86_64-pc-windows-gnullvm the Linux path, and the launcher only looks in target/x86_64-pc-windows-gnullvm/release/. Suggestions:

  1. When the gnullvm binary is missing, have the launcher fall back to target/x86_64-pc-windows-msvc/release/victory.exe, or say in the README that VICTORY_EXE covers MSVC builds. Then the launcher works whichever recipe lands.
  2. The README says the GCC-based -gnu target aborts in thread startup. Could you say whether the MSVC target is affected? If not, the README should say that either MSVC or gnullvm works and that only -gnu is broken. Otherwise readers will think they must use gnullvm.
  3. On merge order, I'd land #195 first (Wine stubs, #[cfg(windows)] fixes, and the policy/hook changes), then this one and #149. #149 is docs only, so I'm happy to rebase it to link scripts/victory-proton.sh and tests/proton-smoke.sh and drop its duplicated run steps. #195 also touches crates/victory-gpu/src/resource.rs, but in different hunks, so I expect no conflict.

Smaller notes

  • GAMEID: the launcher leaves GAMEID unset, so umu-run warns and falls back to umu-default. Consider export GAMEID=${GAMEID:-umu-victory} (what #149 documents) so protonfixes and the prefix are stable and the warning goes away.
  • The smoke test shares the real prefix. tests/proton-smoke.sh runs in the default prefix, which is the one that holds saves and converted data. A first run also pays the UMU runtime download there. It might be worth letting the test set its own WINEPREFIX (for example ${VICTORY_SMOKE_PREFIX:-…/victory/proton-smoke}) so it never touches a user's save prefix.
  • pipefail vs. the comment. The comment says the result is checked "independently of its own exit code", but with set -o pipefail, a non-zero exit from umu/Proton teardown fails the script before grep runs. Either drop pipefail for that pipeline or reword the comment. Anchoring on title exited with 42 with trailing whitespace allowed (for CRLF) is a good touch.
  • hle-probe/build.rs: CARGO_CFG_TARGET_ENV == "gnu" is true for both -gnu and -gnullvm. On the GCC target, -fuse-ld=lld adds an lld requirement. Checking CARGO_CFG_TARGET_ABI == "llvm" would keep the change scoped to the toolchain you tested.
  • VICTORY_HLE_PROBE isn't documented. A line in the README saying how you ran the loader integration tests under Proton (build the probe on Linux, point the env var at it) would let others reproduce the "both loader integration tests passed" claim.
  • README headings: renaming ## Status and ## Getting started changes their anchors. That's fine if nothing links to them, but it's worth a grep.

Overall this direction looks right to me. Items 1–2 are what I'd most like settled before merge, so the three Linux PRs don't document conflicting builds.

<!-- greyfinch-sync:Marvisak/VIctory:review:6032273641 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191#pullrequestreview-6032273641). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T01:30:30Z. **Review:** COMMENTED --- Thanks. A thin launcher plus a smoke test that needs no game files is a good addition, and the asset story is clean: the fixture is Rust source compiled into a temp dir at test time, the README uses `/path/to/game/title.exe`, and nothing checked in points at a real install. ### What I checked (Arch, on the PR head) - `cargo xtask policy` reports `asset policy: 154 files ok`. `bash -n` passes on both scripts. - I tested `scripts/victory-proton.sh` with a stub `umu-run` that only prints its environment and argv, so nothing was launched: - `--help` exits 0, no args exits 2, and a missing build, missing title, or missing `umu-run` each exit 1 with a clear message. - With `"<dir>/my title.exe" --execute --console series-s -- -foo "a b"`, argv arrives as `Z:\…\victory.exe`, `run`, `Z:\…\my title.exe`, `--execute`, `--console`, `series-s`, `--`, `-foo`, `a b`. Spaces survive and `--` passthrough works. `WINEPREFIX` defaults to `$XDG_DATA_HOME/victory/proton` and `STEAM_COMPAT_INSTALL_PATH` is the build's directory. - I did **not** run `tests/proton-smoke.sh` end to end because this box has no LLVM-MinGW. So this review covers the shell and Rust logic, not the gnullvm TLS claim. ### Toolchain overlap with #149 / #195 Both open Linux PRs build `x86_64-pc-windows-msvc`: #195 uses `cargo xwin` and #149 (docs) uses clang-cl/lld-link with an xwin sysroot. That build runs under UMU-Proton for us. This PR makes `x86_64-pc-windows-gnullvm` the Linux path, and the launcher only looks in `target/x86_64-pc-windows-gnullvm/release/`. Suggestions: 1. When the gnullvm binary is missing, have the launcher fall back to `target/x86_64-pc-windows-msvc/release/victory.exe`, or say in the README that `VICTORY_EXE` covers MSVC builds. Then the launcher works whichever recipe lands. 2. The README says the GCC-based `-gnu` target aborts in thread startup. Could you say whether the MSVC target is affected? If not, the README should say that either MSVC or gnullvm works and that only `-gnu` is broken. Otherwise readers will think they must use gnullvm. 3. On merge order, I'd land #195 first (Wine stubs, `#[cfg(windows)]` fixes, and the policy/hook changes), then this one and #149. #149 is docs only, so I'm happy to rebase it to link `scripts/victory-proton.sh` and `tests/proton-smoke.sh` and drop its duplicated run steps. #195 also touches `crates/victory-gpu/src/resource.rs`, but in different hunks, so I expect no conflict. ### Smaller notes - **GAMEID**: the launcher leaves `GAMEID` unset, so umu-run warns and falls back to `umu-default`. Consider `export GAMEID=${GAMEID:-umu-victory}` (what #149 documents) so protonfixes and the prefix are stable and the warning goes away. - **The smoke test shares the real prefix.** `tests/proton-smoke.sh` runs in the default prefix, which is the one that holds saves and converted data. A first run also pays the UMU runtime download there. It might be worth letting the test set its own `WINEPREFIX` (for example `${VICTORY_SMOKE_PREFIX:-…/victory/proton-smoke}`) so it never touches a user's save prefix. - **`pipefail` vs. the comment.** The comment says the result is checked "independently of its own exit code", but with `set -o pipefail`, a non-zero exit from umu/Proton teardown fails the script before `grep` runs. Either drop `pipefail` for that pipeline or reword the comment. Anchoring on `title exited with 42` with trailing whitespace allowed (for CRLF) is a good touch. - **`hle-probe/build.rs`**: `CARGO_CFG_TARGET_ENV == "gnu"` is true for both `-gnu` and `-gnullvm`. On the GCC target, `-fuse-ld=lld` adds an lld requirement. Checking `CARGO_CFG_TARGET_ABI == "llvm"` would keep the change scoped to the toolchain you tested. - **`VICTORY_HLE_PROBE`** isn't documented. A line in the README saying how you ran the loader integration tests under Proton (build the probe on Linux, point the env var at it) would let others reproduce the "both loader integration tests passed" claim. - **README headings**: renaming `## Status` and `## Getting started` changes their anchors. That's fine if nothing links to them, but it's worth a grep. Overall this direction looks right to me. Items 1–2 are what I'd most like settled before merge, so the three Linux PRs don't document conflicting builds.
DaviTostes commented 2026-11-24 06:54:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T01:28:36Z.


Reviewed statically, and tested what this machine can run:

  • umu-run is installed here (the launcher's hard requirement), and the script's VICTORY_EXE override is useful: it lets the launcher use the MSVC build produced by cargo xwin, which is what we use for the Wine test runs.
  • The tests/proton-smoke.sh path could not be run as written: this machine has x86_64-pc-windows-msvc and cargo-xwin, but not the x86_64-pc-windows-gnullvm target or LLVM-MinGW, and the smoke fixture is compiled with --target x86_64-pc-windows-gnullvm -Wl,--entry=title_main. A note that the smoke test needs LLVM-MinGW (or an MSVC variant of the fixture with /ENTRY:) would keep people from hitting that.
  • The script's path handling looks right: VICTORY_EXE is resolved, paths are made absolute, and both are passed to UMU on Z:.
  • Coordinate with #195 (Linux cross-build docs) and #149 (Linux/Proton docs); three PRs now document the same territory.

No game data used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119136451 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191#issuecomment-7119136451). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T01:28:36Z. --- Reviewed statically, and tested what this machine can run: - `umu-run` **is** installed here (the launcher's hard requirement), and the script's `VICTORY_EXE` override is useful: it lets the launcher use the MSVC build produced by `cargo xwin`, which is what we use for the Wine test runs. - The `tests/proton-smoke.sh` path could not be run as written: this machine has `x86_64-pc-windows-msvc` and `cargo-xwin`, but not the `x86_64-pc-windows-gnullvm` target or LLVM-MinGW, and the smoke fixture is compiled with `--target x86_64-pc-windows-gnullvm -Wl,--entry=title_main`. A note that the smoke test needs LLVM-MinGW (or an MSVC variant of the fixture with `/ENTRY:`) would keep people from hitting that. - The script's path handling looks right: `VICTORY_EXE` is resolved, paths are made absolute, and both are passed to UMU on `Z:`. - Coordinate with #195 (Linux cross-build docs) and #149 (Linux/Proton docs); three PRs now document the same territory. No game data used.
ligmaSec commented 2026-11-24 06:55:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ligmaSec on 2026-11-24T01:38:13Z.


Thanks @SkippySteve and @DaviTostes. Updated the launcher and docs in e3757d3.

  • An existing MSVC release built with cargo xwin is now picked up automatically when the gnullvm release is absent. VICTORY_EXE still takes precedence. Both targets have native Windows TLS. The thread-startup abort I reproduced was on the GCC-based -gnu target. My local end-to-end run uses gnullvm; the MSVC runtime result comes from your testing.
  • The launcher defaults to GAMEID=umu-victory. The smoke test uses a dedicated prefix, checks both the launcher status and the title’s return value, and documents the LLVM-MinGW requirement for building its fixture. The fixture’s LLD flags now apply only to the LLVM ABI.
  • The README keeps its original anchors. The launcher instructions and a reproducible VICTORY_HLE_PROBE example are in docs/proton-launcher.md. #149 can link there for the launcher and smoke test. The separate Wine fixes from the closed #195 are being tracked in #217.

Verified on Debian with UMU-Proton 11.0-2e: the smoke title returned 42, the separate gameplay prefix was never created, and both loader tests passed using the documented commands. I also checked MSVC fallback, build selection precedence, and argument forwarding with a stub launcher.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119298049 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191#issuecomment-7119298049). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-11-24T01:38:13Z. --- Thanks @SkippySteve and @DaviTostes. Updated the launcher and docs in e3757d3. - An existing MSVC release built with `cargo xwin` is now picked up automatically when the gnullvm release is absent. `VICTORY_EXE` still takes precedence. Both targets have native Windows TLS. The thread-startup abort I reproduced was on the GCC-based `-gnu` target. My local end-to-end run uses gnullvm; the MSVC runtime result comes from your testing. - The launcher defaults to `GAMEID=umu-victory`. The smoke test uses a dedicated prefix, checks both the launcher status and the title’s return value, and documents the LLVM-MinGW requirement for building its fixture. The fixture’s LLD flags now apply only to the LLVM ABI. - The README keeps its original anchors. The launcher instructions and a reproducible `VICTORY_HLE_PROBE` example are in [docs/proton-launcher.md](https://github.com/ligmaSec/VIctory/blob/e3757d3/docs/proton-launcher.md). #149 can link there for the launcher and smoke test. The separate Wine fixes from the closed #195 are being tracked in #217. Verified on Debian with UMU-Proton 11.0-2e: the smoke title returned 42, the separate gameplay prefix was never created, and both loader tests passed using the documented commands. I also checked MSVC fallback, build selection precedence, and argument forwarding with a stub launcher.
DaviTostes commented 2026-11-24 06:55:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T01:44:19Z.


Tested e3757d3 on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1):

  • MSVC fallback works: with only an MSVC release present (CARGO_TARGET_DIR pointing at a tree with x86_64-pc-windows-msvc/release/victory.exe and no gnullvm), a stub umu-run shows the launcher picks the MSVC binary and forwards the arguments and Z: paths correctly:
    Z:\...\x86_64-pc-windows-msvc\release\victory.exe run Z:\...\title.exe --execute.
  • MSVC runtime result: I built the smoke fixture for MSVC (same no_std/no_main source, raw-dylib xgameruntime + kernel32, /ENTRY:title_main) and ran it through the built victory.exe under plain Wine: title exited with 42, imports bound 1 HLE + 1 host. So the MSVC runtime path is good.
  • UMU end-to-end: on this machine (UMU 1.4.4, PROTONPATH = Steam Proton 11.0) the run stops before the title with Proton: Error: unable to use parent for game drive, path. The same happens with a direct umu-run victory.exe run title.exe --execute (no launcher), so it is the UMU/Proton combination here, not the script. Your Debian run used UMU-Proton 11.0-2e; naming UMU-Proton as the supported runtime (stock Steam Proton failing under UMU with this error) would save the next person the confusion.

No game data used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119398302 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191#issuecomment-7119398302). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T01:44:19Z. --- Tested `e3757d3` on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1): - **MSVC fallback works**: with only an MSVC release present (`CARGO_TARGET_DIR` pointing at a tree with `x86_64-pc-windows-msvc/release/victory.exe` and no gnullvm), a stub `umu-run` shows the launcher picks the MSVC binary and forwards the arguments and `Z:` paths correctly: `Z:\...\x86_64-pc-windows-msvc\release\victory.exe run Z:\...\title.exe --execute`. - **MSVC runtime result**: I built the smoke fixture for MSVC (same `no_std`/`no_main` source, `raw-dylib` xgameruntime + kernel32, `/ENTRY:title_main`) and ran it through the built `victory.exe` under plain Wine: `title exited with 42`, imports bound 1 HLE + 1 host. So the MSVC runtime path is good. - **UMU end-to-end**: on this machine (UMU 1.4.4, `PROTONPATH` = Steam **Proton 11.0**) the run stops before the title with `Proton: Error: unable to use parent for game drive, path`. The same happens with a direct `umu-run victory.exe run title.exe --execute` (no launcher), so it is the UMU/Proton combination here, not the script. Your Debian run used **UMU-Proton 11.0-2e**; naming UMU-Proton as the supported runtime (stock Steam Proton failing under UMU with this error) would save the next person the confusion. No game data used.
upstream-sync closed this pull request 2026-11-24 14:03:38 +00:00
ligmaSec commented 2026-11-24 14:04:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ligmaSec on 2026-11-24T13:52:32Z.


closing this as it’s been superseded by many other PRs

<!-- greyfinch-sync:Marvisak/VIctory:comment:7133467135 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/191#issuecomment-7133467135). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-11-24T13:52:32Z. --- closing this as it’s been superseded by many other PRs

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!191
No description provided.