chore: remove the Python builder, the MSI and the Linux parts lists, which no release builds or uses #171

Merged
HumanBean merged 1 commit from HumanBean/Longshot:chore/remove-old-build-leftovers into main 2026-11-13 09:34:46 +00:00
Owner

Why

Longshot still carries parts of Hookshot's old build and release system that no workflow builds and no release or install uses: a second Windows builder written in Python, a WiX MSI, and the Linux "parts list" delta format. About 4,300 lines nobody runs make it harder to see how a release really reaches a player, so this removes them.

This removes the Python builder (builder/py). It is approved, but veto here if it should stay.

What changed

Callers checked with grep over builder/, nx2/, scripts/, tests/, docs/, .forgejo/, website/ and LongshotLauncher's Core/, App/ and tests/. What a player installs today, which none of this is part of: the launcher downloads the release's LongshotBuilder-<v>-windows-x64.zip plus the tools of its tools.lock, or Longshot-<v>-x86_64.AppImage plus the tools of the tools.lock inside it (docs/releases.md, How the launcher reads it).

  • The Python builder, removed (builder/py/, 18 files: the PySide6 window, setup_parts.py, updater.py, the Inter fonts and icons, gen_strings.py, shots.py; plus scripts/make_py_builder.py). Why it's dead:

    • no workflow runs make_py_builder.py, and no release ships its zip (.forgejo/workflows/*.yml, scripts/release.py);
    • its first start installed tools only through setup_parts.py, which since #161 works only with LONGSHOT_SETUP_LIST;
    • the launcher starts the WPF builder or make_game.py directly, never this one.

    The only other code that knew about it was nx2/make_game.py, which wrote builder_args= into longshot_version.txt from LONGSHOT_BUILDER_ARGS. Only builder/py/longshot_builder/core.py set that variable, and nothing reads builder_args=, so those 3 lines go too. builder= (the WPF builder's LONGSHOT_BUILDER_EXE) stays.

  • builder/setup/setup.c's LONGSHOT_SETUP_LIST path, removed. This is the development download of an "older form" list with part lines: manifest_url, the list download and its retries, and the part line reader.

    • The setup now reads only what the zip carries beside it: tools.lock, VERSION and LongshotBuilder\. That was already the only path a release took.
    • With no part lines left, every part is a tools.lock tool. So the Part struct loses to and tool, and part_folder loses its guess of a folder from a LongshotBuilder-<name>- download name. The unpack in work() also loses its . destination and its llvm-mingw rename branch, which only part lines reached.
    • The tool download keeps its 8 tries.
  • The MSI, removed (builder/msi/LongshotBuilder.wxs): never built by CI and not part of any release. Its mentions went from docs/forgejo-runners.md and docs/development.md's layout table.

  • The Linux parts lists, removed (scripts/linux/make_parts.py, builder/linux/part_links.py): only the launcher's LONGSHOT_LAUNCHER_PARTS read such a list. That hook goes in the launcher's companion PR (MagicBeanDev/LongshotLauncher, same branch name).

    • Checked that nothing real depends on them: scripts/linux/appimage.sh, deps.sh, release.py and the workflows never call them. The sysroot is packed as a tools.lock archive by scripts/tools.py pack.
    • The launcher rebases rooted sysroot links itself (Toolchains.SysrootPart), and keeps doing so.
  • docs/releases.md: the LONGSHOT_LAUNCHER_PARTS line removed. The file is byte-identical with the launcher's, which gets the same edit in its PR (cmp checked).

  • docs/versioning.md: the release-please mention removed (releases use git-cliff and release.py).

  • Tests:

    • Deleted:
      • tests/test_setup_list_names.py: the Python builder's setup_parts reading a LONGSHOT_SETUP_LIST list, both gone.
      • tests/test_builder_py_dlss_update.py: the Python builder's window.py update_build.
    • Trimmed to their WPF halves:
      • tests/test_builder_own_python.py: PythonBuilderTests went.
      • tests/test_builder_update_back.py: the window.py cut-outs went.
      • tests/test_disk_warning.py: test_the_python_builder_asks went.
    • tests/test_no_release_lookup.py: the builder/py sources left its list.
    • tests/test_linux_update.py:
      • test_packaging_refuses_a_sysroot_link_outside_its_root went (make_parts.write_zip).
      • The sysroot round trip keeps its tools.py pack/unpack half.
    • setup.c checks updated to the new source:
      • test_setup_tool_merge.py and test_portable_setup_transaction.py build their Part without to/tool. The transaction's reused part is now a tools.lock tool with dest LongshotBuilder/tools/python.
      • test_setup_tar_diagnostics.py uses a new end marker.
      • test_setup_runtime.py cuts builder_ready up to #define LAUNCHER_DOWNLOAD. The old end marker also pulled in the launcher URL as a "required file", a name Windows cannot create.

Kept on purpose:

  • tools.lock's HookshotBuilder/tools/... prefixes (folders inside Hookshot's archives) and its fallback links to NotRexed/Hookshot's builder-parts release.
  • recomplauncher.json, scripts/windows/dav1d.sh, and everything the release workflow and the launcher use.
  • setup.c's parts.txt (write_parts/reuse_part): it lets an update move unchanged tools over from the installed version.

Flags and settings

Flag What it does Default now Recommendation Helps on Doesn't help on Untested on
None added. Removed: LONGSHOT_SETUP_LIST (the Windows setup's development list) and LONGSHOT_BUILDER_ARGS (set only by the Python builder) - - - - - -

Measurements

main: e7ed2f7a (2026-11-13)
this PR: chore/remove-old-build-leftovers @ 99fae780
Hardware: Ryzen desktop, CachyOS Linux (game-free checks only)
Scene: none, no game run
Method: LONGSHOT_VULKAN_HEADERS=/usr/include python -I -B tests/run_all.py --jobs 6 under nice -n 19 ionice -c3, once on each side (the PC was in use, so one run each, not two). Line counts from jj diff --stat. Nothing here is a performance change.
How to reproduce: the same command in a checkout of each commit

main @ e7ed2f7a this PR @ 99fae780
run_all.py (one run each) 500 passed, 2 failed, 36 skipped 498 passed, 2 failed, 36 skipped
lines, whole diff (39 files) +32 / -4320
lines, builder/ (of which builder/py -3639) +18 / -3798
lines, tests/ +11 / -312
LongshotBuilder-Setup.exe, llvm-mingw 20261104, -O2 195072 bytes 190976 bytes
main @ e7ed2f7a:        500 passed, 2 failed, 36 skipped in 102 s (linux, 6 at once)
this PR @ 99fae780:     498 passed, 2 failed, 36 skipped in 96 s (linux, 6 at once)
FAIL  tests/test_bake_portability.py      (both: no zstandard module on this PC)
FAIL  tests/test_builder_log_read_only.py (both: no Tk on this PC)
498 = 500 - test_setup_list_names.py - test_builder_py_dlss_update.py

Testing

Tested:

  • The whole game-free suite on Linux, once on main and once on this PR: the same two failures on both, nothing else.
  • setup.c compiled on both sides with tools.lock's llvm-mingw (scripts/builder_package.py llvm-mingw --host linux, the CI command line plus -Wall, no warnings). The exe no longer holds LONGSHOT_SETUP_LIST.
  • The setup.c checks that run on Linux pass: test_setup_tool_merge.py and test_setup_tar_diagnostics.py (16 cases).
  • The Windows-only setup.c checks compile with llvm-mingw, but can't run here (no Windows, no Wine): test_portable_setup_transaction.py, test_portable_setup_start.py, test_setup_runtime.py, test_setup_runtime_paths.py and test_portable_setup_paths.py.
  • The changed checks alone: test_linux_update.py, test_no_release_lookup.py, test_builder_own_python.py, test_builder_update_back.py and test_disk_warning.py.
  • LongshotLauncher's core checks (tests/test_launcher_core.py --strict --longshot <this branch>) pass against this branch with the companion PR.

Not tested:

  • The Windows setup on Windows, i.e. a real install of a release zip: nothing changed in its zip path, but the Part struct and the unpack lost their non-tool branches.
  • The Windows-only setup checks' runs.
  • The WPF builder was not rebuilt, because nothing in builder/LongshotBuilder changed.
  • No game run: nothing here touches the game or the renderer.

Needs other testers:

  • Windows: unpack a release's LongshotBuilder zip built from this commit and start LongshotBuilder.exe with an empty %LOCALAPPDATA%\LongshotBuilder, then again after a version bump, expecting each tools.lock tool downloaded, placed and (the second time) kept from the installed version, and the builder starting (request to open)

Screenshots

Nothing on screen.

Risk and rollback

A Windows setup that still met a non-tool part would now refuse it or unpack it as a tool. Only a LONGSHOT_SETUP_LIST list (development) ever had part lines; the release zip's tools.lock has only tool lines (11 today).

Reverting the commit restores everything. Nothing is migrated or deleted on players' PCs.

Reviewer notes

Start with builder/setup/setup.c's work() and part_folder, then the trimmed tests. In the launcher PR, Core/ToolsLock.cs now holds Part/PartsList.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above).
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Here one run each, as asked while the PC was in use: see Method.)
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • Flags noted, and the switch reference updated (docs/development.md, the README).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
## Why Longshot still carries parts of Hookshot's old build and release system that no workflow builds and no release or install uses: a second Windows builder written in Python, a WiX MSI, and the Linux "parts list" delta format. About 4,300 lines nobody runs make it harder to see how a release really reaches a player, so this removes them. **This removes the Python builder** (`builder/py`). It is approved, but veto here if it should stay. ## What changed Callers checked with grep over `builder/`, `nx2/`, `scripts/`, `tests/`, `docs/`, `.forgejo/`, `website/` and LongshotLauncher's `Core/`, `App/` and `tests/`. What a player installs today, which none of this is part of: the launcher downloads the release's `LongshotBuilder-<v>-windows-x64.zip` plus the tools of its `tools.lock`, or `Longshot-<v>-x86_64.AppImage` plus the tools of the `tools.lock` inside it (docs/releases.md, *How the launcher reads it*). - **The Python builder, removed** (`builder/py/`, 18 files: the PySide6 window, `setup_parts.py`, `updater.py`, the Inter fonts and icons, `gen_strings.py`, `shots.py`; plus `scripts/make_py_builder.py`). Why it's dead: - no workflow runs `make_py_builder.py`, and no release ships its zip (`.forgejo/workflows/*.yml`, `scripts/release.py`); - its first start installed tools only through `setup_parts.py`, which since #161 works only with `LONGSHOT_SETUP_LIST`; - the launcher starts the WPF builder or `make_game.py` directly, never this one. The only other code that knew about it was `nx2/make_game.py`, which wrote `builder_args=` into `longshot_version.txt` from `LONGSHOT_BUILDER_ARGS`. Only `builder/py/longshot_builder/core.py` set that variable, and nothing reads `builder_args=`, so those 3 lines go too. `builder=` (the WPF builder's `LONGSHOT_BUILDER_EXE`) stays. - **`builder/setup/setup.c`'s `LONGSHOT_SETUP_LIST` path, removed.** This is the development download of an "older form" list with `part` lines: `manifest_url`, the list download and its retries, and the `part` line reader. - The setup now reads only what the zip carries beside it: `tools.lock`, `VERSION` and `LongshotBuilder\`. That was already the only path a release took. - With no `part` lines left, every part is a `tools.lock` tool. So the `Part` struct loses `to` and `tool`, and `part_folder` loses its guess of a folder from a `LongshotBuilder-<name>-` download name. The unpack in `work()` also loses its `.` destination and its llvm-mingw rename branch, which only `part` lines reached. - The tool download keeps its 8 tries. - **The MSI, removed** (`builder/msi/LongshotBuilder.wxs`): never built by CI and not part of any release. Its mentions went from `docs/forgejo-runners.md` and `docs/development.md`'s layout table. - **The Linux parts lists, removed** (`scripts/linux/make_parts.py`, `builder/linux/part_links.py`): only the launcher's `LONGSHOT_LAUNCHER_PARTS` read such a list. That hook goes in the launcher's companion PR (MagicBeanDev/LongshotLauncher, same branch name). - Checked that nothing real depends on them: `scripts/linux/appimage.sh`, `deps.sh`, `release.py` and the workflows never call them. The sysroot is packed as a `tools.lock` archive by `scripts/tools.py pack`. - The launcher rebases rooted sysroot links itself (`Toolchains.SysrootPart`), and keeps doing so. - **`docs/releases.md`**: the `LONGSHOT_LAUNCHER_PARTS` line removed. The file is byte-identical with the launcher's, which gets the same edit in its PR (`cmp` checked). - **`docs/versioning.md`**: the release-please mention removed (releases use git-cliff and `release.py`). - **Tests**: - Deleted: - `tests/test_setup_list_names.py`: the Python builder's `setup_parts` reading a `LONGSHOT_SETUP_LIST` list, both gone. - `tests/test_builder_py_dlss_update.py`: the Python builder's `window.py` `update_build`. - Trimmed to their WPF halves: - `tests/test_builder_own_python.py`: `PythonBuilderTests` went. - `tests/test_builder_update_back.py`: the `window.py` cut-outs went. - `tests/test_disk_warning.py`: `test_the_python_builder_asks` went. - `tests/test_no_release_lookup.py`: the `builder/py` sources left its list. - `tests/test_linux_update.py`: - `test_packaging_refuses_a_sysroot_link_outside_its_root` went (`make_parts.write_zip`). - The sysroot round trip keeps its `tools.py pack`/`unpack` half. - `setup.c` checks updated to the new source: - `test_setup_tool_merge.py` and `test_portable_setup_transaction.py` build their `Part` without `to`/`tool`. The transaction's reused part is now a `tools.lock` tool with dest `LongshotBuilder/tools/python`. - `test_setup_tar_diagnostics.py` uses a new end marker. - `test_setup_runtime.py` cuts `builder_ready` up to `#define LAUNCHER_DOWNLOAD`. The old end marker also pulled in the launcher URL as a "required file", a name Windows cannot create. Kept on purpose: - `tools.lock`'s `HookshotBuilder/tools/...` prefixes (folders inside Hookshot's archives) and its fallback links to NotRexed/Hookshot's `builder-parts` release. - `recomplauncher.json`, `scripts/windows/dav1d.sh`, and everything the release workflow and the launcher use. - `setup.c`'s `parts.txt` (`write_parts`/`reuse_part`): it lets an update move unchanged tools over from the installed version. ## Flags and settings | Flag | What it does | Default now | Recommendation | Helps on | Doesn't help on | Untested on | |---|---|---|---|---|---|---| | None added. Removed: `LONGSHOT_SETUP_LIST` (the Windows setup's development list) and `LONGSHOT_BUILDER_ARGS` (set only by the Python builder) | - | - | - | - | - | - | ## Measurements main: e7ed2f7a (2026-11-13) this PR: chore/remove-old-build-leftovers @ 99fae780 Hardware: Ryzen desktop, CachyOS Linux (game-free checks only) Scene: none, no game run Method: `LONGSHOT_VULKAN_HEADERS=/usr/include python -I -B tests/run_all.py --jobs 6` under `nice -n 19 ionice -c3`, **once on each side** (the PC was in use, so one run each, not two). Line counts from `jj diff --stat`. Nothing here is a performance change. How to reproduce: the same command in a checkout of each commit | | main @ e7ed2f7a | this PR @ 99fae780 | |---|---|---| | run_all.py (one run each) | 500 passed, 2 failed, 36 skipped | 498 passed, 2 failed, 36 skipped | | lines, whole diff (39 files) | | +32 / -4320 | | lines, `builder/` (of which `builder/py` -3639) | | +18 / -3798 | | lines, `tests/` | | +11 / -312 | | `LongshotBuilder-Setup.exe`, llvm-mingw 20261104, -O2 | 195072 bytes | 190976 bytes | ``` main @ e7ed2f7a: 500 passed, 2 failed, 36 skipped in 102 s (linux, 6 at once) this PR @ 99fae780: 498 passed, 2 failed, 36 skipped in 96 s (linux, 6 at once) FAIL tests/test_bake_portability.py (both: no zstandard module on this PC) FAIL tests/test_builder_log_read_only.py (both: no Tk on this PC) 498 = 500 - test_setup_list_names.py - test_builder_py_dlss_update.py ``` ## Testing **Tested:** - The whole game-free suite on Linux, once on main and once on this PR: the same two failures on both, nothing else. - `setup.c` compiled on both sides with tools.lock's llvm-mingw (`scripts/builder_package.py llvm-mingw --host linux`, the CI command line plus `-Wall`, no warnings). The exe no longer holds `LONGSHOT_SETUP_LIST`. - The `setup.c` checks that run on Linux pass: `test_setup_tool_merge.py` and `test_setup_tar_diagnostics.py` (16 cases). - The Windows-only `setup.c` checks compile with llvm-mingw, but can't run here (no Windows, no Wine): `test_portable_setup_transaction.py`, `test_portable_setup_start.py`, `test_setup_runtime.py`, `test_setup_runtime_paths.py` and `test_portable_setup_paths.py`. - The changed checks alone: `test_linux_update.py`, `test_no_release_lookup.py`, `test_builder_own_python.py`, `test_builder_update_back.py` and `test_disk_warning.py`. - LongshotLauncher's core checks (`tests/test_launcher_core.py --strict --longshot <this branch>`) pass against this branch with the companion PR. **Not tested:** - The Windows setup on Windows, i.e. a real install of a release zip: nothing changed in its zip path, but the `Part` struct and the unpack lost their non-tool branches. - The Windows-only setup checks' runs. - The WPF builder was not rebuilt, because nothing in `builder/LongshotBuilder` changed. - No game run: nothing here touches the game or the renderer. **Needs other testers:** - Windows: unpack a release's LongshotBuilder zip built from this commit and start `LongshotBuilder.exe` with an empty `%LOCALAPPDATA%\LongshotBuilder`, then again after a version bump, expecting each tools.lock tool downloaded, placed and (the second time) kept from the installed version, and the builder starting (request to open) ## Screenshots Nothing on screen. ## Risk and rollback A Windows setup that still met a non-tool part would now refuse it or unpack it as a tool. Only a `LONGSHOT_SETUP_LIST` list (development) ever had `part` lines; the release zip's `tools.lock` has only `tool` lines (11 today). Reverting the commit restores everything. Nothing is migrated or deleted on players' PCs. ## Reviewer notes Start with `builder/setup/setup.c`'s `work()` and `part_folder`, then the trimmed tests. In the launcher PR, `Core/ToolsLock.cs` now holds `Part`/`PartsList`. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [x] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. (Here one run each, as asked while the PC was in use: see Method.) - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] Flags noted, and the switch reference updated (docs/development.md, the README). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated.
chore: remove the Python builder, the MSI and the Linux parts lists, which no release builds or uses
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 13s
PR description / Description follows the template (pull_request_target) Successful in 8s
99fae780e2
The Python builder (builder/py, scripts/make_py_builder.py), the WiX MSI (builder/msi), the Linux parts list maker
(scripts/linux/make_parts.py, builder/linux/part_links.py) and setup.c's LONGSHOT_SETUP_LIST path: no workflow builds
them and no release or install reads them. Their tests go with them; the checks of what stays keep running.
HumanBean changed title from WIP: chore: remove the Python builder, the MSI and the Linux parts lists, which no release builds or uses to chore: remove the Python builder, the MSI and the Linux parts lists, which no release builds or uses 2026-11-13 09:31:49 +00:00
HumanBean deleted branch chore/remove-old-build-leftovers 2026-11-13 09:34:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
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
MagicBeanDev/Longshot!171
No description provided.