mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 00:34:20 +01:00
🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
9f31270b90
commit
9f5097ebe3
7 changed files with 19 additions and 19 deletions
|
|
@ -362,7 +362,7 @@ func exit(c *gin.Context) {
|
|||
ret.Msg = model.Conf.Language(96) + "<div class=\"fn__space\"></div><button class=\"b3-button b3-button--white\">" + model.Conf.Language(97) + "</button>"
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 0}
|
||||
case 2: // 提示新安装包
|
||||
ret.Msg = model.Conf.Language(61) + "<div class=\"fn__space\"></div><button class=\"b3-button b3-button--white\">" + model.Conf.Language(68) + "</button><button class=\"b3-button b3-button--white\">" + model.Conf.Language(62) + "</button>"
|
||||
ret.Msg = model.Conf.Language(61)
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 0}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,16 +379,16 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
|||
//})
|
||||
|
||||
newVerInstallPkgPath := ""
|
||||
if Conf.System.DownloadInstallPkg && !util.ISMicrosoftStore && 0 == execInstallPkg {
|
||||
if Conf.System.DownloadInstallPkg && !util.ISMicrosoftStore {
|
||||
newVerInstallPkgPath = GetNewVerInstallPkgPath()
|
||||
if "" != newVerInstallPkgPath {
|
||||
if "" != newVerInstallPkgPath && 0 == execInstallPkg {
|
||||
exitCode = 2
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if 2 == execInstallPkg && "" != newVerInstallPkgPath { // 执行新版本安装
|
||||
logging.LogInfof("install new version [%s]", newVerInstallPkgPath)
|
||||
logging.LogInfof("installing the new version [%s]", newVerInstallPkgPath)
|
||||
cmd := exec.Command(newVerInstallPkgPath)
|
||||
util.CmdAttr(cmd)
|
||||
data, cmdErr := cmd.CombinedOutput()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue