Repository navigation
Auto-update: update dialog, Windows/Linux self-update, macOS Sparkle (nightlies first) - #819
Merged
Merged
Conversation
Every Windows and Linux release file gets a manifest (update-<platform>.txt): its version, platform, size and sha256, and for the zips every app file inside, signed with one Ed25519 key (Monocypher 4.0.2, CC0, vendored in third_party/monocypher). tools/update_sign.cpp makes the key, the manifests and the Sparkle signatures for macOS; tools/update_manifest.sh runs it in release.yml and nightly.yml with the UPDATE_SIGNING_KEY secret, and only warns when the secret is missing, so builds keep shipping without it. nightly.yml also lists the pull requests merged since the previous round under "Changes" in the nightly notes, keeping the last 30 rounds, for the start screen's update dialog. Asset names and tag formats are unchanged; the manifests' names never match a nightly file. Test: tools/test_update.cpp (manifest parse, signature, unsafe paths, swap and rollback). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runtime/update.cpp downloads the platform's manifest and file, checks the signature and every sha256, then swaps only the files the manifest lists (on Windows the data folder is the exe's folder: saves, seeds, settings and game files are never touched), journaled so a swap cut off halfway is undone on the next start. The app restarts into the new version; the old files stay until it reaches the start screen (or boots the game), and a new version that never gets there is rolled back on the next start. Not writable, or not run as an AppImage: Update is off, Download remains. Tests: tools/test_update_e2e.sh runs the AppImage path against a local web server (update, restart, keep, rollback; bad signature, truncated and damaged downloads, wrong platform or version, missing files, read-only folder). Both tests run in CI, the unit test on Windows too. The real public key is still a placeholder until the signing key exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The update link looks as before; clicking it opens a dialog with what's new since this build: the notes of every release skipped (without the warning banner, "Built from" line and sha256 table), or for nightlies the Changes rounds newer than this build. Buttons: Update (Windows and Linux nightlies for now; release builds get it with LARECOMP_UPDATE_RELEASES), Download (the release page, always there) and Back. Phones and tablets: Download only. Test hooks LARECOMP_UPDATE_JSON / LARECOMP_UPDATE_OPEN; changelog tests in tools/test_update_tags.cpp. New strings translated in every table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sparkle 2.10.1 (MIT, tools/fetch_sparkle.sh, pinned sha256) goes into the app as released, its own ad-hoc signatures kept; the app loads it at the start screen and checks once in the background at launch (Sparkle's own schedule is off, so no rechecks while running and no permission prompt). The update dialog's Update button asks Sparkle to check now, which shows Sparkle's own window. Feeds per channel: releases/latest/download/appcast-macOS.xml for releases, releases/download/nightly/appcast-macOS.xml for nightlies, made and EdDSA-signed with the same key as the manifests (tools/sparkle_appcast.sh in release.yml and nightly.yml). Nightly bundle versions now carry their stamp so each round is newer to Sparkle. Until the key exists the app gets no feed and Sparkle stays off; release builds keep Download only (LARECOMP_UPDATE_RELEASES). Checked beforehand: Sparkle 2.10.1 installs an update into an ad-hoc signed app (EdDSA checked, a bad signature refused), dmg and zip archives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The key that signs every update manifest and Sparkle feed; its private half is the UPDATE_SIGNING_KEY repo secret. tools/bundle_macos.sh derives Sparkle's SUPublicEDKey from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LARECOMP_SPARKLE_AUTOINSTALL=1 installs a downloaded update at once, as Sparkle's Install and Relaunch does. Used to check the macOS path end to end on this build: two ad-hoc signed bundles of the app, a local feed, Sparkle 2.10.1 updated the bundle in place and relaunched it (the app quits cleanly when asked); a feed with a broken EdDSA signature was downloaded but not installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found in the first Windows test: update_sign wrote the manifest through stdout in text mode, so
every line ended in CR LF and every install refused it ("bad signature line"). stdout is binary
now; tools/update_manifest.sh reads each manifest back from the file and checks it as the app
would, so a broken one fails the build; the app names CR LF line ends when it refuses one.
The restarted new version inherited LASRECOMP_LOG_FILE and appended to the old version's session
log without its own header; it starts a session log of its own now.
Windows x64 test (Windows PC, steps per the request): update, automatic restart, the start
screen keeping it, rollback of a version that never got there, and a bad signature all passed
with the LF manifest; saves, seeds and game files untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The restarted version inherited LASRECOMP_INFO_LOGGED (and would inherit the re-exec markers), so its new session log had no "[info] LAS Recomp <version>" line. The restart now clears what a process passes to its own relaunches, on Windows and Linux. Found in the Windows recheck, which otherwise passed: an unmodified manifest from the fixed tool (no CR bytes) updated, restarted and was kept, with the new version in its own session log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/release.yml
feiyunwill
pushed a commit
to feiyunwill/LASRecomp
that referenced
this pull request
Nov 16, 2026
peiikai#819) Scheduled nightlies run main's nightly.yml on develop's code, so main needs the same file. The scripts it calls (update_manifest.sh, sparkle_appcast.sh, nightly_publish.sh) come from the develop checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-update, nightlies first.
What changes
update-<platform>.txt, Ed25519 via Monocypher, CC0) lists the file and, for zips, every app file with its sha256. Only those files are swapped, journaled, then the app restarts. Saves, seeds, settings and game files in the Windows exe folder are never touched. The old files stay until the new version reaches the start screen (or boots the game); a new version that never gets there is rolled back on the next start. Not writable / not an AppImage: Update off, Download stays.releases/latest/download/appcast-macOS.xml,releases/download/nightly/appcast-macOS.xml), EdDSA with the same key. The dialog's Update asks Sparkle to check. Nightly bundle versions now carry their stamp so each round is newer to Sparkle.release.ymlandnightly.ymlpublish the manifests and the Mac feed (signed with theUPDATE_SIGNING_KEYsecret; without it they only warn).nightly.ymlalso lists merged PR titles per round under "Changes" (last 30 rounds). Asset names and tag formats unchanged.LARECOMP_UPDATE_RELEASESinlauncher.mmis set to 1. No AppImage zsync yet.Tests
tools/test_update.cpp(manifest, signature, unsafe paths, swap stopped at every step, rollback, read-only folder) andtools/test_update_e2e.sh(AppImage path against a local server, 22 checks) run in CI; the unit test on Windows too. Changelog and bundle version tests intools/test_update_tags.cpp.make distbuilds, local server): update, automatic restart, kept at the start screen, rollback of a version that never got there, bad signature refused; fake saves, seeds and game files untouched; the new version gets its own session log. This found two bugs, fixed here: CRLF manifests fromupdate_signon Windows, and the restarted version inheriting the old one's log.After merging
nightly.ymlandtools/nightly_publish.shalso need the matching change onmain(scheduled nightlies run from there); that's a separate PR.🤖 Generated with Claude Code