File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,17 +221,8 @@ func (m *Manager) onReady() {
221221 // dialog.Message("Failed to open control panel: %v", err).Title("Error").Error()
222222 // }
223223 case <- m .mRestartUpdate .ClickedCh :
224- var msg , title string
225- if runtime .GOOS == "windows" {
226- msg = "这将停止所有服务并安装更新,是否继续?"
227- title = "Confirm Update"
228- } else if runtime .GOOS == "darwin" {
229- msg = "将停止所有服务并打开新版本安装包目录,请手动双击安装包完成升级。是否继续?"
230- title = "Confirm Update"
231- } else {
232- msg = "这将停止所有服务并安装更新,是否继续?"
233- title = "Confirm Update"
234- }
224+ msg := "这将停止所有服务并安装更新,是否继续?"
225+ title := "确认更新"
235226 if confirmed := dialog .Message (msg ).Title (title ).YesNo (); confirmed {
236227 if err := m .performUpdate (); err != nil {
237228 dialog .Message ("执行更新失败: %v" , err ).Title ("错误" ).Error ()
Original file line number Diff line number Diff line change @@ -399,18 +399,7 @@ func (p *PKGInstaller) Install() error {
399399 return nil
400400}
401401
402- func (p * PKGInstaller ) installWithAppleScript () error {
403- // slog.Info("直接打开安装包所在目录,等待用户手动安装")
404-
405- // dir := filepath.Dir(p.pkgPath)
406- // openCmd := exec.Command("open", dir)
407- // if err := openCmd.Run(); err != nil {
408- // slog.Error("打开目录失败:", err)
409- // return fmt.Errorf("打开目录失败: %v", err)
410- // }
411-
412- // return nil
413-
402+ func (p * PKGInstaller ) installWithAppleScript () error {
414403 // 启动 Installer.app 打开 .pkg,不等待安装完成
415404 logger .LogicLogger .Info ("打开安装包,交由 Installer.app 安装(不等待)" )
416405
You can’t perform that action at this time.
0 commit comments