fix(release): the Windows zip carries tools/version.txt, so a release's game and builder know their version #149
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!149
Loading…
Reference in a new issue
No description provided.
Delete branch "d4nkn3ss/Longshot:fix/release-tools-version"
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?
Why
A Windows release's game doesn't know which release it is: nightly-34-545618fc's game logs
longshot unknownas the first line oflongshot_log.txt(the line CONTRIBUTING.md asks players to report), writes nolongshot_version.txtinto the game folder, and its Builder has no version to show or to compare for updates.What changed
make_zip()inscripts/builder_package.pywrites the release intoLongshotBuilder/tools/version.txtas well as the top-levelVERSION.nx2/version.py'srelease()and the Builder'sRunner.Version(builder/LongshotBuilder/Runner.cs) read that file; nothing has written it since the Windows zip moved tobuilder_package.py(#13, #99).scripts/check_windows_files.pyrequiresLongshotBuilder/tools/version.txtin the zip and checks it matchesVERSION, so CI catches it if it goes missing again.tests/test_recomplauncher_json.py's zip test lists the file and checks its content.Flags and settings
None
Measurements
main:
39647e1a(2026-11-12)this PR: fix/release-tools-version @
edd30a7aHardware: Windows 11, RTX 3080 10 GB, NVIDIA 621.14; Python 3.12
Scene: the release nightly-34-545618fc installed as a player would (the zip's
LongshotBuilder.exe --cli --nup <file> --out <folder>), then a headless run of the game it builtHow to reproduce: unpack
LongshotBuilder-nightly-34-545618fc-windows-x64.zip, run its setup with--cli, start the game; read the first line oflongshot_log.txtand look forlongshot_version.txtin the game folder39647e1aedd30a7atests/test_recomplauncher_json.py(the zip test, now checkingtools/version.txt)LongshotBuilder/tools/version.txtVERSIONat the top)make_ziplongshot_log.txtlongshot unknown (source 40b30d78)longshot_version.txtTesting
Tested: the zip test on both sides;
tests/test_setup_tool_merge.py(unpacks a fake builder zip frommake_zip) andtests/test_windows_on_linux.pypass. The nightly-34 install and run above, which showed the bug.Full suite:
python -I -B tests/run_all.pyon this branch @edd30a7a, Windows 11: 500 passed, 3 failed, 35 skipped, the same three as main @39647e1a:tests/test_check_third_party.py(#80),tests/test_setup_runtime.py(#118) andtests/test_release.py(#119, #144, #145).Not tested: a release built with this change, end to end: it needs the release workflow. The next nightly will show it: its game's first log line should name the nightly, and the game folder should get
longshot_version.txt.Needs other testers: None
Screenshots
Nothing on screen
Risk and rollback
One more small file in the zip; reverting the commit is enough. If a package folder ever carried its own
tools/version.txt, the walk would put that one in instead (as before for any file it carries).Issues
None
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here. (The zip test, extended.)tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
Reviewed by reading the code (not built or run here). Looks right.
Nit (not blocking): the two files are written from the same value in one dict literal, so it is already one place; no change needed.