Scripts: VICTORY_HOME is kept and followed, as victory.exe does (#751) #774
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!774
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-774"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kibagami-nc on GitHub · 2026-11-28 05:36 UTC · original
kibagami-nc:fix/scripts-keep-victory-home→main· +33 −20 · 4 files · 3 commits · merged 2026-11-29 08:16 UTCFixes the script side of #751, from Jesper-Andersson's finding there.
What happens
play.ps1andplay-foxhound.ps1clear theVICTORY_*switches left over in the window and keep the path settings.VICTORY_HOMEwas not among those kept, so a start through them lost it, and so did a start throughPLAY_FRAMEGEN.cmd. The preload'svictory warmworkers,victory preloadand the game then wrote their caches and saves to%LOCALAPPDATA%\victorywhileVICTORY_HOMEwas set.The launcher itself has kept it since #472 (
KEPTinapps/victory/src/play.rs). The scripts did not.Three paths that the scripts build themselves did not follow it either:
play-foxhound.ps1wrote its log to%LOCALAPPDATA%\victory\logs, while victory.exe writes its own toVICTORY_HOME\logs.play-gta6-framegen.ps1backed up the saves from%LOCALAPPDATA%\victory\data\7952987A. WithVICTORY_HOMEset, it backed up the old folder, if there was one, and printed "Saves backed up and checked". The saves actually in use were not backed up.get-mfg-unlocker.ps1, run by hand, put the mod under%LOCALAPPDATA%. victory.exe passes-Toitself, so its own fetch was already right.The change
play.ps1andplay-foxhound.ps1keep whatKEPTkeeps:VICTORY_HOME,VICTORY_ADAPTER,VICTORY_CONFIG, the four folders andVICTORY_LOG. Every other left-over switch is still cleared.play-foxhound.ps1writes it underVICTORY_HOME\logswhen that is set.play-gta6-framegen.ps1backs up fromVICTORY_DATA_DIR, elseVICTORY_HOME\data, else%LOCALAPPDATA%\victory\data, in the order config.rs uses. It now says when there is nothing to back up. It still does not read adata_dirset invictory.toml.get-mfg-unlocker.ps1defaults toVICTORY_HOME\mfg-unlockerwhen that is set.Tests
A check script, not added to the repository, parses the four scripts. It then takes the changed lines out of the files themselves and runs them under several environments. Every check passed on both Windows PowerShell 5.1 and PowerShell 7.7:
play.ps1andplay-foxhound.ps1keepVICTORY_HOME,VICTORY_ADAPTER,VICTORY_LOGandVICTORY_DATA_DIR, and clear a stale switch.VICTORY_HOME.VICTORY_HOME, and withVICTORY_DATA_DIR, which comes first.VICTORY_HOME, and with-To, which comes first.On
main's scripts, the checks forVICTORY_HOME,VICTORY_ADAPTERandVICTORY_LOGfail.Other checks:
cargo test -p victory --lockedpasses; it embedsget-mfg-unlocker.ps1.cargo test -p xtask --lockedpasses, includingrepository_passes_policy.Not run with the game here.
Review fixes (
1f3fb37,ad778fb6)ANDREANIADS found that a data folder with brackets in its name (
Profile [QA]) was reported missing by the framegen launcher, so its saves were not backed up.play-gta6-framegen.ps1now passes-LiteralPathto its path cmdlets: the save backup (source checks, copy, listing, hashes) and the game-folder search, which missed a folder likeGame [v1.0.2.1]the same way. Checked on six temporary folders in PowerShell 5.1 and 7.7, before and after: see the comment below.ANDREANIADS then found that the check after the copy listed only visible files:
Copy-Item -Recurse -Forcecopies hidden files and the contents of hidden folders, butGet-ChildItemwithout-Forceskips them, so a damaged hidden copy passed. The listing now has-Force(ad778fb6). Checked on Windows with real Hidden attributes, in PowerShell 5.1 and 7.7: 3 of 3 files checked, and a changed hidden copy now fails the check.e14533fca1to7cda80561f@ANDREANIADS on GitHub · 2026-11-28 20:02 UTC · original
At
7cda805, the backup source is selected correctly, but an existing directory namedProfile [QA]is reported missing. I exercised the source selection and existence check inplay-gta6-framegen.ps1using PowerShell 7.4 on Linux and six empty temporary directories. The default,VICTORY_HOME, andVICTORY_DATA_DIRcases all passed withPlain Profileand all three missedProfile [QA].Test-Path -LiteralPath $srcfound all six. Please consider literal paths for both source checks and for the subsequent copy, enumeration and hash operations. This test covered directory detection only. No launcher or real saves were used.@kibagami-nc on GitHub · 2026-11-28 20:09 UTC · original
@ANDREANIADS, thanks, confirmed and fixed in
1f3fb37:play-gta6-framegen.ps1now passes-LiteralPatheverywhere a path could hold brackets:Test-GameDir,game_dir.txtand the drive walk). A game folder named likeGame [v1.0.2.1]was not found either, for the same reason.I reran your case on Windows, on six temporary folders with one save file each: the default,
VICTORY_HOMEandVICTORY_DATA_DIRcases, forPlain ProfileandProfile [QA]. I ran only the backup block, with its destination moved to a temporary folder, and no launcher.Plain ProfileProfile [QA]Test-GameDiron a folderGame [v1.0.2.1]holding the two files it looks for:Falsebefore,Trueafter.@ANDREANIADS on GitHub · 2026-11-28 20:31 UTC · original
One remaining mismatch in the backup block at
1f3fb37:Copy-Item -Forcecopied all three synthetic files (one visible file,.aux, and.nested/child), butGet-ChildItem -LiteralPath $src -Recurse -Fileenumerated only one for hashing. Changing the copied.auxbefore verification still produced “backed up and checked”. Adding-Forceto that single enumeration gave three verified files on a clean copy and a failed check (1 of 3) on the changed copy. Tested with PowerShell 7.4 on Linux in temporary directories. Windows Hidden attributes still need a native check.@kibagami-nc on GitHub · 2026-11-28 20:42 UTC · original
@ANDREANIADS, confirmed on Windows and fixed in
ad778fb6: the listing that the check hashes now has-Force.The native check, on a data folder with one visible save, one file with the Hidden attribute, and a Hidden folder holding a file. Only the backup block ran, with its destination in a temporary folder. In each run, one copy was changed between the copy and the check:
1f3fb37)The results are the same in PowerShell 5.1 and 7.7. So
Copy-Item -Recurse -Forcedoes take hidden files and the contents of hidden folders on Windows, as on Linux, and only the check missed them.