4
4
5
5
; **** REQUIREMENTS FOR COMPILING THIS INSTALLER SCRIPT ****
6
6
; The following files must exist in the same directory location as this script
7
- ; gdal-111-1600-core.msi
8
- ; gdal-111-1600-x64-core.msi
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
9
10
; mpi_x86.msi
10
11
; mpi_x64.msi
11
12
; vcredist_x86_2010.exe
@@ -65,6 +66,7 @@ Name: "C:\GDAL"
65
66
66
67
[Files]
67
68
; copy files
69
+ Source : " GDAL-1.9.2.win32-py2.7.exe" ; DestDir : " {app} \setup_files" ; Flags : ignoreversion
68
70
Source : " gdal-111-1600-core.msi" ; DestDir : " {app} \setup_files" ; Flags : ignoreversion ; Check : not Is64BitInstallMode
69
71
Source : " gdal-111-1600-x64-core.msi" ; DestDir : " {app} \setup_files" ; Flags : ignoreversion ; Check : Is64BitInstallMode
70
72
@@ -88,6 +90,7 @@ Source: "Firewall.bat"; DestDir: "{app}\setup_files"; Flags: ignoreversion
88
90
89
91
[Run]
90
92
; install GDAL core components
93
+ Filename : " {app} \setup_files\GDAL-1.9.2.win32-py2.7.exe" ; Flags : waituntilterminated shellexec
91
94
Filename : " {app} \setup_files\gdal-111-1600-core.msi" ; Flags : waituntilterminated shellexec ; Check : not Is64BitInstallMode
92
95
Filename : " {app} \setup_files\gdal-111-1600-x64-core.msi" ; Flags : waituntilterminated shellexec ; Check : Is64BitInstallMode
93
96
@@ -106,6 +109,10 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
106
109
;set GDAL program path
107
110
Root : HKLM; Subkey : " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ; ValueType :string ; ValueName :" PATH" ; ValueData :" {olddata};{pf} \GDAL" ; Check : NeedsAddPath(' {pf} \GDAL' , True, True); Flags : preservestringtype
108
111
Root : HKLM; Subkey : " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ; ValueType :string ; ValueName :" PATH" ; ValueData :" {olddata};{pf} \GDAL" ; Check : NeedsAddPath(' {pf} \GDAL' , False, True); Flags : preservestringtype
112
+
113
+ ;set GDAL_DATA (new environment variable)
114
+ Root : HKLM; Subkey : " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ; ValueType :string ; ValueName :" GDAL_DATA" ; ValueData :" {pf} \GDAL\gdal-data" ; Flags : preservestringtype
115
+
109
116
; set TauDEM path
110
117
Root : HKLM; Subkey : " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ; ValueType :string ; ValueName :" PATH" ; ValueData :" {olddata};{app} \TauDEM5Exe" ; Check : NeedsAddPath(' {app} \TauDEM5Exe' , False, True); Flags : preservestringtype
111
118
Root : HKLM; Subkey : " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ; ValueType :string ; ValueName :" PATH" ; ValueData :" {olddata};{app} \TauDEM5Exe" ; Check : NeedsAddPath(' {app} \TauDEM5Exe' , True, True); Flags : preservestringtype
@@ -129,14 +136,14 @@ begin
129
136
begin
130
137
UserPage := CreateInputQueryPage(wpWelcome,
131
138
' The following programs will be installed' , ' ' ,
132
- ' TauDEM version 5.3, GDAL 111 (MSVC 2010) for 64 bit Winodws PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
139
+ ' TauDEM version 5.3.2, GDAL 1.9.2 (Python 2.7) , GDAL 111 (MSVC 2010) for 64 bit Winodws PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
133
140
' Microsoft Visual C++ 2010 SP1 Redistributable Package (x64), Microsoft HPC Pack 2012 MS-MPI Redistributable Package' #13 #13 + notes_string);
134
141
end
135
142
else
136
143
begin
137
144
UserPage := CreateInputQueryPage(wpWelcome,
138
145
' The following programs will be installed' , ' ' ,
139
- ' TauDEM version 5.3, GDAL 111 (MSVC 2010) for 32 bit Windows PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
146
+ ' TauDEM version 5.3.2, GDAL 1.9.2 (Python 2.7) , GDAL 111 (MSVC 2010) for 32 bit Windows PC, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), ' +
140
147
' Microsoft HPC Pack 2012 MS-MPI Redistributable Package' #13 #13 + notes_string);
141
148
end
142
149
end ;
@@ -257,6 +264,25 @@ begin
257
264
// MsgBox('Result of path matching:match found', mbInformation, MB_OK)
258
265
end ;
259
266
267
+ function GetPathData (Param: String): String;
268
+ { The 'Param' parameter has the value of the existing value for the system 'Path' variable }
269
+ var
270
+ index: integer;
271
+ dataToAdd: string;
272
+ begin
273
+ { This is the data we want to add to the system 'Path' variable}
274
+ dataToAdd:= ExpandConstant(' {app}' ) + ' \GDAL\gdalwin32-1.6\bin;' + ExpandConstant(' {app}' ) + ' \GDAL_Proj\proj\bin' ;
275
+
276
+ { check if the data we want to add is already in the 'Path' variable }
277
+ index:=pos(dataToAdd, Param)
278
+ if index > 0 then
279
+ { no need to change data for the path - so return the existing data}
280
+ Result:= Param
281
+ else
282
+ { append new data to existing path data and return the resultant data }
283
+ Result:= Param + ' ;' + dataToAdd;
284
+ end ;
285
+
260
286
procedure CleanUp (FolderToDelete: string);
261
287
begin
262
288
if DirExists(ExpandConstant(FolderToDelete)) then
0 commit comments