Skip to content

Commit 614984b

Browse files
committed
[84] modified setup script to install newer dependencies
1 parent 8c02418 commit 614984b

File tree

1 file changed

+48
-74
lines changed

1 file changed

+48
-74
lines changed

WindowsInstaller/setup.iss

+48-74
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
; **** REQUIREMENTS FOR COMPILING THIS INSTALLER SCRIPT ****
66
; The following files must exist in the directory defined by the SourceDir paramter under the [Setup] section below:
7-
; GDAL-1.9.2.win32-py2.7.exe (Python GDAL)
8-
; gdal-111-1600-core.msi (C++ GDAL)
9-
; gdal-111-1600-x64-core.msi (C++ GDAL)
10-
; mpi_x86.msi
11-
; mpi_x64.msi
12-
; vcredist_x86_2010.exe
13-
; vcredist_x64_2010.exe
14-
; Firewall.bat
7+
; GDAL-2.1.0.win32-py2.7.msi (Python GDAL)
8+
; gdal-201-1800-core.msi (C++ GDAL for x86)
9+
; gdal-201-1800-x64-core.msi (C++ GDAL for x64)
10+
; msmpisdk.msi (Microsoft MPI v7.1)
11+
; MSMpiSetup.exe (Microsoft MPI v7.1)
12+
; vcredist_x86_2010.exe (Micosoft C++ 2010 x86 redistributable)
13+
; vcredist_x64_2010.exe (Micosoft C++ 2010 x64 redistributable);
1514
; GDAL 32-bit library files must exist under the following directory (this directory should exists under the dir defined by SourceDir parameter):
1615
; GDAL_32/
1716
; GDAL 64-bit library files must exist under the following directory (this directory should exists under the dir defined by SourceDir parameter):
@@ -31,7 +30,7 @@
3130

3231

3332
#define MyAppName "TauDEM"
34-
#define MyAppVersion "5.3.6"
33+
#define MyAppVersion "5.3.7"
3534
#define MyAppPublisher "Utah State University"
3635
#define MyAppURL "http://hydrology.usu.edu/taudem/taudem5/index.html"
3736

@@ -75,16 +74,16 @@ Name: "C:\GDAL"
7574

7675
[Files]
7776
; copy files
78-
Source: "GDAL-1.9.2.win32-py2.7.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
79-
Source: "gdal-111-1600-core.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: not Is64BitInstallMode
80-
Source: "gdal-111-1600-x64-core.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: Is64BitInstallMode
77+
Source: "GDAL-2.1.0.win32-py2.7.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion
78+
Source: "gdal-201-1800-core.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: not Is64BitInstallMode
79+
Source: "gdal-201-1800-x64-core.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: Is64BitInstallMode
8180

82-
Source: "mpi_x86.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: not Is64BitInstallMode
83-
Source: "mpi_x64.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion; Check: Is64BitInstallMode
81+
Source: "msmpisdk.msi"; DestDir: "{app}\setup_files"; Flags: ignoreversion
82+
Source: "MSMpiSetup.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
8483

8584
; since for 64bit installtion we need both x86 and x64 redestributables no need to check OS architecture for copying files
86-
Source: "vcredist_x86_2010.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
87-
Source: "vcredist_x64_2010.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
85+
Source: "vc_redist.x86_2015.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
86+
Source: "vc_redist.x64_2015.exe"; DestDir: "{app}\setup_files"; Flags: ignoreversion
8887

8988
Source: "GDAL_64\*"; DestDir: "C:\GDAL"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode
9089
Source: "GDAL_32\*"; DestDir: "C:\GDAL"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode
@@ -94,21 +93,19 @@ Source: "TauDEM_Exe\win_64\*"; DestDir: "{app}\TauDEM5Exe"; Flags: ignoreversion
9493

9594
Source: "TauDEMArcGIS\*"; DestDir: "{app}\TauDEM5Arc"; Flags: ignoreversion recursesubdirs createallsubdirs
9695

97-
Source: "Firewall.bat"; DestDir: "{app}\setup_files"; Flags: ignoreversion
9896
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
9997

10098
[Run]
10199
; install GDAL core components
102-
Filename: "{app}\setup_files\GDAL-1.9.2.win32-py2.7.exe"; Flags: waituntilterminated shellexec
103-
Filename: "{app}\setup_files\gdal-111-1600-core.msi"; Flags: waituntilterminated shellexec; Check: not Is64BitInstallMode
104-
Filename: "{app}\setup_files\gdal-111-1600-x64-core.msi"; Flags: waituntilterminated shellexec; Check: Is64BitInstallMode
100+
; TODO: Implement functions to check if GDAL needs to be installed (all got the registry keys for all these 3 installations)
101+
Filename: "{app}\setup_files\GDAL-2.1.0.win32-py2.7.msi"; Flags: waituntilterminated shellexec
102+
Filename: "{app}\setup_files\gdal-201-1800-core.msi"; Flags: waituntilterminated shellexec; Check: not Is64BitInstallMode
103+
Filename: "{app}\setup_files\gdal-201-1800-x64-core.msi"; Flags: waituntilterminated shellexec; Check: Is64BitInstallMode
105104

106-
Filename: "{app}\setup_files\vcredist_x86_2010.exe"; Flags: waituntilterminated; Check: NeedsToInstallRedist(False)
107-
Filename: "{app}\setup_files\vcredist_x64_2010.exe"; Flags: waituntilterminated; Check: NeedsToInstallRedist(True)
105+
Filename: "{app}\setup_files\vc_redist.x86_2015.exe"; Flags: waituntilterminated; Check: NeedsToInstallRedist(False)
106+
Filename: "{app}\setup_files\vc_redist.x64_2015.exe"; Flags: waituntilterminated; Check: NeedsToInstallRedist(True)
108107

