From fe72821eaa2a89d4c269ee9c7bd0bdaa5022ed82 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 29 Mar 2011 17:55:48 +0000 Subject: [PATCH] Made the uninstaller nicer / removed some unused stuff. The uninstaller now removes all PCSX2 paths info, so that a reinstall works as expected. It also offers to remove plugin configuration files and user created files separately. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4508 96395faa-99c1-11dd-bbfe-3dabce05a288 --- nsis/SectionCoreReqs.nsh | 3 --- nsis/SectionUninstaller.nsh | 35 +++++++++++++++++------------------ nsis/SharedBase.nsh | 4 ---- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/nsis/SectionCoreReqs.nsh b/nsis/SectionCoreReqs.nsh index f6c79cb27b..f4cb846e36 100644 --- a/nsis/SectionCoreReqs.nsh +++ b/nsis/SectionCoreReqs.nsh @@ -77,9 +77,6 @@ ; -- Registry Section -- ; ------------------------------------------ - ; Write the installation path into the registry - WriteRegStr HKLM Software\PCSX2 "Install_Dir" "$INSTDIR" - ; Write the uninstall keys for Windows WriteRegStr HKLM "${INSTDIR_REG_KEY}" "DisplayName" "PCSX2 - Playstation 2 Emulator" WriteRegStr HKLM "${INSTDIR_REG_KEY}" "UninstallString" "${UNINST_EXE}" diff --git a/nsis/SectionUninstaller.nsh b/nsis/SectionUninstaller.nsh index e1f33cd050..9dd36ad66e 100644 --- a/nsis/SectionUninstaller.nsh +++ b/nsis/SectionUninstaller.nsh @@ -5,14 +5,13 @@ ; may change in the future, though I doubt it.) ; ----------------------------------------------------------------------- -Section "Un.Exes and Plugins ${APP_NAME}" +Section "Un.Program and Plugins ${APP_NAME}" SetShellVarContext all !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR" - ; nsis todo: Some legacy key? Check - ; Remove registry keys (but only the ones related to the installer -- user options remain) + ; Remove uninstaller info reg key ( Wow6432Node on 64bit Windows! ) DeleteRegKey HKLM "${INSTDIR_REG_KEY}" Call un.removeShorties @@ -21,26 +20,26 @@ Section "Un.Exes and Plugins ${APP_NAME}" !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Plugins" !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Docs" !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Cheats" + + ; Remove files and registry key that store PCSX2 paths configurations + SetShellVarContext current + Delete $DOCUMENTS\PCSX2\inis\PCSX2_ui.ini + DeleteRegKey HKCU Software\PCSX2 SectionEnd -Section "Un.Complete Settings / Registry Cleanup" - - ; nsis todo: Some legacy key? Check - ; Kill the entire PCSX2 registry key! - DeleteRegKey ${INSTDIR_REG_ROOT} Software\PCSX2 - - ; Kill user options PCSX2 reg key - DeleteRegKey HKCU Software\PCSX2 +; /o for optional and unticked by default +Section /o "Un.Program and Plugin configuration files" SetShellVarContext current RMDir /r "$DOCUMENTS\PCSX2\inis\" - ; nsis todo: is this still used? - ; Kill AppData/PCSX2 entry! - StrCpy $0 $LOCALAPPDATA\PCSX2 - Call un.DeleteDirIfEmpty - StrCpy $0 $APPDATA\PCSX2 - Call un.DeleteDirIfEmpty - SectionEnd + +; /o for optional and unticked by default +Section /o "Un.User files (Memory Cards, Savestates, BIOS, etc)" + + SetShellVarContext current + RMDir /r "$DOCUMENTS\PCSX2\" + +SectionEnd \ No newline at end of file diff --git a/nsis/SharedBase.nsh b/nsis/SharedBase.nsh index badae980fe..d7dec3cde1 100644 --- a/nsis/SharedBase.nsh +++ b/nsis/SharedBase.nsh @@ -69,10 +69,6 @@ OutFile "output\pcsx2-${APP_VERSION}-r${SVNREV_PACKAGE}-${OUTFILE_POSTFIX}.exe" ; The default installation directory InstallDir "$PROGRAMFILES\PCSX2 ${APP_VERSION}" -; Registry key to check for directory (so if you install again, it will -; overwrite the old one automatically) -InstallDirRegKey ${INSTDIR_REG_ROOT} "Software\PCSX2\${APP_VERSION}" "Install_Dir" - ; These defines are dependent on NSIS vars assigned above. !define APP_EXE "$INSTDIR\${APP_FILENAME}.exe"