2010-05-26 19:46:37 +00:00
|
|
|
; PCSX2 Full/Complete Install Package!
|
|
|
|
; (a NSIS installer script)
|
|
|
|
;
|
2017-03-13 22:46:15 +00:00
|
|
|
; Copyright 2009-2017 PCSX2 Dev Team
|
|
|
|
|
|
|
|
!include "SharedDefs.nsh"
|
|
|
|
|
|
|
|
RequestExecutionLevel admin
|
|
|
|
AllowRootDirInstall true
|
|
|
|
|
|
|
|
; This is the uninstaller name.
|
|
|
|
!define UNINSTALL_LOG "Uninst-pcsx2"
|
|
|
|
!define INSTDIR_REG_ROOT "HKLM"
|
|
|
|
!define OUTFILE_POSTFIX "include_standard"
|
2009-08-30 01:48:08 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
; The installer name will read as "pcsx2-x.x.x-include_standard"
|
|
|
|
OutFile "pcsx2-${APP_VERSION}-${OUTFILE_POSTFIX}.exe"
|
2013-12-30 17:50:07 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
; The default installation directory for the full installer
|
|
|
|
InstallDir "$PROGRAMFILES\PCSX2 ${APP_VERSION}"
|
2009-08-30 01:48:08 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
!define INSTDIR_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FILENAME}"
|
|
|
|
|
|
|
|
!include "AdvUninstLog.nsh"
|
2010-05-27 12:13:51 +00:00
|
|
|
|
2016-12-29 20:20:52 +00:00
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
2010-05-15 13:13:55 +00:00
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
2016-12-29 20:20:52 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
; RequestExecutionLevel is admin for the full install, so we need to avoid transferring the elevated rights to the child process.
|
2016-12-15 03:02:06 +00:00
|
|
|
!define MUI_FINISHPAGE_RUN "$WINDIR\explorer.exe"
|
|
|
|
!define MUI_FINISHPAGE_RUN_PARAMETERS "$INSTDIR\pcsx2.exe"
|
|
|
|
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ModifyRunCheckbox
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
2010-05-15 13:13:55 +00:00
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
; This defines the Advanced Uninstaller mode of operation...
|
|
|
|
!insertmacro UNATTENDED_UNINSTALL
|
|
|
|
|
|
|
|
!include "nsDialogs.nsh"
|
2010-05-17 04:52:31 +00:00
|
|
|
!include "ApplyExeProps.nsh"
|
2017-01-18 05:32:54 +00:00
|
|
|
!include "StrContains.nsh"
|
2017-03-13 22:46:15 +00:00
|
|
|
!include "SectionVersionCheck.nsh"
|
2016-12-29 20:20:52 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
Section ""
|
|
|
|
Call UninstallPrevious
|
2016-12-15 03:02:06 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
!include "SharedCore.nsh"
|
2010-05-29 16:24:26 +00:00
|
|
|
!include "SectionUninstaller.nsh"
|
2009-08-30 01:48:08 +00:00
|
|
|
|
2017-03-13 22:46:15 +00:00
|
|
|
Section ""
|
|
|
|
|
2019-01-26 03:45:37 +00:00
|
|
|
; Write the installation path into the registry
|
2017-03-13 22:46:15 +00:00
|
|
|
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}" "Publisher" "PCSX2 Team"
|
|
|
|
WriteRegStr HKLM "${INSTDIR_REG_KEY}" "DisplayIcon" "$INSTDIR\pcsx2.exe"
|
|
|
|
WriteRegStr HKLM "${INSTDIR_REG_KEY}" "DisplayVersion" "${APP_VERSION}"
|
2019-01-26 03:45:37 +00:00
|
|
|
WriteRegStr HKLM "${INSTDIR_REG_KEY}" "HelpLink" "https://forums.pcsx2.net"
|
2017-03-13 22:46:15 +00:00
|
|
|
${GetSize} "$INSTDIR" "/S=0K" $6 $7 $8
|
|
|
|
IntFmt $6 "0x%08X" $6
|
|
|
|
WriteRegDWORD HKLM "${INSTDIR_REG_KEY}" "EstimatedSize" "$6"
|
|
|
|
WriteRegStr HKLM "${INSTDIR_REG_KEY}" "UninstallString" "${UNINST_EXE}"
|
|
|
|
WriteRegDWORD HKLM "${INSTDIR_REG_KEY}" "NoModify" 1
|
|
|
|
WriteRegDWORD HKLM "${INSTDIR_REG_KEY}" "NoRepair" 1
|
|
|
|
WriteUninstaller "${UNINST_EXE}"
|
|
|
|
SectionEnd
|
2010-05-29 16:24:26 +00:00
|
|
|
|
2016-12-15 03:02:06 +00:00
|
|
|
Section "" SID_PCSX2
|
|
|
|
SectionEnd
|
|
|
|
|
2019-01-26 03:45:37 +00:00
|
|
|
; Gives the user a fancy checkbox to run PCSX2 right from the installer!
|
2016-12-15 03:02:06 +00:00
|
|
|
Function ModifyRunCheckbox
|
|
|
|
${IfNot} ${SectionIsSelected} ${SID_PCSX2}
|
2016-12-29 20:20:52 +00:00
|
|
|
SendMessage $MUI.FINISHPAGE.RUN ${BM_SETCHECK} ${BST_UNCHECKED} 0
|
|
|
|
EnableWindow $MUI.FINISHPAGE.RUN 0
|
2016-12-15 03:02:06 +00:00
|
|
|
${EndIf}
|
2017-03-13 22:46:15 +00:00
|
|
|
FunctionEnd
|