🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
920ead1e01
commit
f33a534ad8
1 changed files with 8 additions and 8 deletions
|
@ -360,6 +360,8 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
|||
exitLock.Lock()
|
||||
defer exitLock.Unlock()
|
||||
|
||||
logging.LogInfof("exiting kernel [force=%v, execInstallPkg=%d]", force, execInstallPkg)
|
||||
|
||||
treenode.CloseBlockTree()
|
||||
util.PushMsg(Conf.Language(95), 10000*60)
|
||||
WaitForWritingFiles()
|
||||
|
@ -378,18 +380,16 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
|||
//})
|
||||
|
||||
if !skipNewVerInstallPkg() {
|
||||
newVerInstallPkgPath := ""
|
||||
if Conf.System.DownloadInstallPkg && !util.ISMicrosoftStore {
|
||||
newVerInstallPkgPath = getNewVerInstallPkgPath()
|
||||
if "" != newVerInstallPkgPath && 0 == execInstallPkg {
|
||||
newVerInstallPkgPath := getNewVerInstallPkgPath()
|
||||
if "" != newVerInstallPkgPath {
|
||||
if 0 == execInstallPkg { // 新版本安装包已经准备就绪
|
||||
exitCode = 2
|
||||
logging.LogInfof("the new version install pkg is ready [%s], waiting for the user's next instruction", newVerInstallPkgPath)
|
||||
return
|
||||
} else if 2 == execInstallPkg { // 执行新版本安装
|
||||
go execNewVerInstallPkg(newVerInstallPkgPath)
|
||||
}
|
||||
}
|
||||
|
||||
if 2 == execInstallPkg && "" != newVerInstallPkgPath { // 执行新版本安装
|
||||
go execNewVerInstallPkg(newVerInstallPkgPath)
|
||||
}
|
||||
}
|
||||
|
||||
Conf.Close()
|
||||
|
|
Loading…
Add table
Reference in a new issue