|
|
@ -204,6 +204,9 @@ ipcMain.on('put-in-tray', (event) => { |
|
|
|
dialog.showMessageBoxSync({ |
|
|
|
"message": "更新完成" |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
mainwin.MainWindow.isClose = true; |
|
|
|
app.quit() |
|
|
|
app.relaunch(); |
|
|
|
}) |
|
|
@ -212,15 +215,20 @@ ipcMain.on('put-in-tray', (event) => { |
|
|
|
simpleGit.checkIsRepo(function (err, ok) { |
|
|
|
if (ok) { |
|
|
|
simpleGit.pull(function (r, d) { |
|
|
|
isUpdate = false; |
|
|
|
if (d.files.length > 0) { |
|
|
|
require('sync-copydir')("resources/ouxuan.oa/", "resources/app/") |
|
|
|
dialog.showMessageBoxSync({ |
|
|
|
"message": "更新完成" |
|
|
|
}) |
|
|
|
isUpdate = false; |
|
|
|
|
|
|
|
mainwin.MainWindow.isClose = true; |
|
|
|
app.quit() |
|
|
|
app.relaunch(); |
|
|
|
} else { |
|
|
|
dialog.showMessageBoxSync({ |
|
|
|
"message": "无需更新" |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|