Skip to content

feat(update): download and verify the new build instead of only linking to it - #1

Merged
rockbenben merged 1 commit into
mainfrom
feat/update-check
Oct 20, 2026
Merged

rockbenben merged 1 commit into
mainfrom
feat/update-check

Conversation

@rockbenben

Copy link
Copy Markdown
Owner

The opt-in check already told the user that a newer release existed, but the only thing it did about it was open the release page in a browser. The app ships as a self-contained zip, so the user still had to find the asset, download it, check the checksum by hand and copy the file over.

This change does that part itself:

  • picks the self-contained win-x64 zip (never the needs-dotnet10 one, which refuses to start without the runtime installed),
  • downloads it and checks it against the SHA256SUMS.txt published on the same release — a mismatch is thrown away, not unpacked,
  • unpacks it into %LOCALAPPDATA%\QuickText\Updates\<version>\ and says where the new program is.

The running program is never replaced. These are single-file self-contained executables and Windows locks a running exe, so overwriting it in place fails with a sharing violation and leaves a half-written install behind. The new build lands in a folder of its own and the user is told where it is; replacing the old one is their call, made with the old one closed.

A folder that already holds a verified build is not fetched again, so a user who ignores the notice does not pay for the download on every start.

The check stays opt-in and off by default, and it is still the only thing in the app that goes online.

The dead Msg.UpdateAvailable string is gone with the old flow; Msg.UpdateReady and Msg.UpdateVerifyFailed take its place in all 18 languages.

…ng to it

The opt-in check already told the user that a newer release existed, but the
only thing it did about it was open the release page in a browser. The app is
distributed as a self-contained zip, so the user still had to find the asset,
download it, check the checksum by hand and copy the file over.

The check now does that part itself: it picks the self-contained win-x64 zip
(the framework-dependent one needs .NET 10 installed, so it is never the one
to hand out), downloads it, checks it against the SHA256SUMS.txt published on
the same release, and unpacks it into %LOCALAPPDATA%\QuickText\Updates\<version>.

The running program is deliberately left alone. These are single-file
self-contained executables and Windows locks a running exe, so overwriting it
in place fails with a sharing violation and leaves a half-written install
behind. The new build is unpacked into a folder of its own and the user is
told where it is; replacing the old one is their call, made with the old one
closed.

A folder that already holds a verified build is not fetched again, so a user
who ignores the notice does not pay for the download on every start.
@rockbenben
rockbenben merged commit 85684b2 into main Oct 20, 2026
2 checks passed
@rockbenben
rockbenben deleted the feat/update-check branch October 20, 2026 02:02
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.

1 participant