2016-12-20 00:12:18 +00:00
|
|
|
; =======================================================================
|
|
|
|
; Shared Install Functions
|
|
|
|
; =======================================================================
|
|
|
|
|
|
|
|
Function .onInit
|
|
|
|
|
|
|
|
;prepare Advanced Uninstall log always within .onInit function
|
|
|
|
!insertmacro UNINSTALL.LOG_PREPARE_INSTALL
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function .onInstSuccess
|
|
|
|
|
|
|
|
;create/update log always within .onInstSuccess function
|
|
|
|
!insertmacro UNINSTALL.LOG_UPDATE_INSTALL
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
; =======================================================================
|
|
|
|
; Shared Uninstall Functions
|
|
|
|
; =======================================================================
|
|
|
|
|
|
|
|
; begin uninstall, could be added on top of uninstall section instead
|
|
|
|
Function un.onInit
|
|
|
|
!insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onUninstSuccess
|
|
|
|
!insertmacro UNINSTALL.LOG_END_UNINSTALL
|
|
|
|
; And remove the various install dir(s) but only if they're clean of user content:
|
|
|
|
|
|
|
|
RMDir "$DOCUMENTS\PCSX2"
|
|
|
|
RMDir "$INSTDIR\langs"
|
2017-01-18 05:32:54 +00:00
|
|
|
|
|
|
|
RMDir /r "$INSTDIR\plugins"
|
2016-12-20 00:12:18 +00:00
|
|
|
RMDir "$INSTDIR"
|
|
|
|
FunctionEnd
|
2010-05-29 16:24:26 +00:00
|
|
|
; =======================================================================
|
|
|
|
; Un.Installer Sections
|
|
|
|
; =======================================================================
|
2011-03-29 17:55:48 +00:00
|
|
|
Section "Un.Program and Plugins ${APP_NAME}"
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2012-06-06 14:55:15 +00:00
|
|
|
; First thing, remove the registry entry in case uninstall doesn't complete successfully
|
|
|
|
; otherwise, pcsx2 will be "confused" if it's re-installed later.
|
2016-12-15 03:02:06 +00:00
|
|
|
DeleteRegKey HKLM Software\PCSX2
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
; This key is generated by PCSX2 and *not* NSIS!
|
|
|
|
; Failure to delete this key can result in configuration errors after a fresh install.
|
2016-12-29 20:20:52 +00:00
|
|
|
DeleteRegKey HKCU Software\PCSX2
|
2017-03-13 22:46:15 +00:00
|
|
|
|
2010-05-29 16:24:26 +00:00
|
|
|
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"
|
|
|
|
|
2011-03-29 17:55:48 +00:00
|
|
|
; Remove uninstaller info reg key ( Wow6432Node on 64bit Windows! )
|
2017-03-13 22:46:15 +00:00
|
|
|
|
2017-01-18 05:32:54 +00:00
|
|
|
; Remove shortcuts, if any
|
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
|
|
|
RMDir /r "$SMPROGRAMS\PCSX2"
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
Delete "$INSTDIR\GameIndex.dbf"
|
|
|
|
Delete "$INSTDIR\cheats_ws.zip"
|
|
|
|
Delete "$INSTDIR\PCSX2_keys.ini.default"
|
|
|
|
Delete "$INSTDIR\pcsx2.exe"
|
|
|
|
RMDir /r "$INSTDIR\Langs"
|
|
|
|
RMDir /r "$INSTDIR\Plugins"
|
|
|
|
RMDir /r "$INSTDIR\Docs"
|
|
|
|
RMDir /r "$INSTDIR\Shaders"
|
|
|
|
|
2011-03-29 17:55:48 +00:00
|
|
|
SetShellVarContext current
|
|
|
|
Delete $DOCUMENTS\PCSX2\inis\PCSX2_ui.ini
|
2010-05-29 16:24:26 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2011-03-29 17:55:48 +00:00
|
|
|
; /o for optional and unticked by default
|
2016-12-20 00:12:18 +00:00
|
|
|
Section /o "Un.Configuration files (Programs and Plugins)"
|
2012-06-06 14:55:15 +00:00
|
|
|
SetShellVarContext current
|
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\inis\"
|
2016-12-15 03:02:06 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
Section /o "Un.Memory Cards and Savestates"
|
2016-12-20 00:12:18 +00:00
|
|
|
SetShellVarContext current
|
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\memcards\"
|
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\sstates\"
|
2012-06-06 14:55:15 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
; /o for optional and unticked by default
|
2016-12-20 00:12:18 +00:00
|
|
|
Section /o "Un.User files (Cheats, Logs, Snapshots)"
|
2010-05-29 16:24:26 +00:00
|
|
|
SetShellVarContext current
|
2014-01-26 18:00:14 +00:00
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\Cheats_ws\"
|
2015-12-20 01:55:17 +00:00
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\cheats\"
|
2012-06-06 14:55:15 +00:00
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\logs\"
|
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\snaps\"
|
2010-05-29 16:24:26 +00:00
|
|
|
SectionEnd
|
2011-03-29 17:55:48 +00:00
|
|
|
|
|
|
|
; /o for optional and unticked by default
|
2012-06-06 14:55:15 +00:00
|
|
|
Section /o "Un.BIOS files"
|
2016-12-20 00:12:18 +00:00
|
|
|
|
2011-03-29 17:55:48 +00:00
|
|
|
SetShellVarContext current
|
2012-06-06 14:55:15 +00:00
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\bios\"
|
2016-12-20 00:12:18 +00:00
|
|
|
|
2011-03-29 17:55:48 +00:00
|
|
|
SectionEnd
|