Release v3.6: rebuild the self-updater (in-app, rollback-safe); warnings to front
Replace the generated cmd.exe + robocopy update helper — which silently
failed on some machines — with an in-app C# installer:
* Stage the new version to a per-user temp folder off the install and run
the new RemSound.exe from there, so nothing in the install is locked by
the updater itself.
* Wait for the old process to fully exit (real WaitForExit), then
back-up-and-swap files in C# with retry + rename-aside; roll the install
back to the previous version on any failure, so a failed update can never
leave a half-installed RemSound.
* Log every step to updater.log; clean up old stages and legacy batch
artefacts on launch. Removed the old BuildInstallScript batch generator.
Route the "RemSound is already running" dialog and its follow-up message
through ForegroundDialog so they surface in front from a background-relaunched
copy, matching the earlier post-update fix.
Docs: rewrite the readme update sections for the new mechanism, regenerate
MANUAL.md, refresh the About-box changelog and RELEASE_NOTES.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4dbe9a47a0
commit
55bdcde0af
@@ -20,7 +20,9 @@ internal enum SingleInstanceDecision
|
||||
/// can't accidentally kill a healthy session that might be mid-recording. The force-close
|
||||
/// option is the deliberate recovery path for a stuck copy (Andre's "make it go away"). Built
|
||||
/// as a native TaskDialog to match the rest of RemSound's dialogs and because NVDA reads its
|
||||
/// heading, body and buttons cleanly. No owner window — the main window doesn't exist yet.
|
||||
/// heading, body and buttons cleanly. Shown through <see cref="ForegroundDialog"/> so it surfaces
|
||||
/// front-and-centre with focus even when this copy was relaunched in the background by the updater;
|
||||
/// ForegroundDialog supplies its own momentary owner, since the main window doesn't exist yet.
|
||||
/// </summary>
|
||||
internal static class SingleInstanceDialog
|
||||
{
|
||||
@@ -48,7 +50,11 @@ internal static class SingleInstanceDialog
|
||||
AllowCancel = true,
|
||||
};
|
||||
|
||||
var clicked = TaskDialog.ShowDialog(page);
|
||||
// Front-and-centre with focus, even when this copy was relaunched in the background by the
|
||||
// auto-updater — a foreground-refused process would otherwise open this behind everything,
|
||||
// dinging away where a screen-reader user can't find it. ForegroundDialog supplies its own
|
||||
// momentary owner, so this works before any main window exists.
|
||||
var clicked = ForegroundDialog.Show(owner => TaskDialog.ShowDialog(owner, page));
|
||||
if (clicked == forceButton) return SingleInstanceDecision.ForceClose;
|
||||
if (clicked == switchButton) return SingleInstanceDecision.SwitchToRunning;
|
||||
return SingleInstanceDecision.Cancel;
|
||||
|
||||
Reference in New Issue
Block a user