From 9568ff12e86401eb0c8d5321953f8bcee12d37ee Mon Sep 17 00:00:00 2001 From: Minh141120 Date: Wed, 24 Sep 2025 15:47:46 +0700 Subject: [PATCH] feat: add cleanup logic for windows installer --- src-tauri/windows/hooks.nsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src-tauri/windows/hooks.nsh b/src-tauri/windows/hooks.nsh index 5e1a32141..d1beed199 100644 --- a/src-tauri/windows/hooks.nsh +++ b/src-tauri/windows/hooks.nsh @@ -42,6 +42,11 @@ ${If} ${FileExists} "$INSTDIR\resources\LICENSE" CopyFiles /SILENT "$INSTDIR\resources\LICENSE" "$INSTDIR\LICENSE" DetailPrint "Copied LICENSE to install root" + + ; Optional cleanup - remove from resources folder + Delete "$INSTDIR\resources\LICENSE" + ${Else} + DetailPrint "LICENSE not found at expected location: $INSTDIR\resources\LICENSE" ${EndIf} ; ---- Copy vulkan-1.dll to install root ---- @@ -51,6 +56,7 @@ ; Optional cleanup - remove from resources folder Delete "$INSTDIR\resources\lib\vulkan-1.dll" + ; Only remove the lib directory if it's empty after removing both files RMDir "$INSTDIR\resources\lib" ${Else}