Portable folder: portable.txt beside victory.exe keeps everything beside it #3908

Open
github-bot wants to merge 1 commit from github-bot/gh-3908 into main AGit
Owner

@⁠Trillazill on GitHub · 2026-11-30 11:08 UTC · original
Trillazill:feat/portable-home → main · +58 −2 · 3 files · 1 commits · open

What this changes

#3875 asks for settings, saves, caches and logs to live in the game's folder, so it can be archived whole. VICTORY_HOME already moves all of them: victory_core::config::home_override, the launcher's home(), and the F1 menu's settings file all follow it. But it has to be set in the environment first.

  • portable.txt beside victory.exe: the first thing main does is set VICTORY_HOME to victory-data beside the exe. It does this only when VICTORY_HOME isn't already set (a folder set by hand wins). Everything that keeps files reads it from there, and the processes a start begins (the preload, the F1 restart) inherit it.
  • One file that ignored VICTORY_HOME: the stats panel's first-start mark (advisor-shown\<build>) always went to %LOCALAPPDATA%\victory. It now follows VICTORY_HOME like the rest.
  • README: a bullet beside the VICTORY_HOME one. Existing files are not moved, and a build inside a source checkout is refused by the asset policy (see below).

Without the marker nothing changes.

Tests

  • New: tests::a_marker_beside_the_exe_keeps_everything_beside_it. It covers the marker, VICTORY_HOME set but empty, VICTORY_HOME set by hand (wins), and no marker.
  • cargo test -p victory: 84 pass (81 + 1 + 2).
  • cargo test -p victory-gpu --lib -- host::panel: 9 pass.
  • Clippy (-p victory -p victory-gpu --all-targets): nothing in the lines this change adds or touches. panel.rs:149 is flagged on 41adb551 too.
  • cargo xtask policy --staged: ok (3 files).
  • By hand, victory.exe config from a release build:
    • without the marker: %LOCALAPPDATA%\victory\cache and \data, as before;
    • with portable.txt: <exe folder>\victory-data\cache and \data;
    • with the marker and VICTORY_HOME set: the VICTORY_HOME folders.
    • That build sat in target\release, inside the checkout, so the asset policy refused the portable folders ("inside the VIctory source tree"). That is as it should be, and it's why the README names a release folder.

No game data, logs or other files from the title are in this change.

🤖 Generated with Claude Code

**@⁠Trillazill** on GitHub · 2026-11-30 11:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3908) `Trillazill:feat/portable-home` → `main` · +58 −2 · 3 files · 1 commits · open ## What this changes #3875 asks for settings, saves, caches and logs to live in the game's folder, so it can be archived whole. `VICTORY_HOME` already moves all of them: `victory_core::config::home_override`, the launcher's `home()`, and the F1 menu's settings file all follow it. But it has to be set in the environment first. - **`portable.txt` beside `victory.exe`:** the first thing `main` does is set `VICTORY_HOME` to `victory-data` beside the exe. It does this only when `VICTORY_HOME` isn't already set (a folder set by hand wins). Everything that keeps files reads it from there, and the processes a start begins (the preload, the F1 restart) inherit it. - **One file that ignored `VICTORY_HOME`:** the stats panel's first-start mark (`advisor-shown\<build>`) always went to `%LOCALAPPDATA%\victory`. It now follows `VICTORY_HOME` like the rest. - **README:** a bullet beside the `VICTORY_HOME` one. Existing files are not moved, and a build inside a source checkout is refused by the asset policy (see below). Without the marker nothing changes. ## Tests - New: `tests::a_marker_beside_the_exe_keeps_everything_beside_it`. It covers the marker, `VICTORY_HOME` set but empty, `VICTORY_HOME` set by hand (wins), and no marker. - `cargo test -p victory`: 84 pass (81 + 1 + 2). - `cargo test -p victory-gpu --lib -- host::panel`: 9 pass. - Clippy (`-p victory -p victory-gpu --all-targets`): nothing in the lines this change adds or touches. `panel.rs:149` is flagged on 41adb551 too. - `cargo xtask policy --staged`: ok (3 files). - By hand, `victory.exe config` from a release build: - without the marker: `%LOCALAPPDATA%\victory\cache` and `\data`, as before; - with `portable.txt`: `<exe folder>\victory-data\cache` and `\data`; - with the marker and `VICTORY_HOME` set: the `VICTORY_HOME` folders. - That build sat in `target\release`, inside the checkout, so the asset policy refused the portable folders ("inside the VIctory source tree"). That is as it should be, and it's why the README names a release folder. No game data, logs or other files from the title are in this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With portable.txt next to victory.exe and no VICTORY_HOME of the user's,
the start sets VICTORY_HOME to victory-data beside the exe before anything
else runs. Settings, logs, caches, saves and downloads all follow
VICTORY_HOME already, and the processes a start begins inherit it.

The stats panel's first-start mark was the one file that went to
%LOCALAPPDATA% whatever VICTORY_HOME said; it follows it now too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 11:13:25 +00:00
github-bot changed title from Portable folder: portable.txt beside victory.exe keeps everything beside it (#3875) to Portable folder: portable.txt beside victory.exe keeps everything beside it 2026-12-01 06:26:22 +00:00
github-bot force-pushed github-bot/gh-3908 from 3b2a99555b to 70dac620c7 2026-12-01 06:26:23 +00:00 Compare
Author
Owner

@⁠Trillazill on GitHub · 2026-12-01 06:21 UTC · original

Rebased onto main 5fabb46e. Conflict in panel.rs: a doc comment only. Tests on the rebased branch: cargo test -p victory --bin victory -- tests::a_marker_beside_the_exe_keeps_everything_beside_it passes; cargo clippy -p victory-gpu --lib --tests no errors.

**@⁠Trillazill** on GitHub · 2026-12-01 06:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3908#issuecomment-7302785290) Rebased onto main 5fabb46e. Conflict in `panel.rs`: a doc comment only. Tests on the rebased branch: `cargo test -p victory --bin victory -- tests::a_marker_beside_the_exe_keeps_everything_beside_it` passes; `cargo clippy -p victory-gpu --lib --tests` no errors.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/panel.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3908/head:github-bot/gh-3908'
git switch 'github-bot/gh-3908'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3908'
git switch 'github-bot/gh-3908'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3908'
git switch 'github-bot/gh-3908'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3908'
git switch 'main'
git merge --squash 'github-bot/gh-3908'
git switch 'main'
git merge --ff-only 'github-bot/gh-3908'
git switch 'main'
git merge 'github-bot/gh-3908'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3908
No description provided.