Skip to content

Commit c058fef

Browse files
Fix v1.3.1 localization and installer cleanup (#26)
## Summary Fixes the incomplete Simplified Chinese localization shipped in v1.3.0 and prepares v1.3.1. ## Changes - Completed zh-CN localization coverage across the main UI. - Added/updated localization keys for primary views, tray/status text, notifications, and settings. - Kept en-US as the default language. - Updated version metadata to 1.3.1. - Changed installer display name to ThreadPilot while keeping version metadata separate. - Added guarded cleanup for obsolete ThreadPilot 0.1.0-beta uninstall entry. - Improved uninstall cleanup for ThreadPilot AppData, startup task, and HKCU Run entry. - Added localization and packaging metadata tests. ## Validation - dotnet build ThreadPilot_1.sln: passed, 0 warnings - dotnet test ThreadPilot_1.sln: passed, 524 tests ## Safety - No change to elevation behavior. - No change to affinity/process control behavior. - No change to power plan or system tweak behavior. - Normal install/update preserves user settings. - Full uninstall removes ThreadPilot-owned AppData for the uninstalling user.
1 parent edd6808 commit c058fef

38 files changed

Lines changed: 1332 additions & 598 deletions

.github/workflows/release.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,13 @@ jobs:
161161
schtasks /Delete /TN "ThreadPilot_Startup" /F >nul 2>&1
162162
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "ThreadPilot" /f >nul 2>&1
163163
164-
echo [3/4] Optional user data cleanup...
165-
set "REMOVE_DATA=N"
166-
set /p REMOVE_DATA=Do you want to remove user settings at "%APPDATA%\ThreadPilot"? [y/N]:
167-
if /I "%REMOVE_DATA%"=="Y" (
168-
if exist "%APPDATA%\ThreadPilot" (
169-
rd /s /q "%APPDATA%\ThreadPilot"
170-
echo User settings removed.
171-
) else (
172-
echo No user settings folder found.
173-
)
164+
echo [3/4] Removing ThreadPilot user data for this Windows account...
165+
rem Full uninstall removes only ThreadPilot-owned per-user AppData. Normal install/update paths never run this script.
166+
if exist "%APPDATA%\ThreadPilot" (
167+
rd /s /q "%APPDATA%\ThreadPilot"
168+
echo ThreadPilot user data removed.
174169
) else (
175-
echo User settings were kept.
170+
echo No ThreadPilot user data folder found.
176171
)
177172
178173
echo [4/4] Scheduling app folder removal...

Installer/Installer.iss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define MyAppPublisher "ThreadPilot"
66
#define MyAppURL "https://github.com/"
77
#define MyAppExeName "ThreadPilot.exe"
8-
#define MyAppVersion "1.3.0"
8+
#define MyAppVersion "1.3.1"
99

1010
#ifndef MyWizardStyle
1111
#define MyWizardStyle "modern dynamic windows11"
@@ -20,7 +20,7 @@
2020
AppId={{A2A4C8B5-4A9A-4B1B-93F4-5F8B1C7E8C2A}
2121
AppName={#MyAppName}
2222
AppVersion={#MyAppVersion}
23-
AppVerName={#MyAppName} {#MyAppVersion}
23+
AppVerName={#MyAppName}
2424
AppPublisher={#MyAppPublisher}
2525
AppPublisherURL={#MyAppURL}
2626
AppSupportURL={#MyAppURL}
@@ -54,7 +54,15 @@ Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: de
5454
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
5555

5656
[UninstallRun]
57-
Filename: taskkill.exe; Parameters: "/IM '{#MyAppExeName}' /F"; Flags: runhidden waituntilterminated; RunOnceId: UninstallKill
57+
Filename: "taskkill.exe"; Parameters: "/IM ""{#MyAppExeName}"" /F"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallKill"
58+
Filename: "schtasks.exe"; Parameters: "/Delete /TN ""ThreadPilot_Startup"" /F"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallRemoveThreadPilotStartupTask"
59+
Filename: "reg.exe"; Parameters: "delete ""HKCU\Software\Microsoft\Windows\CurrentVersion\Run"" /v ""ThreadPilot"" /f"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallRemoveThreadPilotRunEntry"
60+
61+
; ThreadPilot user data is preserved during install/update and removed only when
62+
; the generated uninstaller runs. Per-user AppData cleanup is limited to the
63+
; account context used by uninstall.
64+
[UninstallDelete]
65+
Type: filesandordirs; Name: "{userappdata}\ThreadPilot"
5866

5967
[Code]
6068

Installer/ThreadPilot.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Package
88
Name="ThreadPilot"
99
Manufacturer="Prime Build"
10-
Version="1.3.0.0"
10+
Version="1.3.1.0"
1111
UpgradeCode="PUT-GENERATED-UPGRADE-CODE-HERE"
1212
Language="1033">
1313
<SummaryInformation Description="ThreadPilot MSI template" />

Installer/setup.iss

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#endif
1212

1313
#ifndef MyAppVersion
14-
#define MyAppVersion "1.3.0"
14+
#define MyAppVersion "1.3.1"
1515
#endif
1616

1717
#ifndef MyAppSourceDir
@@ -22,7 +22,7 @@
2222
AppId={{E8F7A3B2-5C4D-4E6F-8A9B-1C2D3E4F5A6B}
2323
AppName={#MyAppName}
2424
AppVersion={#MyAppVersion}
25-
AppVerName={#MyAppName} {#MyAppVersion}
25+
AppVerName={#MyAppName}
2626
AppPublisher={#MyAppPublisher}
2727
AppPublisherURL={#MyAppURL}
2828
AppSupportURL={#MyAppURL}/issues
@@ -62,3 +62,49 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
6262
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
6363

6464
; Intentionally do not auto-launch after setup to keep package-manager installs unattended.
65+
; ThreadPilot user data is preserved during install/update. Inno removes installed
66+
; files and shortcuts automatically only when the generated uninstaller runs.
67+
; Per-user AppData cleanup is limited to the account context used by uninstall.
68+
[UninstallRun]
69+
Filename: "taskkill.exe"; Parameters: "/IM ""{#MyAppExeName}"" /F"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallKillThreadPilot"
70+
Filename: "schtasks.exe"; Parameters: "/Delete /TN ""ThreadPilot_Startup"" /F"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallRemoveThreadPilotStartupTask"
71+
Filename: "reg.exe"; Parameters: "delete ""HKCU\Software\Microsoft\Windows\CurrentVersion\Run"" /v ""ThreadPilot"" /f"; Flags: runhidden waituntilterminated; RunOnceId: "UninstallRemoveThreadPilotRunEntry"
72+
73+
[UninstallDelete]
74+
Type: filesandordirs; Name: "{userappdata}\ThreadPilot"
75+
76+
[Code]
77+
const
78+
LegacyBetaUninstallKey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A2A4C8B5-4A9A-4B1B-93F4-5F8B1C7E8C2A}_is1';
79+
LegacyBetaDisplayName = 'ThreadPilot 0.1.0-beta';
80+
81+
function IsLegacyThreadPilotInstallPath(InstallLocation: string): Boolean;
82+
var
83+
NormalizedLocation: string;
84+
ExpectedInstallRoot: string;
85+
begin
86+
NormalizedLocation := Lowercase(RemoveBackslashUnlessRoot(RemoveQuotes(InstallLocation)));
87+
ExpectedInstallRoot := Lowercase(RemoveBackslashUnlessRoot(ExpandConstant('{autopf}\ThreadPilot')));
88+
Result := (NormalizedLocation = ExpectedInstallRoot);
89+
end;
90+
91+
procedure DeleteLegacyBetaUninstallEntry(RootKey: Integer);
92+
var
93+
DisplayName: string;
94+
InstallLocation: string;
95+
begin
96+
if RegQueryStringValue(RootKey, LegacyBetaUninstallKey, 'DisplayName', DisplayName) and
97+
RegQueryStringValue(RootKey, LegacyBetaUninstallKey, 'InstallLocation', InstallLocation) and
98+
(DisplayName = LegacyBetaDisplayName) and
99+
IsLegacyThreadPilotInstallPath(InstallLocation) then
100+
begin
101+
RegDeleteKeyIncludingSubkeys(RootKey, LegacyBetaUninstallKey);
102+
end;
103+
end;
104+
105+
function InitializeSetup(): Boolean;
106+
begin
107+
DeleteLegacyBetaUninstallEntry(HKLM);
108+
DeleteLegacyBetaUninstallEntry(HKCU);
109+
Result := True;
110+
end;

0 commit comments

Comments
 (0)