109-
Filename: "{app}\setup_files\mpi_x86.msi"; Flags: waituntilterminated shellexec; Check: NeedsToInstallMPI(False)
110-
Filename: "{app}\setup_files\mpi_x64.msi"; Flags: waituntilterminated shellexec; Check: NeedsToInstallMPI(True)
111-
Filename: "{app}\setup_files\Firewall.bat"; Flags: waituntilterminated shellexec; AfterInstall: CleanUp('{app}\setup_files')
108+
Filename: "{app}\setup_files\MSMpiSetup.exe"; Flags: waituntilterminated shellexec; Check: NeedsToInstallMPI()
112109

113110

114111
[Registry]
@@ -139,21 +136,21 @@ begin
139136
'3. When prompted to Choose Setup Type for GDAL, choose "Typical".'#13 +
140137
'4. The installer will also add firewall exceptions to allow TauDEM programs to run. These allow MPI interprocess communication used in the parallel computations. This is communication within your computer and not over any external network.'#13 +
141138
'5. The installer will also add the following path entries:' +
142-
'C:\Program Files\Microsoft HPC Pack 2012\Bin\;C:\GDAL;C:\Program Files\GDAL;C:\Program Files\TauDEM\TauDEM5Exe';
139+
'C:\Program Files\Microsoft MPI\Bin\;C:\GDAL;C:\Program Files\GDAL;C:\Program Files\TauDEM\TauDEM5Exe';
143140
144141
if Is64BitInstallMode then
145142
begin
146143
UserPage := CreateInputQueryPage(wpWelcome,
147144
'The following programs will be installed', '',
148-
'TauDEM version 5.3.5, GDAL 1.9.2 (Python 2.7), GDAL 111 (MSVC 2010) for 64 bit Winodws PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
149-
'Microsoft Visual C++ 2010 SP1 Redistributable Package (x64), Microsoft HPC Pack 2012 MS-MPI Redistributable Package'#13#13 + notes_string);
145+
'TauDEM version 5.3.7, GDAL 2.1.0 (Python 2.7), GDAL 201 (MSVC 2013) for 64 bit Windows PC, Microsoft Visual C++ 2015 Redistributable Package (x86), ' +
146+
'Microsoft Visual C++ 2015 Redistributable Package (x64), Microsoft MPI'#13#13 + notes_string);
150147
end
151148
else
152149
begin
153150
UserPage := CreateInputQueryPage(wpWelcome,
154151
'The following programs will be installed', '',
155-
'TauDEM version 5.3.5, GDAL 1.9.2 (Python 2.7), GDAL 111 (MSVC 2010) for 32 bit Windows PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
156-
'Microsoft HPC Pack 2012 MS-MPI Redistributable Package'#13#13 + notes_string);
152+
'TauDEM version 5.3.7, GDAL 2.1.0 (Python 2.7), GDAL 201 (MSVC 2013) for 32 bit Windows PC, Microsoft Visual C++ 2015 Redistributable Package (x86), ' +
153+
'Microsoft MPI'#13#13 + notes_string);
157154
end
158155
end;
159156
@@ -162,8 +159,8 @@ end;
162159
function NeedsToInstallRedist(IsInstallAppX64: boolean): boolean;
163160
begin
164161
if Is64BitInstallMode and IsInstallAppX64 then
165-
begin
166-
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Installer\Products\1926E8D15D0BCE53481466615F760A7F') then
162+
begin
163+
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64') then
167164
begin
168165
Result := False;
169166
exit;
@@ -174,9 +171,9 @@ begin
174171
exit;
175172
end;
176173
end
177-
else if Is64BitInstallMode and not IsInstallAppX64 then
178-
begin
179-
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Installer\Products\1D5E3C0FEDA1E123187686FED06E995A') then
174+
else if not Is64BitInstallMode and not IsInstallAppX64 then
175+
begin
176+
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86') then
180177
begin
181178
Result := False;
182179
exit;
@@ -189,49 +186,26 @@ begin
189186
end
190187
else
191188
begin
192-
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Installer\Products\1D5E3C0FEDA1E123187686FED06E995A') then
193-
begin
194-
Result := False;
195-
exit;
196-
end
197-
else
198-
begin
199-
Result := True;
200-
exit;
201-
end;
202-
end;
189+
Result := False;
190+
exit;
191+
end;
203192
end;
204193
205194
// Check if we need to install MPI
206-
// If either a 64 or 32 bit version of MPI is already installed, then this function returns False, otherwise True
207-
function NeedsToInstallMPI(IsInstallAppX64: boolean): boolean;
208-
begin
209-
if Is64BitInstallMode and IsInstallAppX64 then
210-
begin
211-
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Installer\Products\618A082FBC0C00743A6CF9DDC808DF81') then
212-
begin
213-
Result := False;
214-
exit;
215-
end
216-
else
217-
begin
218-
Result := True;
219-
exit;
220-
end;
221-
end
222-
else if not Is64BitInstallMode and not IsInstallAppX64 then
195+
// If MPI is already installed, then this function returns False, otherwise True
196+
function NeedsToInstallMPI(): boolean;
197+
begin
198+
199+
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\MPI') then
223200
begin
224-
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\Installer\Products\2B417A095389B814BBF02657C04C242B') then
225-
begin
226-
Result := False;
227-
exit;
228-
end
229-
else
230-
begin
231-
Result := True;
232-
exit;
233-
end;
234-
end;
201+
Result := False;
202+
exit;
203+
end
204+
else
205+
begin
206+
Result := True;
207+
exit;
208+
end;
235209
end;
236210
237211
function NeedsAddPath(NewPath: string; Win64: boolean; CheckOSArchitecture: boolean): boolean;

0 commit comments

Comments
 (0)