From 45e1905aa89a1934cb7c671cb34673a53d6e5c63 Mon Sep 17 00:00:00 2001 From: keiko233 Date: Sun, 31 Mar 2024 14:33:07 +0800 Subject: [PATCH] fix(bundler/nsis): don't use /R flag on installation dir * https://github.com/tauri-apps/tauri/pull/9282/commits/1cf01f7c3e3ad3cad40ac290c1106ef44a42fab8 --- backend/tauri/templates/installer.nsi | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/backend/tauri/templates/installer.nsi b/backend/tauri/templates/installer.nsi index 1d6ce47a9f..62fb34a4ca 100644 --- a/backend/tauri/templates/installer.nsi +++ b/backend/tauri/templates/installer.nsi @@ -300,17 +300,9 @@ Function PageLeaveReinstall reinst_done: FunctionEnd -Function CheckInstallDir - ${If} ${FileExists} "$INSTDIR\*.*" - MessageBox MB_ICONSTOP|MB_OK "The selected installation directory is not empty. Please choose an empty directory!" - Abort - ${EndIf} -FunctionEnd - ; 5. Choose install directoy page !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive !insertmacro MUI_PAGE_DIRECTORY -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckInstallDir ; 6. Start menu shortcut page !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive @@ -706,14 +698,10 @@ Section Uninstall ; Delete uninstaller Delete "$INSTDIR\uninstall.exe" - ${If} $DeleteAppDataCheckboxState == 1 - RMDir /R /REBOOTOK "$INSTDIR" - ${Else} - {{#each resources_ancestors}} - RMDir /REBOOTOK "$INSTDIR\\{{this}}" - {{/each}} - RMDir "$INSTDIR" - ${EndIf} + {{#each resources_ancestors}} + RMDir /REBOOTOK "$INSTDIR\\{{this}}" + {{/each}} + RMDir "$INSTDIR" ; Remove start menu shortcut !insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder