docs: honor CARGO_TARGET_DIR in Windows build examples #3238

Open
Linshi7766 wants to merge 2 commits from upstream-pr/3240 into main
Linshi7766 commented 2026-11-26 14:18:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Linshi7766 on 2026-11-26T14:18:01Z.


Summary

Follow up on #2044. After setting CARGO_TARGET_DIR as recommended, the
Windows release examples still point to target\release\victory.exe.
Resolve the executable path from CARGO_TARGET_DIR, with target as
the default, and document where the diag build puts the executable.

Coordination claim NEW-457 in #1633

Verification

  • Ran the README's path-resolution lines in Windows PowerShell with the
    variable unset, set to C:\vt, and set to a path containing spaces.
    All three resolved to the expected release executable path.
  • Checked that both release examples use that path and that the
    diagnostic output path matches the diag profile in Cargo.toml.
  • git diff --check passed.

Local verification was limited to the documentation and path resolution.

AI assistance

OpenAI Codex investigated the issue, prepared the README change, ran the
checks above, and drafted this PR.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5511672826 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240). Originally posted by [Linshi7766](https://github.com/Linshi7766) on 2026-11-26T14:18:01Z. --- ## Summary Follow up on #2044. After setting `CARGO_TARGET_DIR` as recommended, the Windows release examples still point to `target\release\victory.exe`. Resolve the executable path from `CARGO_TARGET_DIR`, with `target` as the default, and document where the `diag` build puts the executable. [Coordination claim NEW-457 in #1633](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7194370171) ## Verification - Ran the README's path-resolution lines in Windows PowerShell with the variable unset, set to `C:\vt`, and set to a path containing spaces. All three resolved to the expected release executable path. - Checked that both release examples use that path and that the diagnostic output path matches the `diag` profile in `Cargo.toml`. - `git diff --check` passed. Local verification was limited to the documentation and path resolution. ## AI assistance OpenAI Codex investigated the issue, prepared the README change, ran the checks above, and drafted this PR.
Desamodeth commented 2026-11-26 18:17:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Desamodeth on 2026-11-26T18:17:03Z.

Review: COMMENTED


Tested 9a8a4cd on Windows PowerShell 5.1 and PowerShell 7.6 with a console executable that prints its own path and arguments. With a stale copy in target\release, both README commands on the PR launched the configured build for relative and absolute CARGO_TARGET_DIR paths containing spaces. The main-branch example launched the stale copy in both cases. With the variable unset, both versions used target\release.

One small fix for game paths with spaces is attached. CPU-only, synthetic paths, no game data. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:review:6078875078 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240#pullrequestreview-6078875078). Originally posted by [Desamodeth](https://github.com/Desamodeth) on 2026-11-26T18:17:03Z. **Review:** COMMENTED --- Tested `9a8a4cd` on Windows PowerShell 5.1 and PowerShell 7.6 with a console executable that prints its own path and arguments. With a stale copy in `target\release`, both README commands on the PR launched the configured build for relative and absolute `CARGO_TARGET_DIR` paths containing spaces. The main-branch example launched the stale copy in both cases. With the variable unset, both versions used `target\release`. One small fix for game paths with spaces is attached. CPU-only, synthetic paths, no game data. AI-assisted with Codex.
Desamodeth commented 2026-11-26 18:17:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Desamodeth on 2026-11-26T18:17:04Z.

Code review location: README.md; line 96

@@ -90,8 +90,10 @@ Run the title:
 
 ```powershell
 cargo build --release -p victory
-target\release\victory.exe translate --cache --pipelines <game dir>\shaders.rpf <game dir>\<the title's exe> <game dir>\XboxBvhBuilder.dll <game dir>\amd_fidelityfx_upscaler_xbox.dll
-target\release\victory.exe run <game dir>\<the title's exe> --execute
+$targetDir = if ($env:CARGO_TARGET_DIR) { $env:CARGO_TARGET_DIR } else { '.\target' }
+$victory = Join-Path $targetDir 'release\victory.exe'
+& $victory translate --cache --pipelines <game dir>\shaders.rpf <game dir>\<the title's exe> <game dir>\XboxBvhBuilder.dll <game dir>\amd_fidelityfx_upscaler_xbox.dll
+& $victory run <game dir>\<the title's exe> --execute

Substituting C:\Games\Fixture Game for the directory splits each input path into two arguments. This also happens on main. With the quotes below, the probe received all four translate input paths intact and a single executable path for run in both shells.

& $victory translate --cache --pipelines "<game dir>\shaders.rpf" "<game dir>\<the title's exe>" "<game dir>\XboxBvhBuilder.dll" "<game dir>\amd_fidelityfx_upscaler_xbox.dll"
& $victory run "<game dir>\<the title's exe>" --execute
<!-- greyfinch-sync:Marvisak/VIctory:review-comment:4712128509 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240#discussion_r4712128509). Originally posted by [Desamodeth](https://github.com/Desamodeth) on 2026-11-26T18:17:04Z. **Code review location:** `README.md`; line 96 ~~~~diff @@ -90,8 +90,10 @@ Run the title: ```powershell cargo build --release -p victory -target\release\victory.exe translate --cache --pipelines <game dir>\shaders.rpf <game dir>\<the title's exe> <game dir>\XboxBvhBuilder.dll <game dir>\amd_fidelityfx_upscaler_xbox.dll -target\release\victory.exe run <game dir>\<the title's exe> --execute +$targetDir = if ($env:CARGO_TARGET_DIR) { $env:CARGO_TARGET_DIR } else { '.\target' } +$victory = Join-Path $targetDir 'release\victory.exe' +& $victory translate --cache --pipelines <game dir>\shaders.rpf <game dir>\<the title's exe> <game dir>\XboxBvhBuilder.dll <game dir>\amd_fidelityfx_upscaler_xbox.dll +& $victory run <game dir>\<the title's exe> --execute ~~~~ --- Substituting `C:\Games\Fixture Game` for the directory splits each input path into two arguments. This also happens on main. With the quotes below, the probe received all four `translate` input paths intact and a single executable path for `run` in both shells. ```suggestion & $victory translate --cache --pipelines "<game dir>\shaders.rpf" "<game dir>\<the title's exe>" "<game dir>\XboxBvhBuilder.dll" "<game dir>\amd_fidelityfx_upscaler_xbox.dll" & $victory run "<game dir>\<the title's exe>" --execute ```
Jackster commented 2026-11-26 22:55:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T22:55:29Z.


Windows 11, 63bcca4 + this PR:

  • With CARGO_TARGET_DIR set (which is how this machine builds), the new $targetDir/Join-Path lines parse, and cargo build --profile diag -p victory --features diagnostics puts the executable at <CARGO_TARGET_DIR>\diag\victory.exe — so the new note is correct here.
  • Of the four PowerShell blocks in the README, three parse. The one that does not is the title-run example and it fails only on the <game dir> placeholders, which are not valid PowerShell and were there before this PR.

So the change matches what the build actually does on Windows. Docs only. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205102404 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240#issuecomment-7205102404). Originally posted by [Jackster](https://github.com/Jackster) on 2026-11-26T22:55:29Z. --- Windows 11, `63bcca4` + this PR: - With `CARGO_TARGET_DIR` set (which is how this machine builds), the new `$targetDir`/`Join-Path` lines parse, and `cargo build --profile diag -p victory --features diagnostics` puts the executable at `<CARGO_TARGET_DIR>\diag\victory.exe` — so the new note is correct here. - Of the four PowerShell blocks in the README, three parse. The one that does not is the title-run example and it fails only on the `<game dir>` placeholders, which are not valid PowerShell and were there before this PR. So the change matches what the build actually does on Windows. Docs only. AI-assisted.
fuzeofficlal commented 2026-11-27 00:05:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T00:05:13Z.

Review: APPROVED


LGTM — cargo xtask policy passes, and verified the PowerShell snippet with $env:CARGO_TARGET_DIR unset (. arget elease ictory.exe), set (C: t elease ictory.exe), and containing spaces (& $victory with Join-Path). The updated diag profile note matches the rest of README.md.

<!-- greyfinch-sync:Marvisak/VIctory:review:6081843332 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240#pullrequestreview-6081843332). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-27T00:05:13Z. **Review:** APPROVED --- LGTM — `cargo xtask policy` passes, and verified the PowerShell snippet with `$env:CARGO_TARGET_DIR` unset (`. arget elease ictory.exe`), set (`C: t elease ictory.exe`), and containing spaces (`& $victory` with `Join-Path`). The updated `diag` profile note matches the rest of `README.md`.
futurepro62 commented 2026-11-27 23:12:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T23:12:40Z.


Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 8192469 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7229960818 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3240#issuecomment-7229960818). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T23:12:40Z. --- Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `8192469` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **866 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/3240:upstream-pr/3240'
git switch 'upstream-pr/3240'

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/3240'
git switch 'upstream-pr/3240'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3240'
git switch 'upstream-pr/3240'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3240'
git switch 'main'
git merge --squash 'upstream-pr/3240'
git switch 'main'
git merge --ff-only 'upstream-pr/3240'
git switch 'main'
git merge 'upstream-pr/3240'
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
Marvisak/VIctory!3238
No description provided.