Skip to content

Commit d673349

Browse files
committed
feat: 处理mac自动更新的方式
1 parent 1f59e78 commit d673349

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

tray/systray.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,8 @@ func (m *Manager) onReady() {
222222
// dialog.Message("Failed to open control panel: %v", err).Title("Error").Error()
223223
// }
224224
case <-m.mRestartUpdate.ClickedCh:
225-
var msg, title string
226-
if runtime.GOOS == "windows" {
227-
msg = "This will stop all servers and install the update. Continue?"
228-
title = "Confirm Update"
229-
} else if runtime.GOOS == "darwin" {
230-
msg = "the new installer folder will be opened. Please double-click the installer to complete the upgrade. Continue?"
231-
title = "Confirm Update"
232-
} else {
233-
msg = "This will stop all servers and install the update. Continue?"
234-
title = "Confirm Update"
235-
}
225+
msg := "This will stop all servers and install the update. Continue?"
226+
title := "Confirm Update"
236227
if confirmed := dialog.Message(msg).Title(title).YesNo(); confirmed {
237228
if err := m.performUpdate(); err != nil {
238229
dialog.Message("Failed to perform update: %v", err).Title("Error").Error()

tray/updater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (p *PKGInstaller) installWithAppleScript() error {
408408
return fmt.Errorf("打开目录失败: %v", err)
409409
}
410410

411-
return fmt.Errorf("请手动双击安装包进行安装")
411+
return nil
412412
}
413413

414414
func (p *PKGInstaller) VerifyInstallation() error {

0 commit comments

Comments
 (0)