Repository navigation
[MacOS] self updater - #86
innateessence wants to merge 7 commits into
Conversation
elripalda
left a comment
There was a problem hiding this comment.
Thanks for this! An in-app update for the Mac app would be a really good addition. A few things need to change before it can go in:
- Leave the Windows path as it is. Windows already updates through the installer (
update_launch.rsand the update screen from Beta 34 and 35). That includes the two-strike rule inupdate_bad.json(update_strike/update_is_bad) and the check that refuses an installer that names another version. This PR swaps it for a standalone executable (windows_binary,self_update.ps1) and drops the strike handling. Please keepupdate_launcher's Windows branch exactly as it is on main, and leaverelease.yml,RELEASING.mdand the release checks unchanged. - Linux: the AppImage already replaces itself in place on main. If you want to rework it, keep the same result and the same checks. A
.deb, or an extracted run, should still open the download page. - macOS is the part that's missing, and it's welcome: stage the new
.appbundle, check it, swap it, and relaunch. - The same checks as
update_download.rs: only the allowed hosts, a size cap, a required sha256 that matchesversion.json, and the version check before anything is replaced. On macOS, please also check the bundle's code signature (or at least its Team ID) before swapping it in. - Nothing runs from a writable temp location while the app is still open. Prefer the app's own data folder, and clean up when it fails.
- Please rebase onto main (Beta 36 has landed since). Leave it as a draft until it's ready. CI will run once the first-time-contributor run is approved.
Happy to look again whenever you push.
Generated by Claude Code
c223986 to
8f4320d
Compare
|
Tested it on my macbook pro, behaves as expected |
There was a problem hiding this comment.
🟡 Changes recommended
The updater can leave the app unlaunchable during replacement and deletes its rollback copy before confirming successful startup, while dialog dismissal and desktop-mode restoration remain incorrect.
4 open issues
Review effort: Balanced
8a45f50 to
8f4320d
Compare
|
ran out of tokens, need to address copilots flagged issues still. None are resolved yet. |
|
@innateessence mostly fixed do try it now pls |
There was a problem hiding this comment.
🟡 Changes recommended
Awaiting animation frames during Mac startup can stall initialization in hidden-window --play launches because WebKit may suspend those frames, so the readiness acknowledgment must not block startup.
1 open issue
4 resolved since last review
Review effort: Balanced
…can pause animation frames
This is a lie though. I installed the app image from the AUR on my arch box and clicking "Download" just opens a browser to the download page. |
There was a problem hiding this comment.
🔵 Needs a closer look
The macOS self-replacement flow requires end-to-end validation with two signed builds because existing test doubles do not exercise bundle swapping, Tauri teardown, relaunch readiness, and rollback together.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
I'll test this build for MacOS and for Arch, if the Linux app image still opens a browser I'll open another PR probably |
you should not. Your package manager should update the app for the same reason flatpak has the auto updater disabled |
I understand this, I'd remove it from my pkg manager once the AppImage actually supports self updating The pkg just installs/copies the AppImage binary so it's discoverable in my PATH |
|
Linux AppImage still does not self-update |
|
Gave this MR a MacOS tag to keep it scoped exclusively to MacOS. I'll make another one for Linux AppImage's so my arch box isn't always lagging behind. |
|
The updater wont work until we sign it this is expected behavior if you see your gatekeep notifications in the settings you will see that the app tried to start and failed. if not manually try to download the latest version and you will see it then. |
Anything you want me to do to test on my Mac? |
|
|
|
Still failing even after signing the App and trying to updater again. Same error. I'll poke around for logs |
|
The self-update log is empty |
|
macos builds are barely out for now. we will most likely either add sparkle or another macos specific update system after we code sign properly. this will be fixed dont worry. |
|
Not seeing any prompt to allow the app to launch in my MacOS "Privacy and Security" settings where that would be the problem. Also made sure the App fully exited before trying again, wasn't running in the background and possibly reusing an unsigned process |
Sounds good. I mostly pivoted to MacOS for other users. This will realistically be running on my arch box |
Do you have any objections to making the Linux AppImage self update? |
|
I think the Linux AppImage should support self updates or we have something like CI/CD update the PKGBUILD for I think there'll be a lot of users who aren't using Arch based systems though |
|
we only support system agnostic packaging people coming from arch are supposed to be self supported thats the whole point of arch. Even then Arch does not condone AUR at all so we just dont provide support there. We will take care of the appimage in place self upgrade that is already on the todo. I am taking a look at the mac build now. Have some patience pls and try to keep replies aggregated because each reply pings everyone involved. |
|
I fixed the self updater. will commit in a while |
Feel free to tag me if you want me to test and I'll test it out when it's convenient for me |
|
@innateessence found why the Mac update kept failing for you, and it isn't signing. This PR waits for the new version to confirm it started ( Since the Mac updater is a stopgap until we sign properly (then likely Sparkle), I've opened a smaller one that works with the releases already out: #126. It keeps the parts that matter here: sha256 and version checks, signature check, and a rollback. The rollback doesn't need anything from the new version: the old app stays aside until the new one has run 20 s, and comes back if it crashes. Tested on a Mac against the real beta.41, and against a broken build that rolls back. Your work is credited there. The Big Picture fix from here (B no longer closes a busy dialog) went into its own PR, #127. If you're OK with it, this one can be closed in favour of #126. Thanks for pushing on this and testing on your Mac. |
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]>
|
Closing this in favour of #126, which picks up from here. Thanks a lot @innateessence for starting the Mac updater, for the rollback idea, and for testing it on your Mac: that testing is what showed where it was failing. You're credited as co-author on #126. |



enable self updating using the UI