fix: the setup merges the third-party tool into the builder's third_party, and the Hookshot item is back #117
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/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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!117
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/rc1-third-party-hookshot"
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
The Windows setup cannot install the
third-partybuild tool, because the builder zip already has the folder that tool is supposed to become, so the first Windows release (v3.0.0-rc.1) would not install. Also, the rename to Longshot renamed the game's Hookshot item to Longshot, so the Debug tab's inventory has two Longshots and no Hookshot.What changed
place_tool()inbuilder/setup/setup.cputs a tool's unpacked<prefix>folder at its<dest>. If nothing is there, it moves the folder whole, as before. If the builder zip already has the folder (LongshotBuilder\tools\third_party, the repository's sources), it moves the tool's files in one by one. It refuses a file both sides have (it never replaces one), a file where the other side has a folder, and links. The SHA-256 check still runs first, before anything is unpacked. All of this happens in the stagedversions\<tag>.part, which is only published once complete, so a refusal never leaves a partial install.reuse_part()no longer moves or copies an installed version's tool folder onto a folder the staged install already has. That folder holds the old version's sources as well as the tool's files. In a portable home, the failed copy'srmtree(to)used to delete the new version'sthird_partysources. So the merged tool now comes from its checked archive on every install (26 MB). The other tools are still reused.gpu/vk/oot_cheat_items.hgets backOOT_ITEM("Hookshot", "Item_Hookshot", 0)and the probeWeapon_Range_Hookshot, as beforee2a4d453. That commit had turned them into a second Longshot row and a secondWeapon_Range_Longshot.scripts/release.py's docstrings no longer mention "the tools release", and the unusedTOOLS_TAGconstant is gone. The build tools are generic packages now. The file is still byte-identical with LongshotLauncher's (MagicBeanDev/LongshotLauncher#6).docs/releases.md, "Installing", says a tool merges into a<dest>the builder already has. The launcher PR makes the same edit, so the file stays identical in both repositories.tests/test_setup_tool_merge.pyandtests/test_cheat_items.py(below).The sweep for the Hookshot item: I compared every line of
e2a4d453that lost a "Hookshot" (git diff e2a4d453^ e2a4d453, and the tree ate2a4d453^). I looked at the item and cheat tables, menu texts,gpu/vk/menu_i18n.h, teleport and inventory lists,nx2/patches,host/, docs, the pipeline tour and tests. The only places where "Hookshot" meant the in-game item were the two lines inoot_cheat_items.h. The inventory's item labels are English only:menu_i18n.hhas no item names, so there is no translation to restore. Every other "Hookshot" the rename changed meant the project, and stays Longshot.Flags and settings
None.
Measurements
No measurement: this changes the Windows setup's install step, a Debug-tab item row and comments. None of them run while the game plays.
main:
94bbc205(2026-11-12)this PR: fix/rc1-third-party-hookshot @
8264bb7cHardware: not applicable (no frame time or memory is affected)
Scene: not applicable
Method: the game-free checks (Testing)
How to reproduce:
LONGSHOT_VULKAN_HEADERS=/usr/include python -I -B tests/run_all.py94bbc2058264bb7ctests/test_setup_tool_merge.pyplace_tool)tests/test_cheat_items.pyTesting
Tested:
Linux (CachyOS, x86-64):
tests/run_all.py, two runs each on main and on this branch, alternating. Main: 493 passed, 2 failed both times. This branch: 495 passed, 2 failed both times (the 2 new checks pass). Both fail the same two checks,tests/test_bake_portability.pyandtests/test_builder_log_read_only.py, which are known failures on main and outside this change.tests/test_setup_tool_merge.py(new) builds a fake builder zip withscripts/builder_package.py'smake_zip, containingLongshotBuilder/tools/third_party/{a64-kit,sdl2,zbic}sources. It builds a fakethird-partyarchive withscripts/tools.py'sassemble_third_party(the prebuilt files only), and unpacks both the way the setup'star.exewould. It then runs setup.c's ownplace_toolandreuse_part, cut from the source, over them. The cases:<dest>the zip lacks is moved whole.third_partyis not moved or copied onto the new one, and the new one stays whole. It fails on the oldreuse_part: "portable=1: the new version's third_party changed".On Windows the test compiles against
windows.h. On Linux it compiles against a small POSIX stand-in for the Win32 file calls those functions make. There is no Wine on this PC, so the whole setup did not run.tests/test_cheat_items.py(new) expandsoot_cheat_items.hwith the compiler. It checks that no label, pouch name or probe appears twice, that the Hookshot and Longshot rows both exist (Longshot right after Hookshot), and that bothWeapon_Range_*probes exist. Against main's header it reports Longshot,Item_LongshotandWeapon_Range_Longshottwice, and no Hookshot.builder/setup/setup.cbuilds with llvm-mingw 20261104 (x86_64-w64-mingw32-clang -O2 -Wall -Werror -mwindows -municode … -lwinhttp -lbcrypt -lcomctl32 -lshell32 -lole32).Not tested:
third-partypackage. No Windows PC and no Wine here, and there is nov3.0.0-rc.1zip yet.Needs other testers:
LongshotBuilder-<version>-windows-x64.zipbuilt from this branch and runLongshotBuilder.exe. Expected: the setup finishes, andversions\<tag>\LongshotBuilder\tools\third_party\a64-kit\lift\a64emit.dllsits next toa64emit.cpp(request to open, with the first rc build)Screenshots
The only visible change is the Debug tab's inventory, which shows the Hookshot row again, under the same label as before the rename. No screenshot: no game on this PC.
Risk and rollback
assemble third-partyleaves out every file the repository tracks, so that shouldn't happen, and when it does the setup stops with a message instead of replacing the builder's file.third-partytool again (26 MB) instead of reusing it.Reviewer notes
place_tooland the new guard at the top ofreuse_partinbuilder/setup/setup.c.FileMode.CreateNewand reuses a tool by its own files. The launcher PR only adds a check for it, plus the sharedrelease.pyanddocs/releases.mdedits: MagicBeanDev/LongshotLauncher#6 (MagicBeanDev/LongshotLauncher#6).scripts/tools.py installstill keeps an existing<dest>that has no stamp. It is only used on Linux tools and fresh folders (CI,appimage.sh), where nothing overlaps, so I left it alone.Issues
None filed.
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
mainand passing here.WIP: fix: the setup merges the third-party tool into the builder's third_party, and the Hookshot item is backto fix: the setup merges the third-party tool into the builder's third_party, and the Hookshot item is back