8383 GlobalElixirReleases: array of TElixirRelease;
8484 GlobalErlangData: TErlangData;
8585
86- CacheSelectedRelease: TElixirRelease;
86+ GlobalElixirCSVFilePath: String;
87+ GlobalErlangCSVFilePath: String;
8788
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;
9790
9891procedure AppendErlangPathIfTaskSelected (Of64Bit: Boolean);
9992begin
@@ -149,7 +142,7 @@ begin
149142 True, True
150143 );
151144
152- GlobalElixirReleases := CSVToElixirReleases(GetElixirCSVFilePath );
145+ GlobalElixirReleases := CSVToElixirReleases(GlobalElixirCSVFilePath );
153146 ElixirReleasesToListBox(GlobalElixirReleases, GlobalPageSelRelease.CheckListBox);
154147
155148 with FindFirstReleaseOfType(GlobalElixirReleases, rtLatestRelease) do begin
@@ -163,18 +156,22 @@ begin
163156 ' ' , 0 , False, True, nil
164157 );
165158
166- GlobalErlangData := CSVToErlangData(GetErlangCSVFilePath );
159+ GlobalErlangData := CSVToErlangData(GlobalErlangCSVFilePath );
167160end ;
168161
169162function InitializeSetup (): Boolean;
170163begin
171164 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
173170 MsgBox(' Error: Downloading {#ELIXIR_CSV_URL} failed. Setup cannot continue.' , mbInformation, MB_OK);
174171 Result := False;
175172 exit;
176173 end ;
177- if not idpDownloadFile(' {#ERLANG_CSV_URL}' , GetErlangCSVFilePath ) then begin
174+ if not idpDownloadFile(' {#ERLANG_CSV_URL}' , GlobalErlangCSVFilePath ) then begin
178175 MsgBox(' Error: Downloading {#ERLANG_CSV_URL} failed. Setup cannot continue.' , mbInformation, MB_OK);
179176 Result := False;
180177 exit;
0 commit comments