mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-14 00:42:17 +08:00
- 将 Windows 更新脚本统一为 PowerShell,并通过 Unicode 环境变量传递中文与特殊字符路径 - 保留当前可执行文件路径,补充替换重试、启动健康检查、失败回滚和严格 ZIP 选择 - 更新前复用未保存 SQL 确认流程,并延长退出兜底时间 - 新增 Windows 原生集成测试并接入 dev/release 构建
24 lines
495 B
Go
24 lines
495 B
Go
package app
|
|
|
|
import (
|
|
_ "embed"
|
|
"strings"
|
|
)
|
|
|
|
//go:embed windows_update.ps1
|
|
var windowsUpdatePowerShellScript string
|
|
|
|
type windowsUpdateLaunchContext struct {
|
|
SourcePath string
|
|
TargetPath string
|
|
CurrentTargetPath string
|
|
StagedDir string
|
|
LogPath string
|
|
PID int
|
|
}
|
|
|
|
func buildWindowsPowerShellScript() string {
|
|
normalized := strings.ReplaceAll(windowsUpdatePowerShellScript, "\r\n", "\n")
|
|
return strings.ReplaceAll(normalized, "\n", "\r\n")
|
|
}
|