From 5298c2016f6f09269df779a684353330a8d8801d Mon Sep 17 00:00:00 2001 From: Christian Kenny Date: Mon, 19 Dec 2016 19:12:18 -0500 Subject: [PATCH] Remove unused SVN templates and condense installer files. Reduced compile errors by removing output folder dependency. Forgot to add SharedRedtape changes to last commit Remove unused SVN templates Compile the installer to the NSIS folder so that the user doesn't need to worry about the output folder missing; and wonder why the installer won't compile ;) --- nsis/SectionUninstaller.nsh | 78 ++++++++++++++++++++++++++---- nsis/SharedBase.nsh | 10 +--- nsis/SharedRedtape.nsh | 62 ------------------------ nsis/nsis_instructions.txt | 4 +- nsis/templates/svnrev_cdvdiso.nsh | 5 -- nsis/templates/svnrev_gsdx.nsh | 5 -- nsis/templates/svnrev_lilypad.nsh | 5 -- nsis/templates/svnrev_package.nsh | 3 -- nsis/templates/svnrev_pcsx2.nsh | 8 --- nsis/templates/svnrev_plugins.nsh | 7 --- nsis/templates/svnrev_spu2x.nsh | 5 -- nsis/templates/svnrev_zerogs.nsh | 5 -- nsis/templates/svnrev_zerospu2.nsh | 5 -- nsis/templates/svnrev_zzogl.nsh | 5 -- 14 files changed, 71 insertions(+), 136 deletions(-) delete mode 100644 nsis/SharedRedtape.nsh delete mode 100644 nsis/templates/svnrev_cdvdiso.nsh delete mode 100644 nsis/templates/svnrev_gsdx.nsh delete mode 100644 nsis/templates/svnrev_lilypad.nsh delete mode 100644 nsis/templates/svnrev_package.nsh delete mode 100644 nsis/templates/svnrev_pcsx2.nsh delete mode 100644 nsis/templates/svnrev_plugins.nsh delete mode 100644 nsis/templates/svnrev_spu2x.nsh delete mode 100644 nsis/templates/svnrev_zerogs.nsh delete mode 100644 nsis/templates/svnrev_zerospu2.nsh delete mode 100644 nsis/templates/svnrev_zzogl.nsh diff --git a/nsis/SectionUninstaller.nsh b/nsis/SectionUninstaller.nsh index a7f80b01ee..786aad2e29 100644 --- a/nsis/SectionUninstaller.nsh +++ b/nsis/SectionUninstaller.nsh @@ -1,3 +1,61 @@ +; ======================================================================= +; Shared Install Functions +; ======================================================================= + +Function .onInit + + ;prepare Advanced Uninstall log always within .onInit function + !insertmacro UNINSTALL.LOG_PREPARE_INSTALL + + ; MORE UAC HELL ---------- > + ;call IsUserAdmin + +FunctionEnd + +Function .onInstSuccess + + ;create/update log always within .onInstSuccess function + !insertmacro UNINSTALL.LOG_UPDATE_INSTALL + +FunctionEnd + +; ======================================================================= +; Shared Uninstall Functions +; ======================================================================= + +Function un.removeShorties + + ; Remove shortcuts, if any + + Delete "$DESKTOP\${APP_NAME}.lnk" + + Delete "$SMPROGRAMS\PCSX2\Uninstall ${APP_NAME}.lnk" + Delete "$SMPROGRAMS\PCSX2\${APP_NAME}.lnk" + ;Delete "$SMPROGRAMS\PCSX2\pcsx2-dev.lnk" + + Delete "$SMPROGRAMS\PCSX2\Readme.lnk" + Delete "$SMPROGRAMS\PCSX2\Frequently Asked Questions.lnk" + + RMDir "$SMPROGRAMS\PCSX2" + +FunctionEnd + +; 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 "$INSTDIR\plugins" + RMDir "$INSTDIR\docs" + RMDir "$INSTDIR" + FunctionEnd + ; ======================================================================= ; Un.Installer Sections ; ======================================================================= @@ -30,23 +88,23 @@ Section "Un.Program and Plugins ${APP_NAME}" SectionEnd ; /o for optional and unticked by default -Section /o "Un.Configuration files (PCSX2, GSdx, SPU2-X, ect.)" - +Section /o "Un.Configuration files (Programs and Plugins)" + SetShellVarContext current RMDir /r "$DOCUMENTS\PCSX2\inis\" - + SectionEnd Section /o "Un.Memory cards/savestates" - SetShellVarContext current - RMDir /r "$DOCUMENTS\PCSX2\memcards" - RMDir /r "$DOCUMENTS\PCSX2\sstates" + SetShellVarContext current + RMDir /r "$DOCUMENTS\PCSX2\memcards\" + RMDir /r "$DOCUMENTS\PCSX2\sstates\" SectionEnd ; /o for optional and unticked by default -Section /o "Un.User files (Cheats, logs, snaps, etc)" - +Section /o "Un.User files (Cheats, Logs, Snapshots)" + SetShellVarContext current RMDir /r "$DOCUMENTS\PCSX2\Cheats_ws\" RMDir /r "$DOCUMENTS\PCSX2\cheats\" @@ -57,8 +115,8 @@ SectionEnd ; /o for optional and unticked by default Section /o "Un.BIOS files" - + SetShellVarContext current RMDir /r "$DOCUMENTS\PCSX2\bios\" - + SectionEnd \ No newline at end of file diff --git a/nsis/SharedBase.nsh b/nsis/SharedBase.nsh index 7f5e19d796..019f2c2145 100644 --- a/nsis/SharedBase.nsh +++ b/nsis/SharedBase.nsh @@ -12,13 +12,6 @@ !define INC_PLUGINS 1 !endif -!ifndef USE_PACKAGE_REV - ; When enabled, all exe and plugins use a single revision based ont he trunk/HEAD svn revision. - ; When disabled, each plugin and the main exe get their own revision number based on the actual - ; revision the component was last updated. - !define USE_PACKAGE_REV 0 -!endif - ; Notes on Uninstall Log Location (UNINSTALL_LOG) ; The name of the uninstall log determines whether or not future installers ; fall under the same single uninstall entry, or if they use multiple (separate) @@ -45,7 +38,8 @@ SetCompressorDictSize 24 ; The name of the installer Name "${APP_NAME}" -OutFile "output\pcsx2-${APP_VERSION}-${OUTFILE_POSTFIX}.exe" +; Output the installer to the nsis folder (in git repo) +OutFile "pcsx2-${APP_VERSION}-${OUTFILE_POSTFIX}.exe" ; The default installation directory InstallDir "$PROGRAMFILES\PCSX2 ${APP_VERSION}" diff --git a/nsis/SharedRedtape.nsh b/nsis/SharedRedtape.nsh deleted file mode 100644 index 0fd0358973..0000000000 --- a/nsis/SharedRedtape.nsh +++ /dev/null @@ -1,62 +0,0 @@ - -; ======================================================================= -; Shared Install Functions -; ======================================================================= - -Function .onInit - - ;prepare Advanced Uninstall log always within .onInit function - !insertmacro UNINSTALL.LOG_PREPARE_INSTALL - - ; MORE UAC HELL ---------- > - ;call IsUserAdmin - -FunctionEnd - - -Function .onInstSuccess - - ;create/update log always within .onInstSuccess function - !insertmacro UNINSTALL.LOG_UPDATE_INSTALL - -FunctionEnd - - -; ======================================================================= -; Shared Uninstall Functions -; ======================================================================= - -Function un.removeShorties - - ; Remove shortcuts, if any - - Delete "$DESKTOP\${APP_NAME}.lnk" - - Delete "$SMPROGRAMS\PCSX2\Uninstall ${APP_NAME}.lnk" - Delete "$SMPROGRAMS\PCSX2\${APP_NAME}.lnk" - ;Delete "$SMPROGRAMS\PCSX2\pcsx2-dev.lnk" - - Delete "$SMPROGRAMS\PCSX2\Readme.lnk" - Delete "$SMPROGRAMS\PCSX2\Frequently Asked Questions.lnk" - - RMDir "$SMPROGRAMS\PCSX2" - -FunctionEnd - -; 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 "$INSTDIR\plugins" - RMDir "$INSTDIR\docs" - RMDir "$INSTDIR\Cheats" - RMDir "$INSTDIR" - FunctionEnd \ No newline at end of file diff --git a/nsis/nsis_instructions.txt b/nsis/nsis_instructions.txt index fb517d0e8f..31797ba66a 100644 --- a/nsis/nsis_instructions.txt +++ b/nsis/nsis_instructions.txt @@ -54,9 +54,7 @@ * Once you have downloaded both Microsoft packages and built the required plugins; you are ready to compile! :) * Open MakeNSIS.exe and compile script (pcsx2_full_install.nsi)! - Output executables will be generated to the local git repo; in the "pcsx2/nsis/output" folder. - - * If compiler fails, make sure that the output folder in the path shown above + Output executables will be generated to the local git repo; in the "pcsx2/nsis" folder. -------------------------------------------- Recommendations to Developers diff --git a/nsis/templates/svnrev_cdvdiso.nsh b/nsis/templates/svnrev_cdvdiso.nsh deleted file mode 100644 index e7c969522c..0000000000 --- a/nsis/templates/svnrev_cdvdiso.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_CDVDISO $WCREV$ -!else - !define SVNREV_CDVDISO ${SVNREV_PACKAGE} -!endif diff --git a/nsis/templates/svnrev_gsdx.nsh b/nsis/templates/svnrev_gsdx.nsh deleted file mode 100644 index 86e16febaf..0000000000 --- a/nsis/templates/svnrev_gsdx.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_GSDX $WCREV$ -!else - !define SVNREV_GSDX ${SVNREV_PACKAGE} -!endif diff --git a/nsis/templates/svnrev_lilypad.nsh b/nsis/templates/svnrev_lilypad.nsh deleted file mode 100644 index 4df620fc51..0000000000 --- a/nsis/templates/svnrev_lilypad.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_LILYPAD $WCREV$ -!else - !define SVNREV_LILYPAD ${SVNREV_PACKAGE} -!endif \ No newline at end of file diff --git a/nsis/templates/svnrev_package.nsh b/nsis/templates/svnrev_package.nsh deleted file mode 100644 index a3446d9fee..0000000000 --- a/nsis/templates/svnrev_package.nsh +++ /dev/null @@ -1,3 +0,0 @@ - -!define SVNREV_PACKAGE $WCREV$ -!define SVNMOD_PACKAGE $WCMODS?1:0$ \ No newline at end of file diff --git a/nsis/templates/svnrev_pcsx2.nsh b/nsis/templates/svnrev_pcsx2.nsh deleted file mode 100644 index 396774dd1d..0000000000 --- a/nsis/templates/svnrev_pcsx2.nsh +++ /dev/null @@ -1,8 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_PCSX2 $WCREV$ - !define SVNMOD_PCSX2 $WCMODS?1:0$ -!else - !define SVNREV_PCSX2 ${SVNREV_PACKAGE} - !define SVNMOD_PCSX2 ${SVMOD_PACKAGE} -!endif - diff --git a/nsis/templates/svnrev_plugins.nsh b/nsis/templates/svnrev_plugins.nsh deleted file mode 100644 index bd8be6da71..0000000000 --- a/nsis/templates/svnrev_plugins.nsh +++ /dev/null @@ -1,7 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_PLUGINS $WCREV$ - !define SVNMOD_PLUGINS $WCMODS?1:0$ -!else - !define SVNREV_PLUGINS ${SVNREV_PACKAGE} - !define SVNMOD_PLUGINS ${SVMOD_PACKAGE} -!endif diff --git a/nsis/templates/svnrev_spu2x.nsh b/nsis/templates/svnrev_spu2x.nsh deleted file mode 100644 index 9b15af3760..0000000000 --- a/nsis/templates/svnrev_spu2x.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_SPU2X $WCREV$ -!else - !define SVNREV_SPU2X ${SVNREV_PACKAGE} -!endif \ No newline at end of file diff --git a/nsis/templates/svnrev_zerogs.nsh b/nsis/templates/svnrev_zerogs.nsh deleted file mode 100644 index 8985f9f10d..0000000000 --- a/nsis/templates/svnrev_zerogs.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_ZEROGS $WCREV$ -!else - !define SVNREV_ZEROGS ${SVNREV_PACKAGE} -!endif \ No newline at end of file diff --git a/nsis/templates/svnrev_zerospu2.nsh b/nsis/templates/svnrev_zerospu2.nsh deleted file mode 100644 index 109c18281e..0000000000 --- a/nsis/templates/svnrev_zerospu2.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_ZEROSPU2 $WCREV$ -!else - !define SVNREV_ZEROSPU2 ${SVNREV_PACKAGE} -!endif \ No newline at end of file diff --git a/nsis/templates/svnrev_zzogl.nsh b/nsis/templates/svnrev_zzogl.nsh deleted file mode 100644 index feb04d0a52..0000000000 --- a/nsis/templates/svnrev_zzogl.nsh +++ /dev/null @@ -1,5 +0,0 @@ -!if ${USE_PACKAGE_REV} == 0 - !define SVNREV_ZZOGL $WCREV$ -!else - !define SVNREV_ZZOGL ${SVNREV_PACKAGE} -!endif \ No newline at end of file