From b63a152c070ee52bc0c8b853a9075b2c901dc773 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 17 May 2026 18:15:17 +0800 Subject: [PATCH] :sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674 Signed-off-by: Daniel <845765@qq.com> --- app/nsis/installer.nsh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app/nsis/installer.nsh b/app/nsis/installer.nsh index 629a5595c..c37105491 100644 --- a/app/nsis/installer.nsh +++ b/app/nsis/installer.nsh @@ -37,21 +37,25 @@ Caption "${PRODUCT_NAME} ${VERSION}" !macro customUnInstall ${IfNot} ${isUpdated} - MessageBox MB_YESNO "是否需要彻底删除全局配置($PROFILE\.config\siyuan\)?$\n$\n\ - Do you want to delete the global configuration ($PROFILE\.config\siyuan\)?$\n" \ - /SD IDYES IDYES AcceptedRMConf IDNO SkippedRMConf - AcceptedRMConf: - RMDir /r "$PROFILE\.config\siyuan\" - SkippedRMConf: + IfFileExists "$PROFILE\.config\siyuan\*.*" 0 skipConfigDelete + MessageBox MB_YESNO "是否需要彻底删除全局配置($PROFILE\.config\siyuan\)?$\n$\n\ + Do you want to delete the global configuration ($PROFILE\.config\siyuan\)?$\n" \ + /SD IDYES IDYES AcceptedRMConf IDNO SkippedRMConf + AcceptedRMConf: + RMDir /r "$PROFILE\.config\siyuan\" + SkippedRMConf: + skipConfigDelete: ${EndIf} ${IfNot} ${isUpdated} - MessageBox MB_YESNO "是否需要彻底删除默认工作空间($PROFILE\SiYuan\)?$\n$\n\ - Do you want to completely delete the default workspace ($PROFILE\SiYuan\)?$\n" \ - /SD IDNO IDYES AcceptedRMWorkspace IDNO SkippedRMWrokspace - AcceptedRMWorkspace: - RMDir /r "$PROFILE\SiYuan\" - SkippedRMWrokspace: + IfFileExists "$PROFILE\SiYuan\*.*" 0 skipWorkspaceDelete + MessageBox MB_YESNO "是否需要彻底删除默认工作空间($PROFILE\SiYuan\)?$\n$\n\ + Do you want to completely delete the default workspace ($PROFILE\SiYuan\)?$\n" \ + /SD IDNO IDYES AcceptedRMWorkspace IDNO SkippedRMWrokspace + AcceptedRMWorkspace: + RMDir /r "$PROFILE\SiYuan\" + SkippedRMWrokspace: + skipWorkspaceDelete: ${EndIf} RMDir /r "$PROFILE\AppData\Local\siyuan-updater"