🎨 桌面端退出拉起更新安装时有时需要重启两次 Fix https://github.com/siyuan-note/siyuan/issues/6544
This commit is contained in:
parent
a2cc5ca0aa
commit
4b9fa8b339
8 changed files with 20 additions and 14 deletions
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -3,7 +3,6 @@ Caption "${PRODUCT_NAME} ${VERSION}"
|
|||
!macro preInit
|
||||
nsExec::Exec 'TASKKILL /F /IM "SiYuan.exe"'
|
||||
nsExec::Exec 'TASKKILL /F /IM "SiYuan-Kernel.exe"'
|
||||
nsExec::Exec 'TASKKILL /F /IM "SiYuan Kernel.exe"'
|
||||
!macroend
|
||||
|
||||
!macro customInstallMode
|
||||
|
|
|
@ -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
|
||||
});
|
||||
}, () => {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue