Run: find title DLLs, the manifest and G: in a separated exe/dump layout #3350

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

@⁠oni-swr on GitHub · 2026-11-26 19:40 UTC · original
oni-swr:fix/separated-layout-title-dlls-3336 → main · +261 −30 · 9 files · 1 commits · open

Fixes #3336 (resolution 1, the search order). Task: #3336 on #1633.

A dump whose executable is in another folder than its data got TitleID 0, no G: and unbound imports, because run looked for the title's DLLs, MicrosoftGame.config and the package only beside the executable.

  • load_title_dlls / load_title_dll take the title folders in search order (&[&Path]); a new find_title_dll picks the first folder that has the file.
  • run searches the executable's folder, then game_dir (once if they are the same folder). The same DLL in both comes from the executable's folder.
  • MicrosoftGame.config is read from beside the executable, else from game_dir; G: is mounted where it is found. With one folder, behaviour is unchanged. The startup-archive check and the missing-DLL message use the same folders.
  • README notes the layout.

Tests (synthetic temp dirs, no game files, no GPU): find_title_dll order; load_title_dll finds a DLL in the second folder and prefers the first (title_dlls.rs); TitleLayout for one folder, a separated one, and manifest precedence (run.rs). With the old single-folder behaviour emulated, the loader test and the separated-layout test fail; they pass with the fix.

Checked: cargo test -p victory-loader -p victory, cargo clippy -p victory-loader -p victory --all-targets -- -D warnings, cargo xtask policy. cargo clippy --workspace --all-targets -D warnings stops on undocumented-unsafe errors in victory-gpu test code that this PR does not touch. Not run with a title or a GPU.

AI-assisted: Claude Code (Claude Sonnet 5.5).

🤖 Generated with Claude Code

**@⁠oni-swr** on GitHub · 2026-11-26 19:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/3350) `oni-swr:fix/separated-layout-title-dlls-3336` → `main` · +261 −30 · 9 files · 1 commits · open Fixes #3336 (resolution 1, the search order). Task: #3336 on #1633. A dump whose executable is in another folder than its data got TitleID 0, no `G:` and unbound imports, because `run` looked for the title's DLLs, `MicrosoftGame.config` and the package only beside the executable. - `load_title_dlls` / `load_title_dll` take the title folders in search order (`&[&Path]`); a new `find_title_dll` picks the first folder that has the file. - `run` searches the executable's folder, then `game_dir` (once if they are the same folder). The same DLL in both comes from the executable's folder. - `MicrosoftGame.config` is read from beside the executable, else from `game_dir`; `G:` is mounted where it is found. With one folder, behaviour is unchanged. The startup-archive check and the missing-DLL message use the same folders. - README notes the layout. Tests (synthetic temp dirs, no game files, no GPU): `find_title_dll` order; `load_title_dll` finds a DLL in the second folder and prefers the first (`title_dlls.rs`); `TitleLayout` for one folder, a separated one, and manifest precedence (`run.rs`). With the old single-folder behaviour emulated, the loader test and the separated-layout test fail; they pass with the fix. Checked: `cargo test -p victory-loader -p victory`, `cargo clippy -p victory-loader -p victory --all-targets -- -D warnings`, `cargo xtask policy`. `cargo clippy --workspace --all-targets -D warnings` stops on undocumented-unsafe errors in `victory-gpu` test code that this PR does not touch. Not run with a title or a GPU. AI-assisted: Claude Code (Claude Sonnet 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
`load_title_dlls` and `load_title_dll` take the title folders in search
order. `run` passes the executable's folder first, then `game_dir` (once if
they are the same folder). MicrosoftGame.config is read from beside the
executable, else from `game_dir`, and G: is mounted where it is found; the
startup archive check searches the same folders. A single folder behaves as
before, and a DLL in both folders comes from the executable's.

Fixes #3336.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:52:59 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 19:48 UTC · original · approved these changes

LGTM — verified on Windows against origin/main (63bcca4).

  • Searching title DLLs, manifest, and data folders in order cleanly supports separated exe/data layouts while preserving single-folder behavior.
  • cargo test -p victory-loader -p victory -- --test-threads=1: all passed (17 victory unit + 4 integration, 36 victory-loader unit + 5 integration, including layout_tests::*, search::tests::the_first_folder_that_has_the_file_wins, and title_dlls_are_searched_in_folder_order).
  • cargo clippy -p victory-loader -p victory --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 19:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/3350#pullrequestreview-6079745964) · **approved these changes** LGTM — verified on Windows against `origin/main` (`63bcca4`). - Searching title DLLs, manifest, and data folders in order cleanly supports separated exe/data layouts while preserving single-folder behavior. - `cargo test -p victory-loader -p victory -- --test-threads=1`: all passed (17 `victory` unit + 4 integration, 36 `victory-loader` unit + 5 integration, including `layout_tests::*`, `search::tests::the_first_folder_that_has_the_file_wins`, and `title_dlls_are_searched_in_folder_order`). - `cargo clippy -p victory-loader -p victory --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
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/3350/head:github-bot/gh-3350'
git switch 'github-bot/gh-3350'

Merge

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