Skip to content

feat(update): install updates from within the application - #222

Merged
Razzmatazzz merged 2 commits into
the-hideout:masterfrom
Andrew-Webberley:feature/in-app-updater-20260819
Sep 7, 2026
Merged

Razzmatazzz merged 2 commits into
the-hideout:masterfrom
Andrew-Webberley:feature/in-app-updater-20260819

Conversation

@Andrew-Webberley

Copy link
Copy Markdown
Contributor

Updating meant downloading the release archive from GitHub, deleting the old folder, and unpacking the new one by hand. The update check already detected new releases, but could only offer a link to the download page.

The new-version notification now carries an "Install and restart" button. The release archive is downloaded to the local profile with progress reported in place, verified, and unpacked; the running executable then copies itself to staging and relaunches in --apply-update mode. That copy waits for the application to exit, replaces the installation directory, and starts the new version. Reusing the running executable as the launcher avoids shipping a second artifact, and keeps the command line contract the one that build was compiled against.

Every replaced file is backed up first. If a copy fails after retries the previous version is restored, so a failed update leaves a working install rather than a mixed one. Locked files are retried, because anti-virus scanners hold handles briefly after exit, and an installation directory that is not writable requests elevation instead of failing.

Nothing is downloaded until the user asks for it, and the confirmation dialog warns against restarting mid-raid.

The release workflow now also passes AssemblyVersion. Version is set from the tag but does not override the AssemblyVersion held in the project file, so the two only matched because the value was bumped by hand. A passive notification tolerates that drift; an updater does not, since a missed bump would make it reoffer a version already installed.

Updating meant downloading the release archive from GitHub, deleting the
old folder, and unpacking the new one by hand. The update check already
detected new releases, but could only offer a link to the download page.

The new-version notification now carries an "Install and restart" button.
The release archive is downloaded to the local profile with progress
reported in place, verified, and unpacked; the running executable then
copies itself to staging and relaunches in --apply-update mode. That copy
waits for the application to exit, replaces the installation directory,
and starts the new version. Reusing the running executable as the launcher
avoids shipping a second artifact, and keeps the command line contract the
one that build was compiled against.

Every replaced file is backed up first. If a copy fails after retries the
previous version is restored, so a failed update leaves a working install
rather than a mixed one. Locked files are retried, because anti-virus
scanners hold handles briefly after exit, and an installation directory
that is not writable requests elevation instead of failing.

Nothing is downloaded until the user asks for it, and the confirmation
dialog warns against restarting mid-raid.

The release workflow now also passes AssemblyVersion. Version is set from
the tag but does not override the AssemblyVersion held in the project
file, so the two only matched because the value was bumped by hand. A
passive notification tolerates that drift; an updater does not, since a
missed bump would make it reoffer a version already installed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@Razzmatazzz Razzmatazzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking on the work of adding this feature!

@Razzmatazzz
Razzmatazzz merged commit 1427a65 into the-hideout:master Sep 7, 2026
1 check passed
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