🐛 fix(update): 安装前确认并安全关闭当前安装的全部实例

- 安装更新前先确认关闭当前安装目录下的 GoNavi 实例,并继续执行未保存 SQL 退出保护
- 按可执行文件路径枚举并复核进程身份,优雅关闭超时后再强制终止,避免 PID 复用误杀
- 通过全局维护事件阻止更新期间启动新实例,并由 PowerShell 更新器完成跨权限无空窗交接
- 同步更新前端交互、多语言提示、Wails 绑定及 Windows 发布资产校验
This commit is contained in:
Syngnat
2026-07-21 10:55:08 +08:00
parent 2597d087ad
commit 60d172254d
39 changed files with 1107 additions and 149 deletions

View File

@@ -33,6 +33,15 @@ class WindowsReleaseArtifactsTest(unittest.TestCase):
self.assertIn("-arch $wixArch", source)
self.assertIn("TestExpectedAssetNameForWindowsInstallMode", source)
self.assertIn("TestInstallUpdateAndRestartMSI", source)
self.assertIn("TestShouldEnableWindowsMSISingleInstanceOnlyForInstalledMainGUI", source)
self.assertIn("TestAcquireWindowsMSISingleInstance", source)
self.assertIn("TestAcquireWindowsUpdateMaintenance", source)
self.assertIn("TestPrepareWindowsUpdateHandoff", source)
self.assertIn("TestWindowsUpdateRequiresExplicitCloseConfirmation", source)
self.assertIn("TestInstallUpdateAndRestartRequiresCloseConfirmationOnWindows", source)
self.assertIn("TestFindOtherWindowsUpdateInstances", source)
self.assertIn("TestCloseWindowsUpdateInstances", source)
self.assertIn("TestInstallUpdateAndRestartClosesOtherTargetInstances", source)
self.assertIn("TestBuildWindowsMSIUpdatePowerShellScript", source)
self.assertIn('-d "ProductName=GoNavi"', source)
self.assertIn(f'-d "UpgradeCode={UPGRADE_CODE}"', source)