From 3b68a42cb83fa82e500e07fcf93b44d0245392fe Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Fri, 31 Jul 2026 13:05:16 +0800 Subject: [PATCH] fix(installer): delete the pre-rename tty7.exe on upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds before the tty7/tty7-app split installed the GUI as tty7.exe. Upgrading only adds tty7-app.exe, so the old binary stays on disk — and a taskbar pin, which Inno cannot rewrite the way it rewrites [Icons] shortcuts, still points at it. The user keeps launching the previous version from their pinned icon, against the same daemon endpoint as the new one. [InstallDelete] runs after PrepareToInstall has stopped the daemon and released the file lock, and before the new files land. A fresh install has nothing to remove. --- .github/scripts/windows-installer.iss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/scripts/windows-installer.iss b/.github/scripts/windows-installer.iss index 64dd3cd5..b7862d2d 100644 --- a/.github/scripts/windows-installer.iss +++ b/.github/scripts/windows-installer.iss @@ -52,6 +52,15 @@ RestartApplications=no [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +; Builds before the tty7/tty7-app split installed the GUI as tty7.exe. Upgrading +; only *adds* tty7-app.exe, so the old binary would stay on disk — and a taskbar +; pin (which Inno cannot rewrite, unlike the [Icons] shortcuts) still points at +; it. The user would keep launching the previous version from their pinned icon, +; against the same daemon endpoint as the new one. Delete it on upgrade; a fresh +; install simply has nothing to remove. +[InstallDelete] +Type: files; Name: "{app}\tty7.exe" + [Files] Source: "{#StageDir}\tty7-app.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#StageDir}\completions\*"; DestDir: "{app}\completions"; Flags: ignoreversion recursesubdirs