mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-08 20:41:38 +08:00
🐛 fix(windows): 修复在线更新挂起与 WebView2 启动闪退
- 隐藏并释放 Windows 更新脚本进程,避免在线更新打开 cmd 并挂起 - 为更新脚本等待宿主进程退出增加超时保护 - 收窄自动 WebView2 zoom reset 触发条件并补充异常兜底 - 补充 Windows 更新启动与窗口缩放回归测试 Refs #468
This commit is contained in:
19
internal/app/methods_update_windows_process_test.go
Normal file
19
internal/app/methods_update_windows_process_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build windows
|
||||
|
||||
package app
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBuildWindowsLaunchCommandHidesConsoleWindow(t *testing.T) {
|
||||
cmd := buildWindowsLaunchCommand(`C:\tmp\gonavi-update\update.cmd`)
|
||||
|
||||
if cmd.SysProcAttr == nil {
|
||||
t.Fatalf("expected Windows update launcher to configure SysProcAttr")
|
||||
}
|
||||
if !cmd.SysProcAttr.HideWindow {
|
||||
t.Fatalf("expected Windows update launcher to hide the console window")
|
||||
}
|
||||
if cmd.SysProcAttr.CreationFlags&windowsCreateNoWindow == 0 {
|
||||
t.Fatalf("expected Windows update launcher to set CREATE_NO_WINDOW, flags=%#x", cmd.SysProcAttr.CreationFlags)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user