From 337c79571d6e2b073435d95f642634130a5d0bf0 Mon Sep 17 00:00:00 2001
From: Daniel <845765@qq.com>
Date: Wed, 11 Oct 2023 11:59:25 +0800
Subject: [PATCH] :art: Improve install new version on Windows
---
app/appearance/langs/en_US.json | 2 +-
app/appearance/langs/es_ES.json | 2 +-
app/appearance/langs/fr_FR.json | 2 +-
app/appearance/langs/zh_CHT.json | 2 +-
app/appearance/langs/zh_CN.json | 2 +-
kernel/model/conf.go | 8 ++++++--
6 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index 5c8d308a21f..c0a93e9df3d 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -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 here",
"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 here",
"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]",
diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json
index e7cb6bb63dc..b93ec63471c 100644
--- a/app/appearance/langs/es_ES.json
+++ b/app/appearance/langs/es_ES.json
@@ -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 Aquí 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 aquí",
"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]",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index f090018655e..8dcbd5dbd0a 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -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 ici 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 ici",
"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]",
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index 0221972de62..e8d639ada5e 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -1210,7 +1210,7 @@
"127": "訂閱距過期還剩 [%d] 天,過期後雲端資料會被徹底刪除。續訂請訪問這裡",
"128": "訂閱已經過期,過期後雲端資料會被徹底刪除,訂閱過期兩天后不再彈出該提醒,續訂請訪問這裡",
"129": "雲端資料已經損壞,請參考這裡解決該問題",
- "130": "正在啟動新版本安裝程式...",
+ "130": "正在啟動新版本安裝程式,由於作業系統會進行安全掃描,因此啟動可能需要一些時間,請稍等...",
"131": "不支持該操作,請到雲端存儲提供商管理控制台進行操作",
"132": "當前搜索方式下不支持替換操作,請使用 [關鍵字] 或 [正則表達式] 搜索方式",
"133": "正在下載更新安裝檔 [%s]",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index e03987f0e5a..c2fe0206bf1 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -1210,7 +1210,7 @@
"127": "订阅距过期还剩 [%d] 天,过期后云端数据会被彻底删除。续订请访问这里",
"128": "订阅已经过期,过期后云端数据会被彻底删除,订阅过期两天后不再弹出该提醒,续订请访问这里",
"129": "云端数据已经损坏,请参考这里解决该问题",
- "130": "正在启动新版本安装程序...",
+ "130": "正在启动新版本安装程序,由于操作系统会进行安全扫描,所以启动可能需要一些时间,请稍等...",
"131": "不支持该操作,请到云端存储提供商管理控制台进行操作",
"132": "当前搜索方式下不支持替换操作,请使用 [关键字] 或 [正则表达式] 搜索方式",
"133": "正在下载更新安装包 [%s]",
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 3b0e6444e41..99c7d0b6e70 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -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)
}
}
@@ -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() {