Skip to content

Commit

Permalink
Block installation on XP/fix an uninstaller regression and add Manife…
Browse files Browse the repository at this point in the history
…stDPIAware 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.
  • Loading branch information
MrCK1 authored and gregory38 committed May 16, 2017
1 parent 5298c20 commit 732dc88
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 135 deletions.
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ oprofile_data/
/bin/sstates
/deps
/ipch
/nsis/output/

!/3rdparty/libjpeg/change.log
/3rdparty/portaudio/portaudio-2.0.pc
Expand All @@ -95,13 +94,6 @@ oprofile_data/
/3rdparty/portaudio/src/hostapi/wasapi/mingw-include
/3rdparty/**/include/wx/setup.h
/3rdparty/**/wx/msw/rcdefs.h
/nsis/svnrev_cdvdiso.nsh
/nsis/svnrev_gsdx.nsh
/nsis/svnrev_lilypad.nsh
/nsis/svnrev_pcsx2.nsh
/nsis/svnrev_spu2x.nsh
/nsis/svnrev_zerogs.nsh
/nsis/svnrev_zerospu2.nsh
/pcsx2/gui/Resources/*.h
!/pcsx2/gui/Resources/EmbeddedImage.h
/plugins/CDVDolio/Template
Expand Down
2 changes: 1 addition & 1 deletion nsis/ApplyExeProps.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}"
;VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2016 PCSX2 Dev Team"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2017 PCSX2 Dev Team"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installs PCSX2, a Playstation 2 Emulator for the PC."
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}"

Expand Down
41 changes: 16 additions & 25 deletions nsis/SectionCoreReqs.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,41 @@

SetShellVarContext all
;SetShellVarContext current

SetOutPath "$INSTDIR"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File ..\bin\pcsx2.exe
File ..\bin\pcsx2.exe
;File /nonfatal ..\bin\pcsx2-dev.exe

; ------------------------------------------
; -- Shared Core Components --
; ------------------------------------------
; (Binaries, shared DLLs, null plugins, game database, languages, etc)

File ..\bin\GameIndex.dbf
File ..\bin\cheats_ws.zip
File ..\bin\PCSX2_keys.ini.default
File ..\bin\GameIndex.dbf
File ..\bin\cheats_ws.zip
File ..\bin\PCSX2_keys.ini.default

!insertmacro UNINSTALL.LOG_CLOSE_INSTALL

!insertmacro UNINSTALL.LOG_CLOSE_INSTALL

;/bin/Cheats needs CreateDirectory to prevent MakeNSIS from failing due to the folder being empty
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
CreateDirectory "$INSTDIR\Cheats"
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL

SetOutPath "$INSTDIR\Docs"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File ..\bin\docs\*
File ..\bin\docs\*
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
SetOutPath "$INSTDIR\Shaders"

SetOutPath "$INSTDIR\Shaders"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
File ..\bin\shaders\*
File ..\bin\shaders\*
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL

SetOutPath "$INSTDIR\Plugins"
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
!insertmacro UNINSTALL.LOG_OPEN_INSTALL
; NULL plugins are required, because the PCSX2 plugin selector needs a dummy plugin in every slot
; in order to run (including CDVD!) -- and really there should be more but we don't have working
; SPU2 null plugins right now.

;File ..\bin\Plugins\GSnull.dll
;File ..\bin\Plugins\SPU2null.dll
; in order to run (including CDVD!)

File ..\bin\Plugins\USBnull.dll
File ..\bin\Plugins\DEV9null.dll
File ..\bin\Plugins\FWnull.dll
;File ..\bin\Plugins\CDVDnull.dll
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL


Expand All @@ -68,7 +59,7 @@

; Write the installation path into the registry
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}" "UninstallString" "${UNINST_EXE}"
Expand Down
14 changes: 10 additions & 4 deletions nsis/SectionUninstaller.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ Function .onInit
;prepare Advanced Uninstall log always within .onInit function
!insertmacro UNINSTALL.LOG_PREPARE_INSTALL

; MORE UAC HELL ---------- >
;call IsUserAdmin

!include WinVer.nsh
${IfNot} ${AtLeastWinVista}
MessageBox MB_OK "Your operating system is unsupported by PCSX2. Please upgrade your operating system or install PCSX2 1.4.0."
Quit
${EndIf}
FunctionEnd

Function .onInstSuccess
Expand Down Expand Up @@ -69,6 +71,11 @@ Section "Un.Program and Plugins ${APP_NAME}"
; otherwise, pcsx2 will be "confused" if it's re-installed later.
DeleteRegKey HKLM Software\PCSX2

; Please note that pointing to HKCU here is intentional. It is the only key generated by PCSX2 and *not* NSIS!
; The key stores configuration data used by the First Time Wizard (check AppConfig.cpp for details) such as DocumentsFolderMode, ect.
; Failure to delete this key can result in configuration errors
DeleteRegKey HKCU Software\PCSX2

!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"

; Remove uninstaller info reg key ( Wow6432Node on 64bit Windows! )
Expand All @@ -79,7 +86,6 @@ Section "Un.Program and Plugins ${APP_NAME}"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Langs"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Plugins"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Docs"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Cheats"
!insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Shaders"
; Remove files and registry key that store PCSX2 paths configurations
SetShellVarContext current
Expand Down
2 changes: 0 additions & 2 deletions nsis/SharedBase.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

!define INSTDIR_REG_ROOT "HKLM"

XPStyle on

; 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
Expand Down
Loading

0 comments on commit 732dc88

Please sign in to comment.