2016-12-20 00:12:18 +00:00
|
|
|
; =======================================================================
|
|
|
|
; Shared Install Functions
|
|
|
|
; =======================================================================
|
|
|
|
|
|
|
|
Function .onInstSuccess
|
2020-05-05 19:02:07 +00:00
|
|
|
; Remove unpacked files
|
2016-12-20 00:12:18 +00:00
|
|
|
|
2020-05-05 19:02:07 +00:00
|
|
|
RMDir /r "$TEMP\PCSX2 ${APP_VERSION}"
|
2016-12-20 00:12:18 +00:00
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
; =======================================================================
|
|
|
|
; Shared Uninstall Functions
|
|
|
|
; =======================================================================
|
|
|
|
|
|
|
|
Function un.onUninstSuccess
|
|
|
|
; And remove the various install dir(s) but only if they're clean of user content:
|
|
|
|
|
2020-05-05 19:02:07 +00:00
|
|
|
Delete "$INSTDIR\Uninst-pcsx2.exe"
|
2016-12-20 00:12:18 +00:00
|
|
|
RMDir "$INSTDIR"
|
2020-05-05 19:02:07 +00:00
|
|
|
|
|
|
|
FunctionEnd
|
2010-05-29 16:24:26 +00:00
|
|
|
; =======================================================================
|
|
|
|
; Un.Installer Sections
|
|
|
|
; =======================================================================
|
2021-05-14 19:28:11 +00:00
|
|
|
Section "Un.Program ${APP_NAME}"
|
2020-05-05 19:02:07 +00:00
|
|
|
SectionIn RO
|
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
|
|
|
|
2018-12-30 07:32:14 +00:00
|
|
|
; Remove regkey generated by NSIS for uninstall functions
|
|
|
|
DeleteRegKey HKLM "${INSTDIR_REG_KEY}"
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2017-01-18 05:32:54 +00:00
|
|
|
; Remove shortcuts, if any
|
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
2020-02-21 23:04:30 +00:00
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2020-12-17 04:52:58 +00:00
|
|
|
Delete "$INSTDIR\GameIndex.yaml"
|
2017-03-13 22:46:15 +00:00
|
|
|
Delete "$INSTDIR\cheats_ws.zip"
|
|
|
|
Delete "$INSTDIR\PCSX2_keys.ini.default"
|
|
|
|
Delete "$INSTDIR\pcsx2.exe"
|
|
|
|
RMDir /r "$INSTDIR\Langs"
|
|
|
|
RMDir /r "$INSTDIR\Docs"
|
|
|
|
RMDir /r "$INSTDIR\Shaders"
|
|
|
|
|
2019-01-26 03:45:37 +00:00
|
|
|
|
|
|
|
; FIXME: PCSX2 currently does not account for non-default file paths in the uninstaller
|
|
|
|
; These paths would either have to be written to the registry by PCSX2 itself or read directly
|
|
|
|
; using a script in NSIS.
|
|
|
|
|
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
|
2021-05-14 19:28:11 +00:00
|
|
|
Section /o "Un.Configuration files (Programs)"
|
2012-06-06 14:55:15 +00:00
|
|
|
SetShellVarContext current
|
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\inis\"
|
2016-12-15 03:02:06 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2020-05-05 19:02:07 +00:00
|
|
|
; /o for optional and unticked by default
|
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"
|
2011-03-29 17:55:48 +00:00
|
|
|
SetShellVarContext current
|
2012-06-06 14:55:15 +00:00
|
|
|
RMDir /r "$DOCUMENTS\PCSX2\bios\"
|
2011-03-29 17:55:48 +00:00
|
|
|
SectionEnd
|