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
This commit is contained in:
ramapcsx2 2011-03-29 17:55:48 +00:00
parent 9c234de3ec
commit fe72821eaa
3 changed files with 17 additions and 25 deletions

View File

@ -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}"

View File

@ -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

View File

@ -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"