Installer: More fixes.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5790 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2.code 2013-12-31 10:59:17 +00:00
parent cda2a2011d
commit 27a93ffb6d
6 changed files with 132 additions and 14 deletions

View File

@ -6,7 +6,7 @@
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}"
;VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2012 PCSX2 Dev Team"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2014 PCSX2 Dev Team"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installs PCSX2, a Playstation 2 Emulator for the PC."
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}.${SVNREV_PACKAGE}"

View File

@ -44,7 +44,7 @@
; uninstall folders.
!ifndef APP_VERSION
!define APP_VERSION "1.1.0"
!define APP_VERSION "1.2.0"
!endif
!define APP_NAME "PCSX2 ${APP_VERSION} (r${SVNREV_PACKAGE})"

View File

@ -113,6 +113,9 @@ Function un.onUninstSuccess
StrCpy $0 "$INSTDIR\Cheats"
Call un.DeleteDirIfEmpty
StrCpy $0 "$INSTDIR\Cheats_ws"
Call un.DeleteDirIfEmpty
StrCpy $0 "$INSTDIR"
Call un.DeleteDirIfEmpty

View File

@ -7,15 +7,22 @@
( Currently at http://nsis.sourceforge.net/Advanced_Uninstall_Log_NSIS_Header )
/*******
-- Not needed as we now build using VS2010 --:
-- Not needed as we now build using VS2013 --:
* Download the Visual C++ 2008 SP1 Redistributable and save it to this nsis/ folder under the name:
vcredist_2008_sp1_x86.exe ( http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe )
*******/
/*******
-- Not needed as we now build using VS2013 --:
* Download the Visual C++ 2010 SP1 Redistributable and save it to this nsis/ folder.
( http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe )
Rename the download to "vcredist_2010_sp1_x86.exe".
*******/
* Download the Visual C++ 2013 Redistributable and save it to this nsis/ folder.
( http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe )
Rename the download to "vcredist_2013_x86.exe".
* Download the DirectX Web Installer (dxwebsetup.exe) from Microsoft's website and save it to
this nsis/ folder. (currently required, might be made optional later).
( http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe )
@ -26,7 +33,7 @@
* Release SSSE3 (only needed if packaging plugins)
* Release SSE4 (only needed if packaging plugins)
* Release AVX (only needed if packaging plugins)
* Devel (optional)
* Devel (optional) /* not enabled in the installer either, so need to do that as well */
You may selectively unload plugins you do not wish to package prior to running the NSIS
script.

View File

@ -2,7 +2,7 @@
; PCSX2 Full/Complete Install Package!
; (a NSIS installer script)
;
; Copyright 2009-2012 PCSX2 Dev Team
; Copyright 2009-2014 PCSX2 Dev Team
;
!ifndef INC_CRT_2008
@ -12,7 +12,12 @@
!ifndef INC_CRT_2010
; Set to 0 to disable inclusion of Visual Studio 2010 SP1 CRT Redists
!define INC_CRT_2010 1
!define INC_CRT_2010 0
!endif
!ifndef INC_CRT_2013
; Set to 0 to disable inclusion of Visual Studio 2013 SP1 CRT Redists
!define INC_CRT_2013 1
!endif
ShowInstDetails nevershow
@ -76,6 +81,7 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=lilypad-r${SVNREV_LILYPAD}.dll ..\bin\Plugins\lilypad.dll
File ..\bin\Plugins\PadSSSPSX.dll
File /nonfatal ..\bin\Plugins\padPokopom.dll
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
@ -118,9 +124,12 @@ Section "Microsoft Visual C++ 2010 SP1 Redist" SEC_CRT2010
;SectionIn RO
; Detection made easy: Unlike previous redists, VC2010 now generates a platform
; Detection made easy: Unlike previous redists, VC2010 now generates a
; independent key for checking availability.
; These locations are current as of Jan. 2014. The code below might not work anymore (rama)
; HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\Runtimes\x86 for x64 Windows
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\Runtimes\x86 for x86 Windows
; Downloaded from:
; http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe
@ -144,6 +153,39 @@ done:
SectionEnd
!endif
!if ${INC_CRT_2013} > 0
Section "Microsoft Visual C++ 2013 Redist" SEC_CRT2013
;SectionIn RO
; Detection made easy: Unlike previous redists, VC2013 now generates a platform
; independent key for checking availability.
; HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x64 Windows
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x86 Windows
; Downloaded from:
; http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
IfErrors 0 +2
DetailPrint "Visual C++ 2013 Redistributable registry key was not found; assumed to be uninstalled."
StrCmp $R0 "1" 0 +3
DetailPrint "Visual C++ 2013 Redistributable is already installed; skipping!"
Goto done
SetOutPath "$TEMP"
File "vcredist_2013_x86.exe"
DetailPrint "Running Visual C++ 2013 Redistributable Setup..."
ExecWait '"$TEMP\vcredist_2013_x86.exe" /qb'
DetailPrint "Finished Visual C++ 2013 Redistributable Setup"
Delete "$TEMP\vcredist_2013_x86.exe"
done:
SectionEnd
!endif
; -----------------------------------------------------------------------
; This section needs to be last, so that in case it fails, the rest of the program will
; be installed cleanly.
@ -174,6 +216,7 @@ LangString DESC_DESKTOP ${LANG_ENGLISH} "Adds a shortcut for PCSX2 to the des
LangString DESC_CRT2008 ${LANG_ENGLISH} "Required by the PCSX2 binaries packaged in this installer."
LangString DESC_CRT2010 ${LANG_ENGLISH} "Required by the PCSX2 binaries packaged in this installer."
LangString DESC_CRT2013 ${LANG_ENGLISH} "Required by the PCSX2 binaries packaged in this installer."
LangString DESC_DIRECTX ${LANG_ENGLISH} "Only uncheck this if you are quite certain your Direct3D runtimes are up to date."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@ -189,6 +232,10 @@ LangString DESC_DIRECTX ${LANG_ENGLISH} "Only uncheck this if you are quite c
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2010} $(DESC_CRT2010)
!endif
!if ${INC_CRT_2013} > 0
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2013} $(DESC_CRT2013)
!endif
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DIRECTX} $(DESC_DIRECTX)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

