Add opt-in Linux/Proton helpers and cross-compile guide (secondary, no Windows impact) #228

Open
luniiya wants to merge 2 commits from upstream-pr/228 into main
luniiya commented 2026-11-24 22:49:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by luniiya on 2026-11-24T22:49:31Z.


Summary

Adds two strictly opt-in environment switches and a short guide (docs/linux-proton.md) for contributors who are on Linux and want to cross-compile and test victory.exe under Steam Proton / vkd3d-proton.

Important: This is strictly secondary and does not aim to impact Windows work or default behavior in any way. Both switches are off by default; when unset, runtime behavior on Windows is completely unchanged.

Changes

  • VICTORY_LOG_FILE=<path> (crates/victory-core/src/logging.rs): Optionally writes tracing logs to a file (with ANSI disabled) instead of stderr. Useful under Proton where steam.exe swallows console output.
  • VICTORY_SKIP_TITLE_INT3=1 (crates/victory-loader/src/crash.rs): Optionally skips non-fatal int3 (0xcc) breakpoints inside title images (victory-image-*) by advancing Rip += 1 and logging a warning (cached in a OnceLock). Useful under Wine/Proton where non-fatal title asserts otherwise terminate via Breakpad.
  • docs/linux-proton.md: Concise instructions for cross-compiling victory.exe on Linux with cargo-xwin, running under Proton + vkd3d-proton (VKD3D_SHADER_CACHE_PATH, MESA_VK_WSI_PRESENT_MODE=fifo), and a bwrap /dev/dri bind-order note.

Testing

  • Cross-compiled victory.exe (--profile diag --features diagnostics --target x86_64-pc-windows-msvc) via cargo-xwin on Arch Linux with zero warnings/errors.
  • Tested on AMD Radeon RX 7800 XT (RADV / vkd3d-proton) under Proton Experimental: boots, reaches menus at 30 fps, plays intro video, and loads into the world.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6592974157 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/228). Originally posted by [luniiya](https://github.com/luniiya) on 2026-11-24T22:49:31Z. --- ## Summary Adds two strictly **opt-in** environment switches and a short guide (`docs/linux-proton.md`) for contributors who are on Linux and want to cross-compile and test `victory.exe` under Steam Proton / vkd3d-proton. > **Important:** This is strictly secondary and **does not aim to impact Windows work or default behavior in any way**. Both switches are off by default; when unset, runtime behavior on Windows is completely unchanged. ## Changes - **`VICTORY_LOG_FILE=<path>`** (`crates/victory-core/src/logging.rs`): Optionally writes tracing logs to a file (with ANSI disabled) instead of stderr. Useful under Proton where `steam.exe` swallows console output. - **`VICTORY_SKIP_TITLE_INT3=1`** (`crates/victory-loader/src/crash.rs`): Optionally skips non-fatal `int3` (`0xcc`) breakpoints inside title images (`victory-image-*`) by advancing `Rip += 1` and logging a warning (cached in a `OnceLock`). Useful under Wine/Proton where non-fatal title asserts otherwise terminate via Breakpad. - **`docs/linux-proton.md`**: Concise instructions for cross-compiling `victory.exe` on Linux with `cargo-xwin`, running under Proton + vkd3d-proton (`VKD3D_SHADER_CACHE_PATH`, `MESA_VK_WSI_PRESENT_MODE=fifo`), and a `bwrap` `/dev/dri` bind-order note. ## Testing - Cross-compiled `victory.exe` (`--profile diag --features diagnostics --target x86_64-pc-windows-msvc`) via `cargo-xwin` on Arch Linux with zero warnings/errors. - Tested on AMD Radeon RX 7800 XT (RADV / vkd3d-proton) under Proton Experimental: boots, reaches menus at 30 fps, plays intro video, and loads into the world.
ErRusso commented 2026-11-25 00:09:30 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ErRusso on 2026-11-24T23:44:03Z.

Review: CHANGES_REQUESTED


Reviewed at 743514c against 2119b0e.

The two switches are opt-in and reasonable:

  • VICTORY_LOG_FILE falls back to stderr if the file cannot be created and disables ANSI; Windows default behavior is unchanged.
  • VICTORY_SKIP_TITLE_INT3 is gated on the environment variable, checks the faulting byte and the title image, advances Rip, and logs. It is dangerous but explicitly opt-in.

Requesting changes for the guide:

  1. The launch command is wrong for a standalone victory.exe. Proton's proton run launches steam.exe; it does not run the executable you pass. Use proton runinprefix (with STEAM_COMPAT_DATA_PATH / STEAM_COMPAT_CLIENT_INSTALL_PATH) or the Proton wine binary directly, as the other Linux guides do.
  2. This PR adds docs/linux-proton.md, the same path as #41. Rename or coordinate; otherwise one will conflict.

No code issue in the two switches.

<!-- greyfinch-sync:fxceless/victory-fork:review:6049241031 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/228#pullrequestreview-6049241031). Originally posted by [ErRusso](https://github.com/ErRusso) on 2026-11-24T23:44:03Z. **Review:** CHANGES_REQUESTED --- Reviewed at `743514c` against `2119b0e`. The two switches are opt-in and reasonable: - `VICTORY_LOG_FILE` falls back to stderr if the file cannot be created and disables ANSI; Windows default behavior is unchanged. - `VICTORY_SKIP_TITLE_INT3` is gated on the environment variable, checks the faulting byte and the title image, advances `Rip`, and logs. It is dangerous but explicitly opt-in. Requesting changes for the guide: 1. The launch command is wrong for a standalone `victory.exe`. Proton's `proton run` launches `steam.exe`; it does not run the executable you pass. Use `proton runinprefix` (with `STEAM_COMPAT_DATA_PATH` / `STEAM_COMPAT_CLIENT_INSTALL_PATH`) or the Proton `wine` binary directly, as the other Linux guides do. 2. This PR adds `docs/linux-proton.md`, the same path as #41. Rename or coordinate; otherwise one will conflict. No code issue in the two switches.
luniiya commented 2026-11-25 00:10:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by luniiya on 2026-11-24T23:51:14Z.


Thanks for the review @ErRusso! Addressed both points in df04d39:

  1. Updated the launch command to use proton runinprefix (with STEAM_COMPAT_DATA_PATH / STEAM_COMPAT_CLIENT_INSTALL_PATH) or Proton's wine64 binary directly.
  2. Renamed docs/linux-proton.md to docs/linux-cross-compile-proton.md so it won't conflict with #41.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7147867787 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/228#issuecomment-7147867787). Originally posted by [luniiya](https://github.com/luniiya) on 2026-11-24T23:51:14Z. --- Thanks for the review @ErRusso! Addressed both points in `df04d39`: 1. Updated the launch command to use `proton runinprefix` (with `STEAM_COMPAT_DATA_PATH` / `STEAM_COMPAT_CLIENT_INSTALL_PATH`) or Proton's `wine64` binary directly. 2. Renamed `docs/linux-proton.md` to `docs/linux-cross-compile-proton.md` so it won't conflict with #41.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/228:upstream-pr/228'
git switch 'upstream-pr/228'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/228'
git switch 'upstream-pr/228'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/228'
git switch 'upstream-pr/228'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/228'
git switch 'main'
git merge --squash 'upstream-pr/228'
git switch 'main'
git merge --ff-only 'upstream-pr/228'
git switch 'main'
git merge 'upstream-pr/228'
git push origin 'main'
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
fxceless/victory-fork!228
No description provided.