feat(update): install a new release from inside the app - #785
Merged
marcinz606 merged 1 commit intoAug 10, 2026
Conversation
The "Update Available" notice sent you to the releases page to download, uninstall and reinstall by hand. It now opens an update window — release notes, download size, one button — that fetches the build matching how this copy was installed, closes NegPy, installs over the old version and reopens on the new one. Per platform: the NSIS installer runs silently over the current install (elevated, since it lives in Program Files, and restarted through Explorer so the app itself does not inherit the admin token); the macOS DMG is mounted and its bundle swapped in where the running one sits; the Linux AppImage file is replaced and relaunched. A running program cannot overwrite itself, so the swap is a detached script that starts only once this process is gone. It waits on the pipe NegPy holds rather than polling the PID — an exited-but-unreaped process is a zombie, and a zombie still answers `kill -0`. Nothing is replaced before then, so a failed download or a refused UAC prompt leaves the install as it was, and a directory the user cannot write is reported instead of half-applied. Where NegPy cannot swap itself — a source checkout, a release with no build for the platform — the notice still appears and the button opens the releases page. Also: - installer.nsi records its install directory, so a silent upgrade lands on top of an existing install wherever the user put it. - The check thread belongs to the module, not to the panel that starts it: a QThread destroyed while a stalled socket read is in flight aborts the process. - New unbound "Check for updates" action in the shortcut registry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B9D3krJSKKb1iEwo3UhmyN
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.
The "Update Available" notice sent you to the releases page to download, uninstall and reinstall by hand. It now opens an update window — release notes, download size, one button — that fetches the build matching how this copy was installed, closes NegPy, installs over the old version and reopens on the new one.
Per platform: the NSIS installer runs silently over the current install (elevated, since it lives in Program Files, and restarted through Explorer so the app itself does not inherit the admin token); the macOS DMG is mounted and its bundle swapped in where the running one sits; the Linux AppImage file is replaced and relaunched.
A running program cannot overwrite itself, so the swap is a detached script that starts only once this process is gone. It waits on the pipe NegPy holds rather than polling the PID — an exited-but-unreaped process is a zombie, and a zombie still answers
kill -0. Nothing is replaced before then, so a failed download or a refused UAC prompt leaves the install as it was, and a directory the user cannot write is reported instead of half-applied.Where NegPy cannot swap itself — a source checkout, a release with no build for the platform — the notice still appears and the button opens the releases page.
Also: