docs: honor CARGO_TARGET_DIR in Windows build examples #3240

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

@⁠Linshi7766 on GitHub · 2026-11-26 14:18 UTC · original
Linshi7766:docs/windows-cargo-target-dir → main · +9 −3 · 1 files · 1 commits · open

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 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.

**@⁠Linshi7766** on GitHub · 2026-11-26 14:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/3240) `Linshi7766:docs/windows-cargo-target-dir` → `main` · +9 −3 · 1 files · 1 commits · open ## 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 in #1633](https://git.gtahub.st/github/Marvisak--VIctory/issues/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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:27:11 +00:00
Author
Owner

@⁠Desamodeth on GitHub · 2026-11-26 18:17 UTC · original · reviewed

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** on GitHub · 2026-11-26 18:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/3240#pullrequestreview-6078875078) · **reviewed** 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.
@ -95,0 +93,4 @@
$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
Author
Owner

@⁠Desamodeth on GitHub · 2026-11-26 18:17 UTC · original

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
**@⁠Desamodeth** on GitHub · 2026-11-26 18:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/3240#discussion_r4712128509) 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 ```
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/3240/head:github-bot/gh-3240'
git switch 'github-bot/gh-3240'

Merge

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