An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 桌面端退出拉起更新安装时有时需要重启两次 Fix https://github.com/siyuan-note/siyuan/issues/6544
Liang Ding4b9fa8b339db
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex d5b3b7ce67..4d8da35eca 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -947,7 +947,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='https://ld246.com/subscribe/siyuan for renewal '>Here</a>, if you don't need to renew, please log out of your account to close the reminder","128": "Subscription has expired, cloud data will be completely deleted after expiration. To renew, please visit <a target='_blank' href='https://ld246.com/subscribe/siyuan'>here</a> , if you don't need to renew, please log out of your account to close the reminder","129": "Cloud data has been corrupted, please refer to <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">here</a> to resolve the issue",- "130": "TODO",+ "130": "Starting new version installer...","131": "TODO","132": "TODO","133": "TODO",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 2ddabdaf45..c438deb0f8 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -947,7 +947,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='https://ld246.com/subscribe/siyuan'>Aquí</a> para la renovación, si no necesita renovar, salga de su cuenta para cerrar el recordatorio","128": "La suscripción ha caducado, los datos de la nube se eliminarán completamente después de la expiración. Para renovar, visite <a target='_blank' href='https://ld246.com/subscribe/siyuan'>Aquí</a>, si no necesita renovar, salga de su cuenta para cerrar el recordatorio","129": "Los datos de la nube se han dañado, consulte <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">aquí</a> para resolver el problema",- "130": "TODO",+ "130": "Iniciando instalador de nueva versión...","131": "TODO","132": "TODO","133": "TODO",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 6916586e6c..531e1d750b 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -947,7 +947,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='https://ld246.com/subscribe/ siyuan pour le renouvellement '>ici</a>, si vous n'avez pas besoin de renouveler, veuillez vous déconnecter de votre compte pour fermer le rappel","128": "L'abonnement a expiré, les données cloud seront complètement supprimées après l'expiration. Pour renouveler, veuillez visiter <a target='_blank' href='https://ld246.com/subscribe/siyuan'>ici</a > , si vous n'avez pas besoin de renouveler, veuillez vous déconnecter de votre compte pour fermer le rappel","129": "Les données cloud ont été corrompues, veuillez vous référer à <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">ici</a> pour résoudre le problème",- "130": "TODO",+ "130": "Démarrage du programme d'installation de la nouvelle version...","131": "TODO","132": "TODO","133": "TODO",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex f4a2d84f3e..b9024010b4 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -947,7 +947,7 @@"127": "訂閱距過期還剩 [%d] 天,過期後雲端數據會被徹底刪除。續訂請訪問<a target='_blank' href='https://ld246.com/subscribe/siyuan'>這裡</a>,如果不需要續訂,請登出賬號關閉該提醒","128": "訂閱已經過期,過期後雲端數據會被徹底刪除。續訂請訪問<a target='_blank' href='https://ld246.com/subscribe/siyuan'>這裡</a>,如果不需要續訂,請登出賬號關閉該提醒","129": "雲端數據已經損壞,請參考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">這裡</a>解決該問題",- "130": "TODO",+ "130": "正在啟動新版本安裝程序...","131": "TODO","132": "TODO","133": "TODO",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 3ef4500752..5efa917524 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -947,7 +947,7 @@"127": "订阅距过期还剩 [%d] 天,过期后云端数据会被彻底删除。续订请访问<a target='_blank' href='https://ld246.com/subscribe/siyuan'>这里</a>,如果不需要续订,请登出账号关闭该提醒","128": "订阅已经过期,过期后云端数据会被彻底删除。续订请访问<a target='_blank' href='https://ld246.com/subscribe/siyuan'>这里</a>,如果不需要续订,请登出账号关闭该提醒","129": "云端数据已经损坏,请参考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">这里</a>解决该问题",- "130": "TODO",+ "130": "正在启动新版本安装程序...","131": "TODO","132": "TODO","133": "TODO",diff --git a/app/installer.nsh b/app/installer.nshindex 524d29dc89..6b32623fb1 100644--- a/app/installer.nsh+++ b/app/installer.nsh@@ -3,7 +3,6 @@ Caption "${PRODUCT_NAME} ${VERSION}"!macro preInitnsExec::Exec 'TASKKILL /F /IM "SiYuan.exe"'nsExec::Exec 'TASKKILL /F /IM "SiYuan-Kernel.exe"'- nsExec::Exec 'TASKKILL /F /IM "SiYuan Kernel.exe"'!macroend!macro customInstallModediff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.tsindex e244f31fa9..38d87504dc 100644--- a/app/src/dialog/processSystem.ts+++ b/app/src/dialog/processSystem.ts@@ -9,6 +9,7 @@ import {hideMessage, showMessage} from "./message";import {Dialog} from "./index";import {isMobile} from "../util/functions";import {confirmDialog} from "./confirmDialog";+import {getCurrentWindow} from "@electron/remote";export const lockFile = (id: string) => {const html = `<div class="b3-dialog__scrim"></div>@@ -110,8 +111,16 @@ export const exitSiYuan = () => {execInstallPkg: 2 // 0:默认检查新版本,1:不执行新版本安装,2:执行新版本安装}, () => {/// #if !BROWSER- ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSETRAY);- ipcRenderer.send(Constants.SIYUAN_QUIT);+ // 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544+ // 这里先将主界面隐藏+ setTimeout(() => {+ getCurrentWindow().hide();+ }, 2000);+ // 然后等待一段时间后再退出,避免界面主进程退出以后内核子进程被杀死+ setTimeout(() => {+ ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSETRAY);+ ipcRenderer.send(Constants.SIYUAN_QUIT);+ }, 4000);/// #endif});}, () => {diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex 439ce265a2..52c5b9af1e 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -429,12 +429,10 @@ func Close(force bool, execInstallPkg int) (exitCode int) {go func() {time.Sleep(500 * time.Millisecond)if waitSecondForExecInstallPkg {- time.Sleep(2 * time.Second)- if gulu.OS.IsWindows() {- // Windows 端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6467- // 这里多等待一段时间,等待安装程序启动后时会在 NSIS 自定义脚本中 Kill SiYuan 进程,详见 install.nsh- time.Sleep(5 * time.Second)- }+ util.PushMsg(Conf.Language(130), 1000*5)+ // 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544+ // 这里多等待一段时间,等待安装程序启动+ time.Sleep(4 * time.Second)}logging.LogInfof("exited kernel")util.WebSocketServer.Close()