pcsx2/nsis/SharedBase.nsh
Christian Kenny 732dc881e4 Block installation on XP/fix an uninstaller regression and add ManifestDPIAware to the installer. Remove NSIS dirs from .gitignore.
Typo ;)

Remove XPStyle parameter. It isn't needed anymore

Updated copyright, added ManifestDPIAware for rich folks, removed IDOK true and Cheats folder from $INSTDIR as Turtleli suggested, formatting adjustments.

Gitignore: remove now unused NSIS directories

Fixed a nasty regression I introduced after a registry pointer was assumed to be incorrect. It contained UserMode data generated by the First Time Wizard. This was causing conflicts and the FTW to fail randomly when running PCSX2 after a reinstall due to old configuration data being read.

I added clarifcation below the original comment to reduce confusion in the future.
2017-05-16 09:39:12 +02:00

86 lines
2.8 KiB
Plaintext

; =======================================================================
; Core Includes and Defines
; =======================================================================
!ifndef INC_CORE
!define INC_CORE 1
!endif
!ifndef INC_PLUGINS
; Set to 0 to include the core binaries only (no plugins)
!define INC_PLUGINS 1
!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)
; uninstall folders.
!ifndef APP_VERSION
!define APP_VERSION "1.6.0"
!endif
!define APP_NAME "PCSX2 ${APP_VERSION}"
!define APP_FILENAME "pcsx2"
!define UNINSTALL_LOG "Uninst-pcsx2"
!define INSTDIR_REG_ROOT "HKLM"
; LZMA is the best, by far, so let's make sure it's always in use:
; (dictionaries larger than 24MB don't seem to help)
SetCompressor /SOLID lzma
SetCompressorDictSize 24
; The name of the installer
Name "${APP_NAME}"
; 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}"
; These defines are dependent on NSIS vars assigned above.
!define APP_EXE "$INSTDIR\${APP_FILENAME}.exe"
!define INSTDIR_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_FILENAME}"
!define PCSX2_README "PCSX2_Readme.pdf"
!define PCSX2_FAQ "PCSX2_FAQ.pdf"
Var DirectXSetupError
; =======================================================================
; Vista/Win7 UAC Stuff
; =======================================================================
; FIXME !!
; Request application privileges for Windows Vista/7; I'd love for this to be sensible about which
; execution level it requests, but UAC is breaking my mind. I included some code for User type
; detection in function IsUserAdmin, but not really using it constructively yet. (see also our
; uses of SetShellVarContext in the installer sections)
;!include "IsUserAdmin.nsi"
; Allow admin-rights PCSX2 users to be hardcore!
AllowRootDirInstall true
; Just require admin for now, until we figure out a nice way to allow for casual user installs.
RequestExecutionLevel admin
; =======================================================================
; MUI2 and Advanced Uninstaller Basics
; =======================================================================
!include "MUI2.nsh"
!include "AdvUninstLog.nsh"
; This defines the Advanced Uninstaller mode of operation...
!insertmacro UNATTENDED_UNINSTALL
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "banner.bmp"
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_ICON "AppIcon.ico"