83
83
GlobalElixirReleases: array of TElixirRelease;
84
84
GlobalErlangData: TErlangData;
85
85
86
- CacheSelectedRelease: TElixirRelease;
86
+ GlobalElixirCSVFilePath: String;
87
+ GlobalErlangCSVFilePath: String;
87
88
88
- function GetElixirCSVFilePath : String;
89
- begin
90
- Result := ExpandConstant(' {tmp}\' + GetURLFilePart(' {#ELIXIR_CSV_URL}' ));
91
- end ;
92
-
93
- function GetErlangCSVFilePath : String;
94
- begin
95
- Result := ExpandConstant(' {tmp}\' + GetURLFilePart(' {#ERLANG_CSV_URL}' ));
96
- end ;
89
+ CacheSelectedRelease: TElixirRelease;
97
90
98
91
procedure AppendErlangPathIfTaskSelected (Of64Bit: Boolean);
99
92
begin
@@ -149,7 +142,7 @@ begin
149
142
True, True
150
143
);
151
144
152
- GlobalElixirReleases := CSVToElixirReleases(GetElixirCSVFilePath );
145
+ GlobalElixirReleases := CSVToElixirReleases(GlobalElixirCSVFilePath );
153
146
ElixirReleasesToListBox(GlobalElixirReleases, GlobalPageSelRelease.CheckListBox);
154
147
155
148
with FindFirstReleaseOfType(GlobalElixirReleases, rtLatestRelease) do begin
@@ -163,18 +156,22 @@ begin
163
156
' ' , 0 , False, True, nil
164
157
);
165
158
166
- GlobalErlangData := CSVToErlangData(GetErlangCSVFilePath );
159
+ GlobalErlangData := CSVToErlangData(GlobalErlangCSVFilePath );
167
160
end ;
168
161
169
162
function InitializeSetup (): Boolean;
170
163
begin
171
164
Result := True;
172
- if not idpDownloadFile(' {#ELIXIR_CSV_URL}' , GetElixirCSVFilePath) then begin
165
+
166
+ GlobalElixirCSVFilePath := ExpandConstant(' {tmp}\' + GetURLFilePart(' {#ELIXIR_CSV_URL}' ));
167
+ GlobalElixirCSVFilePath := ExpandConstant(' {tmp}\' + GetURLFilePart(' {#ERLANG_CSV_URL}' ));
168
+
169
+ if not idpDownloadFile(' {#ELIXIR_CSV_URL}' , GlobalElixirCSVFilePath) then begin
173
170
MsgBox(' Error: Downloading {#ELIXIR_CSV_URL} failed. Setup cannot continue.' , mbInformation, MB_OK);
174
171
Result := False;
175
172
exit;
176
173
end ;
177
- if not idpDownloadFile(' {#ERLANG_CSV_URL}' , GetErlangCSVFilePath ) then begin
174
+ if not idpDownloadFile(' {#ERLANG_CSV_URL}' , GlobalErlangCSVFilePath ) then begin
178
175
MsgBox(' Error: Downloading {#ERLANG_CSV_URL} failed. Setup cannot continue.' , mbInformation, MB_OK);
179
176
Result := False;
180
177
exit;
0 commit comments