🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837

This commit is contained in:
Liang Ding 2022-09-08 22:53:50 +08:00
parent 9f31270b90
commit 9f5097ebe3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 19 additions and 19 deletions

View file

@ -836,14 +836,14 @@
"58": "After the index is rebuilt, the interface will be automatically refreshed later...",
"59": "Failed to set sync ignore list",
"60": "Failed to get the update package: %s",
"61": "The new version installation package is ready, do you want to exit now and start installing the new version?",
"62": "Exit and install",
"61": "⬆️ The new version installation package is ready, do you want to exit now and start installing the new version?",
"62": "TODO",
"63": "Recovering, please wait...",
"64": "There are [%d] files in total, it will take some time to index, please wait...",
"65": "Exporting data...",
"66": "Data file [%s] created",
"67": "Uploaded at %s, downloaded at %s",
"68": "Exit only",
"68": "TODO",
"69": "Download completed",
"70": "Copy notebook [%s] file [%s] failed: %s",
"71": "Failed to insert asset file, please reopen the document",

View file

@ -836,14 +836,14 @@
"58": "Después de reconstruir el índice, la interfaz se actualizará automáticamente más tarde...",
"59": " Falló la configuración de sincronización de la lista de ignorados",
"60": "Fallo al obtener el paquete de actualización: %s",
"61": "El paquete de instalación de la nueva versión está listo, ¿quieres salir ahora y comenzar a instalar la nueva versión?",
"62": "Salir e instalar",
"61": "⬆️ El paquete de instalación de la nueva versión está listo, ¿quieres salir ahora y comenzar a instalar la nueva versión?",
"62": "TODO",
"63": "Recuperando, por favor espere...",
"64": "Hay [%d] archivos en total, tardará un tiempo en indexarse, por favor espere...",
"65": "Exportando datos...",
"66": "Archivo de datos [%s] creado",
"67": "Cargado en %s, descargado en %s",
"68": "Solo salir",
"68": "TODO",
"69": "Descarga completada",
"70": "Error en la copia del cuaderno [%s] del archivo [%s]: %s",
"71": "Fallo en la inserción del archivo de activos, por favor reabra el documento",

View file

@ -836,14 +836,14 @@
"58": "Une fois l'index reconstruit, l'interface sera automatiquement rafraîchie ultérieurement...",
"59": "Échec de la définition de la liste des ignores de synchronisation",
"60": "Échec de la récupération du paquet de mise à jour : %s",
"61": "Le package d'installation de la nouvelle version est prêt, voulez-vous quitter maintenant et commencer l'installation de la nouvelle version ?",
"62": "Quitter et installer",
"61": "⬆️ Le package d'installation de la nouvelle version est prêt, voulez-vous quitter maintenant et commencer l'installation de la nouvelle version ?",
"62": "TODO",
"63": "Récupération, veuillez patienter...",
"64": "Il y a [%d] fichiers au total, l'indexation prendra un certain temps, veuillez patienter...",
"65": "Exportation des données...",
"66": "Fichier de données [%s] créé",
"67": "Transféré à %s, téléchargé à %s",
"68": "Sortie uniquement",
"68": "TODO",
"69": "Téléchargement terminé",
"70": "La copie du carnet de notes [%s] du fichier [%s] a échoué : %s",
"71": "L'insertion du fichier asset a échoué, veuillez rouvrir le document.",

View file

@ -836,14 +836,14 @@
"58": "重建索引完畢,稍後將自動重新整理介面...",
"59": "設置同步忽略列表失敗",
"60": "獲取更新包失敗:%s",
"61": "新版本安裝包已經準備就緒,是否現在退出並開始安裝新版本?",
"62": "退出並安裝",
"61": "⬆️ 新版本安裝包已經準備就緒,是否現在退出並開始安裝新版本?",
"62": "TODO",
"63": "正在恢復,請稍等...",
"64": "共有檔 [%d] 個,需要一些時間進行索引,請稍等...",
"65": "導出數據中...",
"66": "已創建資料檔案 [%s]",
"67": "上傳於 %s下載於 %s",
"68": "僅退出",
"68": "TODO",
"69": "下載完畢",
"70": "複製筆記本 [%s] 下的檔 [%s] 失敗:%s",
"71": "插入資料檔失敗,請重新打開文檔",

View file

@ -837,14 +837,14 @@
"58": "重建索引完毕,稍后将自动刷新界面...",
"59": "设置同步忽略列表失败",
"60": "获取更新包失败:%s",
"61": "新版本安装包已经准备就绪,是否现在退出并开始安装新版本?",
"62": "退出并安装",
"61": "⬆️ 新版本安装包已经准备就绪,是否现在退出并开始安装新版本?",
"62": "TODO",
"63": "正在恢复,请稍等...",
"64": "共有文件 [%d] 个,需要一些时间进行索引,请稍等...",
"65": "导出数据中...",
"66": "已创建数据文件 [%s]",
"67": "上传于 %s下载于 %s",
"68": "仅退出",
"68": "TODO",
"69": "下载完毕",
"70": "复制笔记本 [%s] 下的文件 [%s] 失败:%s",
"71": "插入资源文件失败,请重新打开文档",

View file

@ -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}
}
}

View file

@ -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()