View File

@ -2,7 +2,7 @@
; PCSX2 Web-based Install Package!
; (a NSIS installer script)
;
; Copyright 2009-2012 PCSX2 Dev Team
; Copyright 2009-2014 PCSX2 Dev Team
;
; The installer generated by this script will download all relevant components for
; PCSX2 from a variety of mirror hosts. Packages are only downloaded on an as-needed
@ -67,7 +67,8 @@ Section "!${APP_NAME} (required)" SEC_CORE
File /nonfatal /oname=lilypad-r${SVNREV_LILYPAD}.dll ..\bin\Plugins\lilypad.dll
File ..\bin\Plugins\PadSSSPSX.dll
File /nonfatal ..\bin\Plugins\padPokopom.dll
!insertmacro UNINSTALL.LOG_CLOSE_INSTALL
!endif
@ -144,7 +145,6 @@ OnSuccess:
done:
SectionEnd
!endif
Section "Microsoft Visual C++ 2010 SP1 Redist" SEC_CRT2010
@ -152,9 +152,13 @@ Section "Microsoft Visual C++ 2010 SP1 Redist" SEC_CRT2010
; see if it needs to be downloaded and installed or not.
SectionIn RO
; Detection made easy: Unlike previous redists, VC2010 now generates a platform
; Detection made easy: Unlike previous redists, VC2010 now generates a
; independent key for checking availability.
; These locations are current as of Jan. 2014. The code below might not work anymore (rama)
; HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\Runtimes\x86 for x64 Windows
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\Runtimes\x86 for x86 Windows
; Downloaded from:
; http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe
@ -195,6 +199,61 @@ OnSuccess:
Delete "$TEMP\vcredist_2010_sp1_x86.exe"
done:
SectionEnd
!endif
Section "Microsoft Visual C++ 2013 SP1 Redist" SEC_CRT2013
; Make this required on the web installer, since it has a fully reliable check to
; see if it needs to be downloaded and installed or not.
SectionIn RO
; Detection made easy: Unlike previous redists, VC2013 now generates a platform
; independent key for checking availability.
; HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x64 Windows
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x86 Windows
; Download from:
; http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" "Installed"
IfErrors 0 +2
DetailPrint "Visual C++ 2013 Redistributable registry key was not found; assumed to be uninstalled."
StrCmp $R0 "1" 0 +3
DetailPrint "Visual C++ 2013 Redistributable is already installed; skipping!"
Goto done
SetOutPath "$TEMP"
DetailPrint "Downloading Visual C++ 2013 Redistributable Setup..."
DetailPrint "Contacting Microsoft.com..."
NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" "vcredist_2013_x86.exe"
Pop $R0 ;Get the return value
StrCmp $R0 "success" OnSuccess
DetailPrint "Could not contact Microsoft.com, or the file has been (re)moved!"
DetailPrint "Contacting Googlecode.com..."
NSISdl::download /TIMEOUT=20000 "http://pcsx2.googlecode.com/files/vcredist_2013_x86.exe" "vcredist_2013_x86.exe"
; [TODO] Provide a mirror for this file hosted from pcsx2.net .. ? or emudev.net .. ?
;Pop $R0 ;Get the return value
;StrCmp $R0 "success" +2
;NSISdl::download /TIMEOUT=30000 "http://www.pcsx2.net/vcredist_x86.exe" "vcredist_2013_x86.exe"
Pop $R0 ;Get the return value
StrCmp $R0 "success" +2
MessageBox MB_OK "Could not download Visual Studio 2013 Redist; none of the mirrors appear to be functional."
Goto done
OnSuccess:
DetailPrint "Running Visual C++ 2013 Redistributable Setup..."
ExecWait '"$TEMP\vcredist_2013_x86.exe" /qb'
DetailPrint "Finished Visual C++ 2013 SP1 Redistributable Setup"
Delete "$TEMP\vcredist_2013_x86.exe"
done:
SectionEnd
@ -221,13 +280,13 @@ Section "DirectX Web Setup" SEC_DIRECTX
;Pop $R0 ;Get the return value
;StrCmp $R0 "success" OnSuccess
;DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
;DetailPrint "Could not contact Microsoft.com, or the file has been (re)moved!"
;DetailPrint "Contacting Googlecode.com..."
;NSISdl::download /TIMEOUT=20000 "http://code.google.com/dxwebsetup01.exe" "dxwebsetup.exe"
Pop $R0 ;Get the return value
StrCmp $R0 "success" OnSuccess
DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
DetailPrint "Could not contact Microsoft.com, or the file has been (re)moved!"
MessageBox MB_OK "Could not download the DirectX Web Setup. Microsoft probably rearranged their website. Please do an internet search for 'DirectX Setup' and download and install it yourself after this installer has finished."
Goto done
@ -254,6 +313,7 @@ LangString DESC_DESKTOP ${LANG_ENGLISH} "Adds a shortcut for PCSX2 to the des
LangString DESC_CRT2008 ${LANG_ENGLISH} "Required! Only uncheck if you are certain this component is already installed."
LangString DESC_CRT2010 ${LANG_ENGLISH} "Will only be downloaded if you don't already have it installed."
LangString DESC_CRT2013 ${LANG_ENGLISH} "Will only be downloaded if you don't already have it installed."
LangString DESC_DIRECTX ${LANG_ENGLISH} "Only uncheck this if you are quite certain your Direct3D runtimes are up to date."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@ -263,7 +323,8 @@ LangString DESC_DIRECTX ${LANG_ENGLISH} "Only uncheck this if you are quite c
!if 0
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2008} $(DESC_CRT2008)
!endif
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2010} $(DESC_CRT2010)
!endif
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2013} $(DESC_CRT2013)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DIRECTX} $(DESC_DIRECTX)
!insertmacro MUI_FUNCTION_DESCRIPTION_END