/[pcsx2_0.9.7]/trunk/nsis/pcsx2_web_install.nsi
ViewVC logotype

Diff of /trunk/nsis/pcsx2_web_install.nsi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 1  Line 1 
1    
2  ; PCSX2 Web-based Install Package!  ; PCSX2 Web-based Install Package!
3  ; (a NSIS installer script)  ; (a NSIS installer script)
4  ;  ;
5  ; Copyright 2009-2010  PCSX2 Dev Team  ; Copyright 2009-2010  PCSX2 Dev Team
6  ;  ;
7  ; The installer generated by this script will download all relevant components for  ; The installer generated by this script will download all relevant components for
8  ; PCSX2 from a variety of mirror hosts.  Packages are only downloaded on an as-needed  ; PCSX2 from a variety of mirror hosts.  Packages are only downloaded on an as-needed
9  ; basis; this most importantly applies to the very bulky VS 2008 and VS2010 packages.  ; basis; this most importantly applies to the very bulky VS 2008 and VS2010 packages.
10    
11  !ifndef INC_PLUGINS  !ifndef INC_ZZOGL
12    ; Set to 0 to include the core binaries only (no plugins)    ; Includes ZZOGL and CG Toolkit (via web install).  Currently not supported (work in progress)
13    !define INC_PLUGINS   1    !define INC_ZZOGL         0
14  !endif  !endif
15    
16  !ifndef INC_ZZOGL  !define OUTFILE_POSTFIX "websetup"
17    ; Includes ZZOGL and CG Toolkit (via web install).  Currently not supported (work in progress)  !include "SharedBase.nsh"
18    !define INC_ZZOGL     0  
19  !endif  !insertmacro MUI_PAGE_COMPONENTS
20    !insertmacro MUI_PAGE_DIRECTORY
21  !ifndef INC_LANGS  !insertmacro MUI_PAGE_INSTFILES
22    ; Set to 1 to enable inclusion of Languages folders (which are currently missing in 0.9.7)    
23    !define INC_LANGS     0  !insertmacro MUI_UNPAGE_CONFIRM
24  !endif  !insertmacro MUI_UNPAGE_COMPONENTS
25    !insertmacro MUI_UNPAGE_INSTFILES
26  !define OUTFILE_POSTFIX "websetup"  
27  !include "SharedSettings.nsh"  !insertmacro MUI_LANGUAGE "English"
28    
29  !include "MUI2.nsh"  !include "ApplyExeProps.nsh"
30  !include "AdvUninstLog.nsh"  !include "SharedRedtape.nsh"
31    
32  ; Reserve features for improved performance with solid archiving.  ; =======================================================================
33  ;  (uncomment if we add our own install options ini files)  ;                            Installer Sections
34  ;!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS  ; =======================================================================
35  ;!insertmacro MUI_RESERVEFILE_LANGDLL  
36    ; -----------------------------------------------------------------------
37  ; =======================================================================  ; Basic section (emulation proper)
38  ;                          Vista/Win7 UAC Stuff  Section "!${APP_NAME} (required)" SEC_CORE
39  ; =======================================================================  
40      SectionIn RO
41  !include "IsUserAdmin.nsi"  
42    !include "SectionCoreReqs.nsh"
43  ; Allow admin-rights PCSX2 users to be hardcore!  
44  AllowRootDirInstall true    ; ------------------------------------------
45      ;          -- Plugins Section --
46  ; FIXME !!    ; ------------------------------------------
47  ; Request application privileges for Windows Vista/7; I'd love for this to be sensible about which  
48  ; execution level it requests, but UAC is breaking my mind.  I included some code for User type  !if ${INC_PLUGINS} > 0
49  ; detection in function IsUserAdmin, but not really using it constructively yet.  (see also our  
50  ; uses of SetShellVarContext in the installer sections)    ; [TODO]  :  Eventually the 'latest' plugin packages should be downloaded from one
51  RequestExecutionLevel admin    ;   of our mirrors.  For now plugins are included in the web installer.
52    
53  ; This defines the Advanced Uninstaller mode of operation...    SetOutPath "$INSTDIR\Plugins"
54  !insertmacro UNATTENDED_UNINSTALL    !insertmacro UNINSTALL.LOG_OPEN_INSTALL
55    
56  !define MUI_HEADERIMAGE      File /nonfatal /oname=gsdx-sse2-r${SVNREV_GSDX}.dll    ..\bin\Plugins\gsdx-sse2.dll
57  !define MUI_HEADERIMAGE_BITMAP "banner.bmp"      File /nonfatal /oname=gsdx-ssse3-r${SVNREV_GSDX}.dll   ..\bin\Plugins\gsdx-ssse3.dll
58  ;!define MUI_COMPONENTSPAGE_NODESC      File /nonfatal /oname=gsdx-sse4-r${SVNREV_GSDX}.dll    ..\bin\Plugins\gsdx-sse4.dll
59  !define MUI_COMPONENTSPAGE_SMALLDESC      File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll     ..\bin\Plugins\zerogs.dll
60      
61  !insertmacro MUI_PAGE_COMPONENTS      File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll      ..\bin\Plugins\spu2-x.dll
62  !insertmacro MUI_PAGE_DIRECTORY      File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll
63  !insertmacro MUI_PAGE_INSTFILES    
64          File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll   ..\bin\Plugins\cdvdiso.dll
65  !insertmacro MUI_UNPAGE_CONFIRM      File                                                   ..\bin\Plugins\cdvdGigaherz.dll
66  !insertmacro MUI_UNPAGE_COMPONENTS    
67  !insertmacro MUI_UNPAGE_INSTFILES      File /nonfatal /oname=lilypad-r${SVNREV_LILYPAD}.dll   ..\bin\Plugins\lilypad.dll
68        File                                                   ..\bin\Plugins\PadSSSPSX.dll
69  !insertmacro MUI_LANGUAGE "English"    
70      ;File                                                   ..\bin\Plugins\FWlinuz.dll
71  !include "ApplyExeProps.nsh"  
72  !include "SharedRedtape.nsh"    !insertmacro UNINSTALL.LOG_CLOSE_INSTALL
73    
74  ; =======================================================================  !endif
75  ;                            Installer Sections  
76  ; =======================================================================  SectionEnd
77    
78  ; -----------------------------------------------------------------------  !include "SectionShortcuts.nsh"
79  ; Basic section (emulation proper)  
80  Section "!${APP_NAME} (required)" SEC_CORE  !if ${INC_ZZOGL} > 0
81    Section "ZZogl Plugin (requires OpenGL)"
82    SectionIn RO  
83      SetOutPath "$INSTDIR\Plugins"
84  !include "SectionCoreReqs.nsh"    !insertmacro UNINSTALL.LOG_OPEN_INSTALL
85        File /oname=zzogl-pg-r${SVNREV_ZZOGL}.dll     ..\bin\Plugins\zzogl-pg.dll
86    ; ------------------------------------------    !insertmacro UNINSTALL.LOG_CLOSE_INSTALL
87    ;          -- Plugins Section --  
88    ; ------------------------------------------  SectionEnd
89    
90  !if ${INC_PLUGINS} > 0  Section "Nvidia's CG Toolkit"
91    
92    ; [TODO]  :  Eventually the 'latest' plugin packages should be downloaded from one    ; This section is required by anything using OpenGL, typically.
93    ;   of our mirrors.  For now plugins are included in the web installer.    ; It should be automatically checked when ZZogl is enabled.
94    
95    SetOutPath "$INSTDIR\Plugins"   ; CG Toolkit would be downloaded from here:
96    !insertmacro UNINSTALL.LOG_OPEN_INSTALL   ; http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_February2010_Setup.exe
97      
98      File /nonfatal /oname=gsdx-sse2-r${SVNREV_GSDX}.dll    ..\bin\Plugins\gsdx-sse2.dll  SectionEnd
99      File /nonfatal /oname=gsdx-ssse3-r${SVNREV_GSDX}.dll   ..\bin\Plugins\gsdx-ssse3.dll  !endif
100      File /nonfatal /oname=gsdx-sse4-r${SVNREV_GSDX}.dll    ..\bin\Plugins\gsdx-sse4.dll  
101      File /nonfatal /oname=zerogs-r${SVNREV_ZEROGS}.dll     ..\bin\Plugins\zerogs.dll  ; -----------------------------------------------------------------------
102      ; MSVC Redistributable - required if the user does not already have it
103      File /nonfatal /oname=spu2-x-r${SVNREV_SPU2X}.dll      ..\bin\Plugins\spu2-x.dll  ; Note: if your NSIS generates an error here it means you need to download the latest
104      File /nonfatal /oname=zerospu2-r${SVNREV_ZEROSPU2}.dll ..\bin\Plugins\zerospu2.dll  ; visual studio redist package from microsoft.  Any redist 2008/SP1 or newer will do.
105      ;
106      File /nonfatal /oname=cdvdiso-r${SVNREV_CDVDISO}.dll   ..\bin\Plugins\cdvdiso.dll  ; IMPORTANT: Online references for how to detect the presence of the VS2008 redists LIE.
107      File                                                   ..\bin\Plugins\cdvdGigaherz.dll  ; None of the methods are reliable, because the registry keys placed by the MSI installer
108      ; vary depending on operating system *and* MSI installer version (youch).
109      File /nonfatal /oname=lilypad-r${SVNREV_LILYPAD}.dll   ..\bin\Plugins\lilypad.dll  ;
110      File                                                   ..\bin\Plugins\PadSSSPSX.dll  Section "Microsoft Visual C++ 2008 SP1 Redist (required)"  SEC_CRT2008
111      
112    ;File                                                   ..\bin\Plugins\FWlinuz.dll    ;SectionIn RO
113    
114    !insertmacro UNINSTALL.LOG_CLOSE_INSTALL    ; Downloaded from:
115      ;  http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe
116  !endif  
117      SetOutPath "$TEMP"
118  SectionEnd  
119      DetailPrint "Downloading Visual C++ 2008 SP1 Redistributable Setup..."
120  !if ${INC_ZZOGL} > 0    DetailPrint "Contacting Microsoft.com..."
121  Section "ZZogl Plugin (requires OpenGL)"    NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe" "vcredist_2008_sp1_x86.exe"
122    
123    SetOutPath "$INSTDIR\Plugins"    Pop $R0 ;Get the return value
124    !insertmacro UNINSTALL.LOG_OPEN_INSTALL    StrCmp $R0 "success" OnSuccess
125      File /oname=zzogl-pg-r${SVNREV_ZZOGL}.dll     ..\bin\Plugins\zzogl-pg.dll    DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
126    !insertmacro UNINSTALL.LOG_CLOSE_INSTALL    DetailPrint "Contacting Googlecode.com..."
127      NSISdl::download /TIMEOUT=20000 "http://pcsx2.googlecode.com/files/vcredist_2008_sp1_x86.exe" "vcredist_2008_sp1_x86.exe"
128  SectionEnd  
129      ; [TODO] Provide a mirror for this file hosted from pcsx2.net .. ?  or emudev.net .. ?
130  Section "Nvidia's CG Toolkit"    ;Pop $R0 ;Get the return value
131      ;StrCmp $R0 "success" +2
132    ; This section is required by anything using OpenGL, typically.    ;NSISdl::download /TIMEOUT=15000 "http://www.pcsx2.net/vcredist_x86.exe" "vcredist_2008_sp1_x86.exe"
133    ; It should be automatically checked when ZZogl is enabled.  
134      Pop $R0 ;Get the return value
135   ; CG Toolkit would be downloaded from here:    StrCmp $R0 "success" +2
136   ; http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_February2010_Setup.exe      MessageBox MB_OK "Could not download Visual Studio 2008 Redist; none of the mirrors appear to be functional."
137          Goto done
138  SectionEnd  
139  !endif  OnSuccess:
140      DetailPrint "Running Visual C++ 2008 SP1 Redistributable Setup..."
141  ; -----------------------------------------------------------------------    ExecWait '"$TEMP\vcredist_2008_sp1_x86.exe" /qb'
142  ; Start Menu - Optional section (can be disabled by the user)    DetailPrint "Finished Visual C++ 2008 SP1 Redistributable Setup"
143  Section "Start Menu Shortcuts" SEC_STARTMENU    Delete "$TEMP\vcredist_2008_sp1_x86.exe"
144    
145    ; CreateShortCut gets the working directory from OutPath  done:
146    SetOutPath "$INSTDIR"  SectionEnd
147      
148    CreateDirectory "$SMPROGRAMS\PCSX2"  Section "Microsoft Visual C++ 2010 Redist (required)" SEC_CRT2010
149    CreateShortCut "$SMPROGRAMS\PCSX2\Uninstall ${APP_NAME}.lnk"  "${UNINST_EXE}"      ""    "${UNINST_EXE}"    0  
150    CreateShortCut "$SMPROGRAMS\PCSX2\${APP_NAME}.lnk"            "${APP_EXE}"         ""    "${APP_EXE}"       0    ; Make this required on the web installer, since it has a fully reliable check to
151      ; see if it needs to be downloaded and installed or not.
152    ;IfFileExists ..\bin\pcsx2-dev.exe 0 +2    SectionIn RO
153    ;  CreateShortCut "PCSX2\pcsx2-dev-r${SVNREV}.lnk"  "$INSTDIR\pcsx2-dev-r${SVNREV}.exe"  "" "$INSTDIR\pcsx2-dev-r${SVNREV}.exe" 0 "" "" \  
154    ;    "PCSX2 Devel (has additional logging support)"    ; Detection made easy: Unlike previous redists, VC2010 now generates a platform
155      ; independent key for checking availability.
156  SectionEnd    
157      ; Downloaded from:
158  ; -----------------------------------------------------------------------    ;   http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe
159  ; Desktop Icon - Optional section (can be disabled by the user)  
160  Section "Desktop Shortcut" SEC_DESKTOP    ClearErrors
161      ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
162    ; CreateShortCut gets the working directory from OutPath    IfErrors 0 +2
163    SetOutPath "$INSTDIR"    DetailPrint "Visual C++ 2010 Redistributable registry key was not found; assumed to be uninstalled."
164        StrCmp $R0 "1" 0 +3
165    CreateShortCut "$DESKTOP\${APP_NAME}.lnk"            "${APP_EXE}"      "" "${APP_EXE}"     0 "" "" "A Playstation 2 Emulator"      DetailPrint "Visual C++ 2010 Redistributable is already installed; skipping!"
166            Goto done
167  SectionEnd  
168      SetOutPath "$TEMP"
169  ; -----------------------------------------------------------------------  
170  ; MSVC Redistributable - required if the user does not already have it    DetailPrint "Downloading Visual C++ 2010 Redistributable Setup..."
171  ; Note: if your NSIS generates an error here it means you need to download the latest    DetailPrint "Contacting Microsoft.com..."
172  ; visual studio redist package from microsoft.  Any redist 2008/SP1 or newer will do.    NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "vcredist_2010_x86.exe"
173  ;  
174  ; IMPORTANT: Online references for how to detect the presence of the VS2008 redists LIE.    Pop $R0 ;Get the return value
175  ; None of the methods are reliable, because the registry keys placed by the MSI installer    StrCmp $R0 "success" OnSuccess
176  ; vary depending on operating system *and* MSI installer version (youch).    DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
177  ;    DetailPrint "Contacting Googlecode.com..."
178  Section "Microsoft Visual C++ 2008 SP1 Redist (required)"  SEC_CRT2008    NSISdl::download /TIMEOUT=20000 "http://pcsx2.googlecode.com/files/vcredist_2010_x86.exe" "vcredist_2010_x86.exe"
179    
180    ;SectionIn RO    ; [TODO] Provide a mirror for this file hosted from pcsx2.net .. ?  or emudev.net .. ?
181      ;Pop $R0 ;Get the return value
182    ; Downloaded from:    ;StrCmp $R0 "success" +2
183    ;  http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe    ;NSISdl::download /TIMEOUT=30000 "http://www.pcsx2.net/vcredist_x86.exe" "vcredist_2010_x86.exe"
184    
185    SetOutPath "$TEMP"    Pop $R0 ;Get the return value
186      StrCmp $R0 "success" +2
187    DetailPrint "Downloading Visual C++ 2008 SP1 Redistributable Setup..."      MessageBox MB_OK "Could not download Visual Studio 2010 Redist; none of the mirrors appear to be functional."
188    DetailPrint "Contacting Microsoft.com..."      Goto done
189    NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe" "vcredist_2008_sp1_x86.exe"  
190    OnSuccess:
191    Pop $R0 ;Get the return value    DetailPrint "Running Visual C++ 2010 SP1 Redistributable Setup..."
192    StrCmp $R0 "success" OnSuccess    ExecWait '"$TEMP\vcredist_2010_x86.exe" /qb'
193    DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"    DetailPrint "Finished Visual C++ 2010 SP1 Redistributable Setup"
194    DetailPrint "Contacting Googlecode.com..."    
195    NSISdl::download /TIMEOUT=20000 "http://pcsx2.googlecode.com/files/vcredist_2008_sp1_x86.exe" "vcredist_2008_sp1_x86.exe"    Delete "$TEMP\vcredist_2010_x86.exe"
196    
197    ; [TODO] Provide a mirror for this file hosted from pcsx2.net .. ?  or emudev.net .. ?  done:
198    ;Pop $R0 ;Get the return value  SectionEnd
199    ;StrCmp $R0 "success" +2  
200    ;NSISdl::download /TIMEOUT=15000 "http://www.pcsx2.net/vcredist_x86.exe" "vcredist_2008_sp1_x86.exe"  ; -----------------------------------------------------------------------
201    ; This section needs to be last, so that in case it fails, the rest of the program will
202    Pop $R0 ;Get the return value  ; be installed cleanly.
203    StrCmp $R0 "success" +2  ;
204      MessageBox MB_OK "Could not download Visual Studio 2008 Redist; none of the mirrors appear to be functional."  ; This section could be optional, but why not?  It's pretty painless to double-check that
205      Goto done  ; all the libraries are up-to-date.
206    ;
207  OnSuccess:  Section "DirectX Web Setup (recommended)" SEC_DIRECTX
208    DetailPrint "Running Visual C++ 2008 SP1 Redistributable Setup..."                                                                                
209    ExecWait '"$TEMP\vcredist_2008_sp1_x86.exe" /qb'    ;SectionIn RO
210    DetailPrint "Finished Visual C++ 2008 SP1 Redistributable Setup"  
211    Delete "$TEMP\vcredist_2008_sp1_x86.exe"    SetOutPath "$TEMP"
212    
213  done:    DetailPrint "Downloading DirectX Web Setup..."
214  SectionEnd    DetailPrint "Contacting Microsoft.com..."
215      NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe" dxwebsetup.exe
216  Section "Microsoft Visual C++ 2010 Redist (required)" SEC_CRT2010  
217      ; No mirrors provided for the dx web setup.  Either we get it from Microsoft, or we don't bother.
218    ; Make this required on the web installer, since it has a fully reliable check to    ; (this is done because there's a good chance the dxwebsetup we provide won't work anyway, if Microsoft
219    ; see if it needs to be downloaded and installed or not.    ;  has in fact re-arranged their website (again)).
220    SectionIn RO  
221      ;Pop $R0 ;Get the return value
222    ; Detection made easy: Unlike previous redists, VC2010 now generates a platform    ;StrCmp $R0 "success" OnSuccess
223    ; independent key for checking availability.    ;DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
224        ;DetailPrint "Contacting Googlecode.com..."
225    ; Downloaded from:    ;NSISdl::download /TIMEOUT=20000 "http://code.google.com/dxwebsetup01.exe" "dxwebsetup.exe"
226    ;   http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe  
227      Pop $R0 ;Get the return value
228    ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"    StrCmp $R0 "success" OnSuccess
229    IfErrors done    DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"
230    StrCmp $R0 "1" done    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."
231      Goto done
232    SetOutPath "$TEMP"  
233      ;Pop $R0 ;Get the return value
234    DetailPrint "Downloading Visual C++ 2010 Redistributable Setup..."    ;StrCmp $R0 "success" +2
235    DetailPrint "Contacting Microsoft.com..."    ;NSISdl::download /TIMEOUT=30000 "http://www.pcsx2.net/dxwebsetup.exe" "dxwebsetup.exe"
236    NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe" "vcredist_2010_x86.exe"  
237    OnSuccess:
238    Pop $R0 ;Get the return value    DetailPrint "Running DirectX Web Setup..."
239    StrCmp $R0 "success" OnSuccess    ExecWait '"$TEMP\dxwebsetup.exe" /Q' $DirectXSetupError
240    DetailPrint "Cound not contact Microsoft.com, or the file has been (re)moved!"    DetailPrint "Finished DirectX Web Setup"                                    
241    DetailPrint "Contacting Googlecode.com..."    Delete "$TEMP\dxwebsetup.exe"
242    NSISdl::download /TIMEOUT=20000 "http://pcsx2.googlecode.com/files/vcredist_2010_x86.exe" "vcredist_2010_x86.exe"  
243    done:
244    ; [TODO] Provide a mirror for this file hosted from pcsx2.net .. ?  or emudev.net .. ?  
245    ;Pop $R0 ;Get the return value  SectionEnd
246    ;StrCmp $R0 "success" +2  
247    ;NSISdl::download /TIMEOUT=30000 "http://www.pcsx2.net/vcredist_x86.exe" "vcredist_2010_x86.exe"  !include "SectionUninstaller.nsh"
248    
249    Pop $R0 ;Get the return value  LangString DESC_CORE       ${LANG_ENGLISH} "Core components (binaries, plugins, languages, etc)."
250    StrCmp $R0 "success" +2  
251      MessageBox MB_OK "Could not download Visual Studio 2010 Redist; none of the mirrors appear to be functional."  LangString DESC_STARTMENU  ${LANG_ENGLISH} "Adds shortcuts for PCSX2 to the start menu (all users)."
252      Goto done  LangString DESC_DESKTOP    ${LANG_ENGLISH} "Adds a shortcut for PCSX2 to the desktop (all users)."
253    
254  OnSuccess:  LangString DESC_CRT2008    ${LANG_ENGLISH} "Required!  Only uncheck if you are certain this component is already installed."
255    DetailPrint "Running Visual C++ 2010 SP1 Redistributable Setup..."  LangString DESC_CRT2010    ${LANG_ENGLISH} "Will only be downloaded if you don't already have it installed."
256    ExecWait '"$TEMP\vcredist_2010_x86.exe" /qb'  LangString DESC_DIRECTX    ${LANG_ENGLISH} "Only uncheck this if you are quite certain your Direct3D runtimes are up to date."
257    DetailPrint "Finished Visual C++ 2010 SP1 Redistributable Setup"  
258      !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
259    Delete "$TEMP\vcredist_2010_x86.exe"    !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CORE}        $(DESC_CORE)
260      !insertmacro MUI_DESCRIPTION_TEXT ${SEC_STARTMENU}   $(DESC_STARTMENU)
261  done:    !insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP}     $(DESC_DESKTOP)
262  SectionEnd  
263      !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2008}     $(DESC_CRT2008)
264  ; -----------------------------------------------------------------------    !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2010}     $(DESC_CRT2010)
265  ; This section needs to be last, so that in case it fails, the rest of the program will    !insertmacro MUI_DESCRIPTION_TEXT ${SEC_DIRECTX}     $(DESC_DIRECTX)
266  ; be installed cleanly.  !insertmacro MUI_FUNCTION_DESCRIPTION_END
 ;  
 ; This section could be optional, but why not?  It's pretty painless to double-check that  
 ; all the libraries are up-to-date.  
 ;  
 Section "DirectX Web Setup (recommended)" SEC_DIRECTX  
                                                                                 
   ;SectionIn RO  
   
   SetOutPath "$TEMP"  
   
   DetailPrint "Downloading DirectX Web Setup..."  
   DetailPrint "Contacting Microsoft.com..."  
   NSISdl::download /TIMEOUT=15000 "http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe" dxwebsetup.exe  
   
   ; No mirrors provided for the dx web setup.  Either we get it from Microsoft, or we don't bother.  
   ; (this is done because there's a good chance the dxwebsetup we provide won't work anyway, if Microsoft  
   ;  has in fact re-arranged their website (again)).  
   
   ;Pop $R0 ;Get the return value  
   ;StrCmp $R0 "success" OnSuccess  
   ;DetailPrint "Cound 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!"  
   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  
   
   ;Pop $R0 ;Get the return value  
   ;StrCmp $R0 "success" +2  
   ;NSISdl::download /TIMEOUT=30000 "http://www.pcsx2.net/dxwebsetup.exe" "dxwebsetup.exe"  
   
 OnSuccess:  
   DetailPrint "Running DirectX Web Setup..."  
   ExecWait '"$TEMP\dxwebsetup.exe" /Q' $DirectXSetupError  
   DetailPrint "Finished DirectX Web Setup"                                      
   Delete "$TEMP\dxwebsetup.exe"  
   
 done:  
   
 SectionEnd  
   
 ; =======================================================================  
 ;                           Un.Installer Sections  
 ; =======================================================================  
   
 ; -----------------------------------------------------------------------  
 Section "Un.${APP_NAME} (EXEs, DLLs, game database, etc)"  
   
   SetShellVarContext all  
   
   !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR"  
   
   ; Remove registry keys (but only the ones related to the installer -- user options remain)  
   DeleteRegKey HKLM "${INSTDIR_REG_KEY}"  
   
   Call un.removeShorties  
   
   !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Langs"  
   !insertmacro UNINSTALL.LOG_UNINSTALL "$INSTDIR\Plugins"  
   
   ; Kill the entire PCSX2 registry key... ?  (not recommended)  
   ;DeleteRegKey ${INSTDIR_REG_ROOT} Software\PCSX2  
   
 SectionEnd  
   
 Section "Un.Complete Registry Cleanup"  
   
   ; Kill the entire PCSX2 registry key!  
   DeleteRegKey ${INSTDIR_REG_ROOT} Software\PCSX2  
   
   ; Kill AppData/PCSX2 entry!  
   
   SetShellVarContext current  
   StrCpy $0 $LOCALAPPDATA\PCSX2  
   Call un.DeleteDirIfEmpty  
   StrCpy $0 $APPDATA\PCSX2  
   Call un.DeleteDirIfEmpty  
   
 SectionEnd  
   
   
 LangString DESC_CORE       ${LANG_ENGLISH} "Core components (binaries, plugins, languages, etc)."  
   
 LangString DESC_STARTMENU  ${LANG_ENGLISH} "Adds shortcuts for PCSX2 to the start menu (all users)."  
 LangString DESC_DESKTOP    ${LANG_ENGLISH} "Adds a shortcut for PCSX2 to the desktop (all users)."  
   
 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_DIRECTX    ${LANG_ENGLISH} "Only uncheck this if you are quite certain your Direct3D runtimes are up to date."  
   
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN  
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CORE}        $(DESC_CORE)  
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_STARTMENU}   $(DESC_STARTMENU)  
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP}     $(DESC_DESKTOP)  
   
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2008}     $(DESC_CRT2008)  
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_CRT2010}     $(DESC_CRT2010)  
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC_DIRECTX}     $(DESC_DIRECTX)  
 !insertmacro MUI_FUNCTION_DESCRIPTION_END  

Legend:
Removed from v.31  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22