Skip to content

Mac: the launcher updates itself from the release's disk image, with rollback - #126

Merged
elripalda merged 4 commits into
elripalda:mainfrom
Xarishark:feat/macos-self-update-issue-6c2add
Nov 13, 2026
Merged

elripalda merged 4 commits into
elripalda:mainfrom
Xarishark:feat/macos-self-update-issue-6c2add

Conversation

@Xarishark

@Xarishark Xarishark commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Series: launcher updates and Big Picture fixes. Merge one at a time, in this order. Each one stays a draft until the one before it is in.

  1. Big Picture B no longer dismisses a busy dialog #127 Big Picture: B no longer closes a busy dialog
  2. Big Picture: the launcher's own update gets a row on the Downloads page #139 Big Picture: Downloads gets a launcher update row
  3. Big Picture: What's New sized for the TV, and messages centred #140 Big Picture: What's New sized for the TV, messages centred
  4. Mac: the launcher updates itself from the release's disk image, with rollback #126 Mac: the launcher updates itself, with rollback
  5. linux appimage self update #125 Linux: the AppImage updates itself

This is 4 of 5. Merges cleanly after #127, #139 and #140.


Update Now on a Mac now installs the update in place, instead of opening the download link. Based on #86 by @innateessence.

How it works

  • Downloads the release's DMG and checks its sha256.
  • Mounts it read-only (the same install::undmg game installs use) and checks the app inside: the version on offer, a valid ad hoc signature, and a program for this Mac. An app that fails a check is refused, not signed again.
  • Swaps it in for the running RecompLauncher.app and reopens it.
  • Rollback: the old app stays aside until the new one has run 20 s (mac_update.sh). If it crashes or macOS stops it, the old one is put back and opened, and it says "The Update Didn't Start" (update-pending.json, as on Windows). If the same file fails twice, it isn't offered again. Nothing is needed from the new version, so this works for releases made before it.
  • When the app's folder can't be written (run from the DMG, App Translocation, a folder only an admin can change), the DMG link opens as before.

No Apple Developer account is needed. The updater's own download isn't quarantined, so Gatekeeper doesn't see it; the first install from a browser still needs Open Anyway once.

Tested on an Apple Silicon Mac (macOS 27.2.1)

  • cargo test (443) and node --test tests/*.test.cjs (95) pass.
  • A beta.40 build updated itself to the published beta.41, from ~/Applications and from a manual drag into /Applications. It stayed signed with the runtime flag, reopened, and left nothing behind.
  • Rollback: a signed beta.42 that exits at once, served from a local feed (RL_API), was swapped in and rolled back twice. The second time it was marked bad.
  • Not tested: the fallback that opens the DMG link.

For the website (SDK guide): nothing; this doesn't change recomplauncher.json.

New strings for translation: "The Update Didn't Start", its message, "Try Again" (already exists).

Shared with the Linux updater (#125)

Update Now on a Mac downloads the DMG, checks its sha256, the version inside and its ad hoc signature (signing it ad hoc again if needed), swaps it in for the running RecompLauncher.app and opens it again. When the app's folder can't be written, the DMG link opens as before. Closes elripalda#86.
…igning it again

Signing it ad hoc again let any changed app through and dropped the hardened runtime flag.
The old app is kept aside until the new one has run for 20 seconds. If the new one crashes or macOS stops it, a small watcher script puts the old one back and opens it, and its next start says the update didn't start (update-pending.json, as on Windows). Twice from the same file and it isn't offered again. Unlike a startup handshake, this needs nothing from the new version, so it also works for releases made before it.
@Xarishark Xarishark mentioned this pull request Nov 13, 2026
The in-place Mac update and its rollback follow elripalda#86, and its testing on a Mac found where the update failed.

Co-authored-by: innateessence <[email protected]>
@Xarishark
Xarishark marked this pull request as draft November 13, 2026 02:33
@elripalda
elripalda marked this pull request as ready for review November 13, 2026 12:02
@elripalda
elripalda merged commit 91b6c9c into elripalda:main Nov 13, 2026
4 of 5 checks passed
@Xarishark
Xarishark deleted the feat/macos-self-update-issue-6c2add branch November 23, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants