pcsx2/nsis/SectionUninstaller.nsh

105 lines
3.2 KiB
Plaintext
Raw Normal View History

; =======================================================================
; 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"
RMDir /r "$INSTDIR\plugins"
RMDir "$INSTDIR"
FunctionEnd
; =======================================================================
; Un.Installer Sections
; =======================================================================
Section "Un.Program and Plugins ${APP_NAME}"
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
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.
DeleteRegKey HKLM Software\PCSX2
; This key is generated by PCSX2 and *not* NSIS!
; Failure to delete this key can result in configuration errors after a fresh install.
DeleteRegKey HKCU Software\PCSX2
; Remove regkey generated by NSIS for uninstall functions
DeleteRegKey HKLM "${INSTDIR_REG_KEY}"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"
; Remove shortcuts, if any
Delete "$DESKTOP\${APP_NAME}.lnk"
RMDir /r "$SMPROGRAMS\PCSX2"
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"
; 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.
SetShellVarContext current
Delete $DOCUMENTS\PCSX2\inis\PCSX2_ui.ini
SectionEnd
; /o for optional and unticked by default
Section /o "Un.Configuration files (Programs and Plugins)"
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
SetShellVarContext current
RMDir /r "$DOCUMENTS\PCSX2\inis\"
SectionEnd
Section /o "Un.Memory Cards and Savestates"
SetShellVarContext current
RMDir /r "$DOCUMENTS\PCSX2\memcards\"
RMDir /r "$DOCUMENTS\PCSX2\sstates\"
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
SectionEnd
; /o for optional and unticked by default
Section /o "Un.User files (Cheats, Logs, Snapshots)"
SetShellVarContext current
RMDir /r "$DOCUMENTS\PCSX2\Cheats_ws\"
2015-12-20 01:55:17 +00:00
RMDir /r "$DOCUMENTS\PCSX2\cheats\"
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
RMDir /r "$DOCUMENTS\PCSX2\logs\"
RMDir /r "$DOCUMENTS\PCSX2\snaps\"
SectionEnd
; /o for optional and unticked by default
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
Section /o "Un.BIOS files"
SetShellVarContext current
NSIS Un/Installer: updates (for both full/web installers): - Removed vcredist 2008-sp1 and 2010, added vcredist 2010 sp1. - GSdx DLLs rename (+"32"), added avx. - Version to 1.0.0. - Uninstaller: bios removal now has own checkbox (can now remove everything and keep bios). - Uninstaller: registry is cleaned first (better for next install in case uninstall fails for some reason). TODO/ToTest: - Test upgrade from 0.98, 0.97. - Got few crashes and/or errors if files/folders were in use while uninstalling. Look into that. - First install on a clean system: test that first-time-wizard appears (i didn't get the ftw, I possibly had stuff from previous incomplete uninstall). - Add an option to run pcsx2 when the installer completes? - readme/faq have "0.9.8" in filename, but the installer refers to <version>, check if/when it's used. - Cheats folder created at program files. consider at mydocs? - Cheats folder contains what appears to be a valid pnach file for personas 4 (inf health etc). do we want that packaged? - Do we want to mirror vcredist 2010sp1 on pcsx2.code.google/files? (older redists are mirrored). - Change the installer logo to the one used everywhere else? - See if we can use the best gsdx version selected initially (my system supports sse4, but it selects the sse2 dll by default at ftw). - Default KB config for lilypad? all other plugins can work without configuring manually, but without a controller configured, it's very meh. See what we can do about it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5271 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 14:55:15 +00:00
RMDir /r "$DOCUMENTS\PCSX2\bios\"
SectionEnd