Repository navigation
Auto-updater: stable and release candidate channels, with in-place install - #838
aidankinzett wants to merge 10 commits into
Conversation
Stable and release candidate builds are configured with ENABLE_UPDATE_CHECKER=ON and told which repository to check (EGLANTINE_UPDATE_REPO) and which release asset they correspond to (EGLANTINE_RELEASE_PLATFORM). Daily and branch builds keep it off.
The update checker and the built-in news feed still pointed at Eden's servers. Releases now come from api.github.com for the repository in EGLANTINE_UPDATE_REPO, and each asset carries the size and SHA-256 GitHub publishes for it. Release assets are picked by exact name from the platform the build was made for (EGLANTINE_RELEASE_PLATFORM), with a PGO build falling back to the standard asset.
Releases are compared by tag (vX.Y.Z or vX.Y.Z-rcN) instead of by string inequality with the latest release. The stable channel is offered stable releases only; the release candidate channel is offered both. A stable release is newer than every candidate of the same version. Releases with other tags (daily, branch) and releases without an asset for this platform are skipped. A failed check now says why (rate limited, HTTP error, no network).
The update channel (Stable or Release candidate) is a saved setting in Configure > General. The first tagged release build to run sets it from its own tag, and after that only the user changes it, so someone who installed a release candidate keeps getting candidates after a stable release lands. The update dialog names the channel, can skip a version, saves to the Downloads folder, follows GitHub's redirect, retries transient failures and discards a download whose size or SHA-256 does not match what GitHub published. Help > Check for Updates runs the check on demand and reports the result either way.
UpdateInstaller installs a staged folder over an install folder: files the previous update installed and the new one dropped are removed, everything replaced is kept in .update-backup for one restore, a failed step puts every file back, and the portable user folder is never touched. eglantine-updater.exe runs it on Windows after the emulator has closed, since a running exe and its DLLs cannot be replaced. Changes from Lichii's code: the helper really links the C runtime statically (the project's /MD overrode the target property), manifest lines containing "." are ignored like ".." ones, and an empty staging folder is refused instead of removing the whole install.
On Windows a writable install with the helper beside it downloads the release zip, unpacks it into .update-staging and hands over to eglantine-updater.exe, which swaps the files once the emulator has closed and starts it again. An AppImage is replaced directly and restarted. Anything else (tar.gz, macOS, a read-only folder) keeps saving the download to the Downloads folder. Help > Restore Previous Version appears once an update has left a backup, and goes back to it.
The Windows jobs build explicit targets, so eglantine-updater.exe was never produced. It is only named for release builds, where the update checker (and with it the target) exists.
6d97c4b to
1c8f3b8
Compare
"Check for updates" and "Update channel" sit together in an Updates box instead of among the general settings. The box is hidden on builds without the update checker.
macOS testingApple Silicon, Release build with
Not applicable / not tested: in-place install and restart, Restore Previous Version (Windows zip / AppImage only; there is no Restore entry in Help on macOS). Notes:
|
Catch2 cannot stringify std::filesystem::file_time_type with libc++, so decomposing the comparison failed to compile on macOS. Compare inside double parentheses so it is not decomposed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…zett/Eglantine into updater/tagged-channels
Linux testingx86_64 Arch-based Linux (CachyOS), Release build with
|
|
replaced with #841 so that I could stack PRs |
Summary
The update checker inherited from Eden was switched off in CI and still pointed at Eden's servers. This makes it work for Eglantine's tagged releases.
vX.Y.ZandvX.Y.Z-rcNtags count; daily and branch builds are ignored and do not check for updates themselves. (Branch builds will be addressed in a future PR)userfolder is never touched. Other packages (tar.gz, macOS) save the download to the Downloads folder.eglantine-updater.exein the Windows zips.The installer and the Windows helper are ported from Lichii (GPL-3.0-or-later), and the channel model follows Orchid's. Three fixes over Lichii's code: the helper now really links the C runtime statically, manifest lines like
./user/xcan no longer get past theuserfolder protection, and an empty staging folder is refused instead of wiping the install.Notes for reviewers:
builtin_news.cpp) used the same Eden release endpoints, so it now reads this repo's releases too. These are currently just download links, would be good to get more detailed release notes.Type of change
Testing
Windows, MSVC build faked as release
v0.1.0-rc2in a portable folder:userfolder unchanged all workedteststarget does not currently build with MSVC.ENABLE_UPDATE_CHECKERboth on and off.Games tested:
Not applicable, no emulation changes.
Checklist
Screenshots / logs
AI Disclosure: Orchestrated by Fable 5.2 driving other Claude models