mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-10 00:33:28 +08:00
✨ feat(windows): 支持 MSI 主程序严格单实例启动
- 仅对带 MSI 安装标识的 Windows 主程序启用单实例门禁,Portable 与特殊运行模式保持原行为 - 重复启动通过命名事件唤醒首个窗口,并兼容 Wails 运行时尚未就绪的激活请求 - 新增并发抢占、窗口激活与安装模式测试,覆盖同一安装仅保留一个主实例
This commit is contained in:
@@ -31,6 +31,12 @@ func resolveCurrentUpdateInstallMode() updateInstallMode {
|
||||
return resolveUpdateInstallModeForExecutable(runtime.GOOS, updateResolveInstallTarget())
|
||||
}
|
||||
|
||||
// IsWindowsMSIInstallExecutable reports whether executablePath belongs to a
|
||||
// GoNavi MSI installation. The marker is packaged next to the stable MSI exe.
|
||||
func IsWindowsMSIInstallExecutable(goos string, executablePath string) bool {
|
||||
return resolveUpdateInstallModeForExecutable(goos, executablePath) == updateInstallModeMSI
|
||||
}
|
||||
|
||||
func resolveUpdateInstallModeForExecutable(goos string, executablePath string) updateInstallMode {
|
||||
if !strings.EqualFold(strings.TrimSpace(goos), "windows") {
|
||||
return updateInstallModeUnknown
|
||||
|
||||
Reference in New Issue
Block a user