From 1ea4fbe168d207cd3d985c4a5674fe8133d4feee Mon Sep 17 00:00:00 2001 From: Tag Date: Sun, 16 Oct 2022 11:55:45 -0700 Subject: [PATCH] Clean install directory first! Removes orphaned files from previous versions --- windows/win_installer.nsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows/win_installer.nsi b/windows/win_installer.nsi index da30c34..c23ff32 100644 --- a/windows/win_installer.nsi +++ b/windows/win_installer.nsi @@ -110,13 +110,15 @@ Section "Program Files (Required)" SectionIn 1 2 RO SetOverwrite ifdiff + RmDir /r $InstDir + SetOutPath $InstDir File /r "${BUILDPATH}/dist/GridTracker-${VERSION}-win-x86/*" CreateDirectory "${SMPATH}" CreateShortcut "${SMPATH}\${NAME}.lnk" "$InstDir\${NAME}.exe" CreateShortcut "${SMPATH}\Help Wiki.lnk" "${HELPURL}" "" "$InstDir\gridview.ico" - CreateShortcut "${SMPATH}\Uninstall.lnk" $INSTDIR\uninstall.exe + CreateShortcut "${SMPATH}\Uninstall.lnk" $InstDir\uninstall.exe WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}" WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayVersion" "${VERSION}"