Skip to content

Commit

Permalink
🎨 Improve install new version on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 11, 2023
1 parent f6f1148 commit 337c795
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
"127": "There are [%d] days left before the subscription expires, after which the cloud data will be completely deleted. To renew, please visit <a target='_blank' href='${url}'>here</a>",
"128": "The subscription has expired. After the expiration, the cloud data will be completely deleted. The reminder will no longer pop up two days after the subscription expires. To renew, please visit <a target='_blank' href='${url}'>here</a>",
"129": "Cloud data has been corrupted, please reset the local data repo and cloud sync dir to resolve the issue",
"130": "Starting new version installer...",
"130": "The new version installer is starting. Since the operating system will perform a security scan, it may take some time to start. Please wait...",
"131": "This operation is not supported, please go to the cloud storage provider management console to operate",
"132": "The current search method does not support the replace operation, please use the [Keyword] or [Regex] search method",
"133": "Downloading update installation package [%s]",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
"127": "There are [%d] days left before the subscription expires, after which the cloud data will be completely deleted. Please visit <a target='_blank' href='${url}'>Aquí</a> para la renovación",
"128": "La suscripción caducó. Después de la caducidad, los datos de la nube se eliminarán por completo. El recordatorio ya no aparecerá dos días después de que caduque la suscripción. Para renovar, visite <a target='_blank' href='${url}'>aquí</a>",
"129": "Los datos de la nube se han dañado, reinicie el repositorio de datos local y el directorio de sincronización en la nube para resolver el problema",
"130": "Iniciando instalador de nueva versión...",
"130": "El instalador de la nueva versión se está iniciando. Dado que el sistema operativo realizará un análisis de seguridad, es posible que tarde algún tiempo en iniciarse. Espere...",
"131": "Esta solicitud no es compatible, vaya a la consola de administración del proveedor de almacenamiento en la nube para operar",
"132": "El método de búsqueda actual no admite la operación de reemplazo, utilice el método de búsqueda [Palabra clave] o [Regex]",
"133": "Descargando paquete de instalación de actualización [%s]",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
"127": "Il reste [%d] jours avant l'expiration de l'abonnement, après quoi les données cloud seront complètement supprimées. Veuillez visiter <a target='_blank' href='${url}'>ici</a> pour le renouvellement",
"128": "L'abonnement a expiré. Après l'expiration, les données cloud seront complètement supprimées. Le rappel ne s'affichera plus deux jours après l'expiration de l'abonnement. Pour renouveler, veuillez visiter <a target='_blank' href='${url}'>ici</a>",
"129": "Les données cloud ont été corrompues, veuillez réinitialiser le dépôt de données local et le répertoire de synchronisation cloud pour résoudre le problème",
"130": "Démarrage du programme d'installation de la nouvelle version...",
"130": "Le programme d'installation de la nouvelle version démarre. Étant donné que le système d'exploitation va effectuer une analyse de sécurité, le démarrage peut prendre un certain temps. Veuillez patienter...",
"131": "Cette opération n'est pas prise en charge, veuillez vous rendre sur la console de gestion du fournisseur de stockage cloud pour opérer",
"132": "La méthode de recherche actuelle ne prend pas en charge l'opération de remplacement, veuillez utiliser la méthode de recherche [Mot-clé] ou [Regex]",
"133": "Téléchargement du package d'installation de la mise à jour [%s]",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
"127": "訂閱距過期還剩 [%d] 天,過期後雲端資料會被徹底刪除。續訂請訪問<a target='_blank' href='${url}'>這裡</a>",
"128": "訂閱已經過期,過期後雲端資料會被徹底刪除,訂閱過期兩天后不再彈出該提醒,續訂請訪問<a target='_blank' href='${url}'>這裡</a>",
"129": "雲端資料已經損壞,請參考<a href=\"https://ld246.com/article/1683395267749\" target=\"_blank\">這裡</a>解決該問題",
"130": "正在啟動新版本安裝程式...",
"130": "正在啟動新版本安裝程式,由於作業系統會進行安全掃描,因此啟動可能需要一些時間,請稍等...",
"131": "不支持該操作,請到雲端存儲提供商管理控制台進行操作",
"132": "當前搜索方式下不支持替換操作,請使用 [關鍵字] 或 [正則表達式] 搜索方式",
"133": "正在下載更新安裝檔 [%s]",
Expand Down
2 changes: 1 addition & 1 deletion app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
"127": "订阅距过期还剩 [%d] 天,过期后云端数据会被彻底删除。续订请访问<a target='_blank' href='${url}'>这里</a>",
"128": "订阅已经过期,过期后云端数据会被彻底删除,订阅过期两天后不再弹出该提醒,续订请访问<a target='_blank' href='${url}'>这里</a>",
"129": "云端数据已经损坏,请参考<a href=\"https://ld246.com/article/1683395267749\" target=\"_blank\">这里</a>解决该问题",
"130": "正在启动新版本安装程序...",
"130": "正在启动新版本安装程序,由于操作系统会进行安全扫描,所以启动可能需要一些时间,请稍等...",
"131": "不支持该操作,请到云端存储提供商管理控制台进行操作",
"132": "当前搜索方式下不支持替换操作,请使用 [关键字] 或 [正则表达式] 搜索方式",
"133": "正在下载更新安装包 [%s]",
Expand Down
8 changes: 6 additions & 2 deletions kernel/model/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
return
} else if 2 == execInstallPkg { // 执行新版本安装
waitSecondForExecInstallPkg = true
if gulu.OS.IsWindows() {
util.PushMsg(Conf.Language(130), 1000*30)
}
go execNewVerInstallPkg(newVerInstallPkgPath)
}
}
Expand All @@ -523,10 +526,11 @@ func Close(force bool, execInstallPkg int) (exitCode int) {

time.Sleep(500 * time.Millisecond)
if waitSecondForExecInstallPkg {
util.PushMsg(Conf.Language(130), 1000*5)
// 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544
// 这里多等待一段时间,等待安装程序启动
time.Sleep(4 * time.Second)
if gulu.OS.IsWindows() {
time.Sleep(30 * time.Second)
}
}
closeSyncWebSocket()
go func() {
Expand Down

0 comments on commit 337c795

Please sign in to comment.