WIP: feat(versions): install a version from a release's offline builder, and build with tools.lock's llvm #256

Closed
HumanBean wants to merge 2 commits from HumanBean/LongshotLauncher:feat/offline-builders into main
Owner

Summary

The Launcher side of Longshot's #2295, which renames the
Linux compiler tool from emsdk to llvm and adds offline builders to each release.

  • llvm: Core/MakeGameCommand.cs gives a Linux build LONGSHOT_LLVM=<lib>/llvm when the version has it, else
    EMSDK=<lib>/emsdk as before, and takes the other one out, so the PC's own is never used. Core/ShaderCaches.cs
    keys an llvm version's shader caches by the llvm folder and an emsdk version's exactly as before (they keep sharing).
    tests/test_launcher_core.py --longshot takes either list.
  • Install from an offline builder: "Install from an offline builder…" on the home (beside "Add a build folder…",
    and "No internet? …" on an empty home) takes LongshotBuilder-<v>-windows-x64-offline.zip or
    Longshot-<v>-offline-x86_64.AppImage, with the release's SHA256SUMS and SHA256SUMS.sig beside it.
    Core/OfflineBuilder.cs checks the signature with the launcher's release keys, then the file's SHA-256 against the
    signed list (which gives its version), then installs it through the usual wizard. Windows takes each tool from the zip's
    tools/<sha256>.zip, checked against tools.lock. Linux takes the tools the AppImage carries at their dests (recorded as
    their parts, so the next version reuses them). Nothing goes to the network: a part the file lacks fails.

Read first: Core/OfflineBuilder.cs, Core/Toolchains.cs (the carried tools, the zip's tools/ skipped),
App/ViewModels/HomeViewModel.cs.

Testing

Tested: dotnet build LongshotLauncher.slnx (0 warnings) and the core checks compiled, on Linux (CachyOS). Not run:
no checks run on this PC (the maintainer's rule), and the app hasn't been started.

Still to test:

  • Linux: install a version from Longshot-<v>-offline-x86_64.AppImage with the network off, expecting it to install,
    build and play, and the next downloaded version to reuse its tools (by hand, once #2295's first release has the file)
  • Windows: the same with LongshotBuilder-<v>-windows-x64-offline.zip (by hand)
  • A Linux version from before #2295 (emsdk) still builds, and one after it (llvm) does (by hand)

Risks

  • A Linux version's shader cache key changes once, between an emsdk version and an llvm one: its caches are prepared
    again once. Different compilers, so correct.
  • New texts are in English until translated.
  • Revert is enough.

🤖 Generated with Claude Code

## Summary The Launcher side of Longshot's [#2295](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2295), which renames the Linux compiler tool from `emsdk` to `llvm` and adds offline builders to each release. - **llvm:** `Core/MakeGameCommand.cs` gives a Linux build `LONGSHOT_LLVM=<lib>/llvm` when the version has it, else `EMSDK=<lib>/emsdk` as before, and takes the other one out, so the PC's own is never used. `Core/ShaderCaches.cs` keys an llvm version's shader caches by the llvm folder and an emsdk version's exactly as before (they keep sharing). `tests/test_launcher_core.py --longshot` takes either list. - **Install from an offline builder:** "Install from an offline builder…" on the home (beside "Add a build folder…", and "No internet? …" on an empty home) takes `LongshotBuilder-<v>-windows-x64-offline.zip` or `Longshot-<v>-offline-x86_64.AppImage`, with the release's `SHA256SUMS` and `SHA256SUMS.sig` beside it. `Core/OfflineBuilder.cs` checks the signature with the launcher's release keys, then the file's SHA-256 against the signed list (which gives its version), then installs it through the usual wizard. Windows takes each tool from the zip's `tools/<sha256>.zip`, checked against tools.lock. Linux takes the tools the AppImage carries at their dests (recorded as their parts, so the next version reuses them). Nothing goes to the network: a part the file lacks fails. Read first: `Core/OfflineBuilder.cs`, `Core/Toolchains.cs` (the `carried` tools, the zip's `tools/` skipped), `App/ViewModels/HomeViewModel.cs`. ## Testing **Tested:** `dotnet build LongshotLauncher.slnx` (0 warnings) and the core checks compiled, on Linux (CachyOS). Not run: no checks run on this PC (the maintainer's rule), and the app hasn't been started. **Still to test:** - Linux: install a version from `Longshot-<v>-offline-x86_64.AppImage` with the network off, expecting it to install, build and play, and the next downloaded version to reuse its tools (by hand, once #2295's first release has the file) - Windows: the same with `LongshotBuilder-<v>-windows-x64-offline.zip` (by hand) - A Linux version from before #2295 (emsdk) still builds, and one after it (llvm) does (by hand) ## Risks - A Linux version's shader cache key changes once, between an emsdk version and an llvm one: its caches are prepared again once. Different compilers, so correct. - New texts are in English until translated. - Revert is enough. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Longshot's Linux compiler tool is now llvm (usr/lib/longshot/llvm, an LLVM
release's layout), read from LONGSHOT_LLVM; released versions keep emsdk.
MakeGameCommand gives the build whichever the version has and takes the
other out. ShaderCaches keys a version with llvm on it (LinuxCompiler) and
one with emsdk as before (LinuxEmsdkCompiler), so older versions keep
sharing their caches; the --longshot contract check takes either list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
feat(versions): install a version from a release's offline builder, with nothing downloaded
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
6600cde55a
A PC with no connection could not install Longshot: each release now has an
offline builder with every build tool inside, and the launcher imports it.
Home's Install from an offline builder... picks the file; the release's
SHA256SUMS and SHA256SUMS.sig must be beside it. The list's signature is
checked with the launcher's keys and the file's SHA-256 must be the one the
list gives an offline builder's name for this system, which names the
version (Core/OfflineBuilder.cs). The wizard then installs that version as a
download would (ToolsSource, Toolchains), each part read from the file and
checked again: Windows, the zip without its tools/ and each tool from its
tools/<sha256>.zip against the tools.lock inside the checked zip; Linux, the
AppImage copied and checked, unpacked with the tools it carries, which are
recorded as their tools.lock parts for reuse and the shader caches' key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

Replaced by #257: the builder now owns its build tools (Longshot #2295's refactor), so the Launcher installs only the builder; the offline import and the llvm fix are carried over there.

Replaced by https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/257: the builder now owns its build tools (Longshot #2295's refactor), so the Launcher installs only the builder; the offline import and the llvm fix are carried over there.
Author
Owner

Closed in favour of #257.

Closed in favour of #257.
HumanBean closed this pull request 2026-11-22 21:06:28 +00:00
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s

Pull request closed

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/LongshotLauncher!256
No description provided.