Repository navigation
Add an in-app update checker and installer - #13
Merged
Merged
Conversation
Checks GitHub's latest release a few seconds after start (release builds only, can be turned off), with Check now in Settings. Install and restart downloads the new exe, checks the published SHA-256, swaps it in, and starts it; any failure keeps the current version. Offline checks fail quietly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Z4ft1XCUSiTXomAzGqHci
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Z4ft1XCUSiTXomAzGqHci
The single-file analyzer (IL3000) rejects Assembly.Location in the published build. Look for ProDHCPServer.dll beside the exe instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Z4ft1XCUSiTXomAzGqHci
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Simon · project thread
What changes for the user
Before: to get a new version you had to visit the Releases page, download the exe and replace your copy by hand.
After:
.sha256published with the release, swaps it in place of the running exe (the old one becomesProDHCPServer.exe.old, deleted on the next start) and starts the new version. The new version inherits admin rights, so there's no UAC prompt.This runs inside the app. There's no separate Windows service.
How
Core/Updates/Updater.cs:UpdateChecker(GitHub API, release JSON parsing, SHA-256-checked streaming download, size cap, GitHub-only HTTPS URLs, plain-English failures) andExeSwap(rename-aside install, rollback, clean-up). No Windows APIs.App/ViewModels/UpdateViewModel.cs: start-up check, commands, and process restart with--updated.App.xaml.cs: the outgoing version releases the single-instance mutex just before starting the new exe, and a version started with--updatedwaits up to 30 s for the mutex. That covers both new and older builds.AppSettings:CheckForUpdates,SkippedUpdate.docs/hardware-test-updates.md.Integrity note: the SHA-256 comes from the same GitHub release, so it catches a corrupted or truncated download. It doesn't protect against a compromised GitHub account. Code signing would be the next step for that.
Testing
UpdaterTests: version parsing, release JSON, drafts and pre-releases ignored, non-GitHub URLs refused, offline and rate-limited checks, checksum match and mismatch, swap, rollback and clean-up)docs/hardware-test-updates.md(updates a test build from this PR to the published v1.1.0)Generated by Claude Code