From b31b8f02d9f6d8407dc76321ad6c0ad784735122 Mon Sep 17 00:00:00 2001 From: Carl Kenner Date: Fri, 10 Jun 2016 01:07:04 +0930 Subject: [PATCH] This fixes the issue where the installer deletes the User folder, possibly including saved-games, and deletes everything else in the install folder, possibly including games that took hours to dump. We still delete the Sys folder though, because otherwise games will use the wrong settings due to our wildcard support. And we delete the Languages folder, any DLL files, uninst.exe, Dolphin.exe, DSPTool.exe and the qt.conf and cpack_package_description.txt that older Dolphin installers or packages accidentally create. --- Installer/Installer.nsi | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Installer/Installer.nsi b/Installer/Installer.nsi index 5094053197..01c6d9e7c6 100644 --- a/Installer/Installer.nsi +++ b/Installer/Installer.nsi @@ -124,9 +124,17 @@ Section "Base" SEC01 ; TODO: Make a nice subsection-ized display SetOutPath "$INSTDIR" SetOverwrite ifnewer - ; Delete old install directory if it exists - IfFileExists "$INSTDIR\*.*" 0 +2 - RMDir /r "$INSTDIR" + ; Only delete what we put there; all $INSTDIR\User is left as is + Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\license.txt" + Delete "$INSTDIR\*.dll" + Delete "$INSTDIR\Dolphin.exe" + Delete "$INSTDIR\DSPTool.exe" + Delete "$INSTDIR\cpack_package_description.txt" + Delete "$INSTDIR\qt.conf" + RMDir /r "$INSTDIR\Sys" + RMDir /r "$INSTDIR\Languages" + File "${BASE_DIR}\Dolphin.exe" File "${BASE_DIR}\license.txt" File "${BASE_DIR}\*.dll"