refactor(update): the game no longer checks for updates; its folder's launcher does #26

Closed
dyst wants to merge 1 commit from dyst/Longshot:feat/no-game-update-check into main
First-time contributor

Carried over from NotRexed/Hookshot#2926 with the move to Longshot: the same change on Longshot's main, with its rename applied. Its review and discussion are there.

The game folder's launcher already asks GitHub for a newer release before the game starts and offers Update there, so the game's own check only asked a second time, and held the game's start on the network (WinHTTP timeouts up to about 3 s on Windows, curl up to about 8 s on Linux) whenever it was started directly. With updates owned by the launcher, the game no longer needs to check, wait or remember anything about releases.

Change

  • host/hos_update.c removed, and its call in hos_main.c (after the saves' place is set). The game no longer links WinHTTP (nx2/build.py's -lwinhttp); nothing else in host/ or gpu/ used it.
  • Where updates are asked now (unchanged):
    • Windows: Longshot Launcher.exe in the game folder (builder/setup/setup.c launch mode) opens the installed builder with --launch <folder>: Play, and Update when a newer release is out. Portable folders (builder_local=1) are covered there too (portable_home.h).
    • Linux: longshot in the game folder (builder/linux/longshot-folder) starts the builder with --launch <folder>: the same.
    • A bin/longshot(.exe) started by hand, or a development build without a launcher, asks nothing now.
  • longshot_version.txt: builder_args= is no longer written; only the game's check read it. version=, builder= (read by the Linux folder launcher) and builder_local=1 stay.
  • LONGSHOT_NO_UPDATE_CHECK=1 is still set by the launchers and builders' Play: a game folder built before this change still runs its own check without it.
  • Comments that named hos_update.c now name the launcher or the setup.

Testing

  • tests/test_update_tracks.py: compiles the setup's nightly_tag and checks the Linux updater's rules as before; the game's C copy of the rules is gone, and with it its checks. tests/test_linux_update_skip.py (the game's "Skip this version" on Linux) and tests/test_portable_local_builder.py (the game's choice of a portable folder's builder) are removed with the code they compiled.
  • Every check that reads the changed files (98), through run_all.py with the Builder's tools, Windows: 93 pass. The 5 that fail (nx2/test_dll.py, test_driver_cache_folder, test_fpx_sticky, test_linux_update, test_udmabuf_warning) fail the same way on main on this PC.
  • Linux (Docker, python:3.12 with gcc): test_update_tracks, test_linux_update, test_longshot_launch, test_portable_game_home, test_failed_compile_keeps_objects pass.
  • The game, built from this branch, Windows 11 (RTX 3080): it links without WinHTTP (llvm-objdump -p: no winhttp.dll import; no api.github.com in the exe), starts from a save into Kokiri Forest and plays (33-37 fps there, as before), and its log has no update-check lines and no errors.
  • Not tested: the Linux game build (only its checks above).

Docs that describe the game's check (docs/versioning.md, docs/windows-portable-builder.md) are left for a docs change.

Checks on Longshot

Longshot is a fork of GitHub's main with its rename, and nothing here changed in the architecture, so the checks and the in-game runs above were done on the GitHub version: this branch is the same change with the rename applied (the same files and line counts). Forgejo runs no checks; they were not run again here.

🤖 Generated with Claude Code

Carried over from [NotRexed/Hookshot#2926](https://github.com/NotRexed/Hookshot/pull/2926) with the move to Longshot: the same change on Longshot's `main`, with its rename applied. Its review and discussion are there. The game folder's launcher already asks GitHub for a newer release before the game starts and offers Update there, so the game's own check only asked a second time, and held the game's start on the network (WinHTTP timeouts up to about 3 s on Windows, curl up to about 8 s on Linux) whenever it was started directly. With updates owned by the launcher, the game no longer needs to check, wait or remember anything about releases. ## Change - **`host/hos_update.c` removed**, and its call in `hos_main.c` (after the saves' place is set). The game no longer links WinHTTP (`nx2/build.py`'s `-lwinhttp`); nothing else in `host/` or `gpu/` used it. - **Where updates are asked now (unchanged):** - Windows: `Longshot Launcher.exe` in the game folder (`builder/setup/setup.c` launch mode) opens the installed builder with `--launch <folder>`: Play, and Update when a newer release is out. Portable folders (`builder_local=1`) are covered there too (`portable_home.h`). - Linux: `longshot` in the game folder (`builder/linux/longshot-folder`) starts the builder with `--launch <folder>`: the same. - A `bin/longshot(.exe)` started by hand, or a development build without a launcher, asks nothing now. - **`longshot_version.txt`:** `builder_args=` is no longer written; only the game's check read it. `version=`, `builder=` (read by the Linux folder launcher) and `builder_local=1` stay. - **`LONGSHOT_NO_UPDATE_CHECK=1` is still set** by the launchers and builders' Play: a game folder built before this change still runs its own check without it. - Comments that named `hos_update.c` now name the launcher or the setup. ## Testing - **`tests/test_update_tracks.py`:** compiles the setup's `nightly_tag` and checks the Linux updater's rules as before; the game's C copy of the rules is gone, and with it its checks. `tests/test_linux_update_skip.py` (the game's "Skip this version" on Linux) and `tests/test_portable_local_builder.py` (the game's choice of a portable folder's builder) are removed with the code they compiled. - **Every check that reads the changed files (98), through `run_all.py` with the Builder's tools, Windows:** 93 pass. The 5 that fail (`nx2/test_dll.py`, `test_driver_cache_folder`, `test_fpx_sticky`, `test_linux_update`, `test_udmabuf_warning`) fail the same way on `main` on this PC. - **Linux (Docker, python:3.12 with gcc):** `test_update_tracks`, `test_linux_update`, `test_longshot_launch`, `test_portable_game_home`, `test_failed_compile_keeps_objects` pass. - **The game, built from this branch, Windows 11 (RTX 3080):** it links without WinHTTP (`llvm-objdump -p`: no `winhttp.dll` import; no `api.github.com` in the exe), starts from a save into Kokiri Forest and plays (33-37 fps there, as before), and its log has no update-check lines and no errors. - **Not tested:** the Linux game build (only its checks above). Docs that describe the game's check (`docs/versioning.md`, `docs/windows-portable-builder.md`) are left for a docs change. ## Checks on Longshot Longshot is a fork of GitHub's `main` with its rename, and nothing here changed in the architecture, so the checks and the in-game runs above were done on the GitHub version: this branch is the same change with the rename applied (the same files and line counts). Forgejo runs no checks; they were not run again here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Carried over from github.com/jordanella/Hookshot feat/no-game-update-check (its commits: refactor(update): the game no longer checks for updates; its folder's launcher does). Merged with Longshot's
update addresses (NotRexed/Longshot).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
HumanBean closed this pull request 2026-11-12 23:46:06 +00:00
Author
First-time contributor

Back to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.

Back to WIP under #48's process: this was carried over before the new template. Its description will be brought to the template and measured on Longshot (main against this PR, at named commits) when it's wanted for review; ask here if you'd like it sooner.

Pull request closed

Sign in to join this conversation.
No description provided.