From 7bd6c08f53129cd56e0bb395939789638ba39ee1 Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Sun, 25 Feb 2018 17:10:21 -0600 Subject: [PATCH] Update setup to delete correct files Installer will now delete the files in the installation folder along with the folder if it is empty. Bumped minimum cx-Freeze version to 5.1.1 as files are structured differently in older versions. --- requirements-windows.txt | 2 +- setup.nsi | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/requirements-windows.txt b/requirements-windows.txt index e5304173..a433328e 100644 --- a/requirements-windows.txt +++ b/requirements-windows.txt @@ -1,3 +1,3 @@ PyQt5 >=5.4,<6.0 -cx-Freeze>=5.0.2,!=5.1.0 +cx-Freeze>=5.1.1 pypiwin32>=200 \ No newline at end of file diff --git a/setup.nsi b/setup.nsi index d3994077..289b7ebd 100644 --- a/setup.nsi +++ b/setup.nsi @@ -222,6 +222,20 @@ Section "Uninstall" !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder RMDir /r "$SMPROGRAMS\$StartMenuFolder" + ; Remove Files & Folders in Install Folder + RMDir /r "$INSTDIR\help" + RMDir /r "$INSTDIR\imageformats" + RMDir /r "$INSTDIR\lib" + RMDir /r "$INSTDIR\locale" + RMDir /r "$INSTDIR\platforms" + Delete "$INSTDIR\dupeguru.exe" + Delete "$INSTDIR\python36.dll" + Delete "$INSTDIR\sqlite3.dll" + Delete "$INSTDIR\Uninstall.exe" + + ; Remove Install Folder if empty + RMDir "$INSTDIR" + ; Remove registry keys and vendor keys (if empty) DeleteRegKey SHCTX "${BASEREGKEY}" DeleteRegKey /ifempty SHCTX "${VENDORREGKEY}"