preload, shaders and translate find the title beside the program, as play does #4543

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

@⁠DoubleD17 on GitHub · 2026-11-30 22:10 UTC · original
DoubleD17:fix/standalone-commands-find-title → main · +44 −7 · 2 files · 1 commits · open

What it changes

victory play needs no configuration: with no executable named, it starts the game_scarlett_master.exe beside the program, or in the current folder. That is the install the README describes.

The commands that read the title folder don't do the same. victory preload (and shaders, translate, census) with no path and no victory.toml stop with:

Error: no paths given and none configured (see victory.example.toml)

This happens even when the title sits right beside victory.exe, and even though preload --help says the default is "the configured game folder". We hit it running victory preload --all by hand.

This change:

  • default_paths: after the paths given and the configured ones, it falls back to the folder of the title play would start.
  • Shared lookup: the "beside this program, else in the current folder" lookup moves out of play::prepare into title_beside in main.rs, and play uses it, so both find the same title. main.rs builds on every platform; play is Windows-only.
  • Error message: it now also says that no title was found beside the program or in the current folder.
  • preload --help: the paths text names the new default.

Nothing changes when paths are given or configured.

How it was tested

  • GPU and profile: not a rendering change.
  • A folder with a game_scarlett_master.exe, run there with no path and no victory.toml (VICTORY_KEEP_OLD_SHADERS=1 so the shared cache is left alone):
    • Before (e1251c31): victory shaders stops with Error: no paths given and none configured (see victory.example.toml).
    • After: victory shaders reads that folder (0 shaders in the cache, 0 do not translate, 0 s, the test file being empty).
  • With an explicit path nothing changes: default_paths returns the given paths first, as before.
  • A new test, the_title_beside_the_program_names_its_folder, covers the lookup:
    • no title, then None;
    • a game_scarlett_master.exe in the folder, then that folder as an absolute path.
  • cargo test -p victory --locked: 92 passed, the new test among them.
  • cargo clippy -p victory --all-targets --locked --no-deps -- -D warnings: clean. Without --no-deps it stops first on main's own ranged in crates/victory-gpu/src/shadow.rs:7197.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches (default_paths, "no paths given and none configured", standalone preload). Nothing open changes how the standalone commands find the title.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-11-30 22:10 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4542) `DoubleD17:fix/standalone-commands-find-title` → `main` · +44 −7 · 2 files · 1 commits · open ## What it changes `victory play` needs no configuration: with no executable named, it starts the `game_scarlett_master.exe` beside the program, or in the current folder. That is the install the README describes. The commands that read the title folder don't do the same. `victory preload` (and `shaders`, `translate`, `census`) with no path and no `victory.toml` stop with: ``` Error: no paths given and none configured (see victory.example.toml) ``` This happens even when the title sits right beside `victory.exe`, and even though `preload --help` says the default is "the configured game folder". We hit it running `victory preload --all` by hand. This change: - **`default_paths`:** after the paths given and the configured ones, it falls back to the folder of the title `play` would start. - **Shared lookup:** the "beside this program, else in the current folder" lookup moves out of `play::prepare` into `title_beside` in `main.rs`, and `play` uses it, so both find the same title. `main.rs` builds on every platform; `play` is Windows-only. - **Error message:** it now also says that no title was found beside the program or in the current folder. - **`preload --help`:** the `paths` text names the new default. Nothing changes when paths are given or configured. ## How it was tested - GPU and profile: not a rendering change. - A folder with a `game_scarlett_master.exe`, run there with no path and no `victory.toml` (`VICTORY_KEEP_OLD_SHADERS=1` so the shared cache is left alone): - Before (e1251c31): `victory shaders` stops with `Error: no paths given and none configured (see victory.example.toml)`. - After: `victory shaders` reads that folder (`0 shaders in the cache, 0 do not translate, 0 s`, the test file being empty). - With an explicit path nothing changes: `default_paths` returns the given paths first, as before. - A new test, `the_title_beside_the_program_names_its_folder`, covers the lookup: - no title, then `None`; - a `game_scarlett_master.exe` in the folder, then that folder as an absolute path. - `cargo test -p victory --locked`: 92 passed, the new test among them. - `cargo clippy -p victory --all-targets --locked --no-deps -- -D warnings`: clean. Without `--no-deps` it stops first on main's own `ranged` in `crates/victory-gpu/src/shadow.rs:7197`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches (`default_paths`, "no paths given and none configured", standalone preload). Nothing open changes how the standalone commands find the title. AI Assisted
`victory preload`, `shaders`, `translate` and `census` with no path and no
victory.toml stopped with "no paths given and none configured", even with
game_scarlett_master.exe beside victory.exe, the install the README
describes and the one `play` needs no configuration for. default_paths now
falls back to the folder of the title `play` starts (beside this program,
else in the current folder); the lookup moves from play::prepare into
main.rs (title_beside), which builds on every platform, and play uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 22:13:40 +00:00
github-bot force-pushed github-bot/gh-4542 from c6ccb88ab8 to 163bc504eb 2026-12-01 00:23:43 +00:00 Compare
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 10:59 UTC · original

title_folder makes the selected executable path absolute, while play also resolves filesystem links. A file link beside the launcher can therefore make preload scan the link's folder while play runs from the actual installation. Rust path handling

00413331a9c274100fa17df3bc31fc67b8da14a4 resolves the selected file before taking its parent and reuses the Windows path normalization from play. If canonicalization fails it uses the same absolute-path fallback as your current helper. Review commit

On Windows 10/MSVC, the exact two versions returned the same normal installation path. A synthetic directory junction returned its alias with 163bc504 and the actual installation with the follow-up. The host returned Win32 error 1314 when the fixture tried to create a file symbolic link, so the Windows verification covers the directory junction. Staged policy passed for both source files.

Please preserve the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it in.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 10:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4542#issuecomment-7309021494) `title_folder` makes the selected executable path absolute, while `play` also resolves filesystem links. A file link beside the launcher can therefore make `preload` scan the link's folder while `play` runs from the actual installation. [Rust path handling](https://doc.rust-lang.org/std/path/fn.absolute.html) 00413331a9c274100fa17df3bc31fc67b8da14a4 resolves the selected file before taking its parent and reuses the Windows path normalization from `play`. If canonicalization fails it uses the same absolute-path fallback as your current helper. [Review commit](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/00413331a9c274100fa17df3bc31fc67b8da14a4) On Windows 10/MSVC, the exact two versions returned the same normal installation path. A synthetic directory junction returned its alias with `163bc504` and the actual installation with the follow-up. The host returned Win32 error 1314 when the fixture tried to create a file symbolic link, so the Windows verification covers the directory junction. Staged policy passed for both source files. Please preserve the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it in. AI-assisted with OpenAI Codex.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4542'
git switch 'github-bot/gh-4542'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4542'
git switch 'github-bot/gh-4542'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4542'
git switch 'main'
git merge --squash 'github-bot/gh-4542'
git switch 'main'
git merge --ff-only 'github-bot/gh-4542'
git switch 'main'
git merge 'github-bot/gh-4542'
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!4543
No description provided.