@@ -28,7 +28,7 @@ WizardImageBackColor=clWhite
28
28
Uninstallable = no
29
29
30
30
[CustomMessages]
31
- NameAndVersion= the latest version of %1
31
+ NameAndVersion= %1
32
32
33
33
[Files]
34
34
; Zip extraction helper
@@ -50,7 +50,7 @@ Source: "compiler:SetupLdr.e32"; DestDir: "{tmp}\_offlineinstaller"; Flags: dele
50
50
51
51
[Run]
52
52
Filename : " powershell.exe" ; Parameters : " -File {tmp} \extract-zip.ps1 {tmp} \Precompiled.zip {tmp} \_offlineinstaller\elixir" ; Flags : waituntilterminated runhidden ; StatusMsg : " Extracting precompiled package..."
53
- Filename : " {tmp} \_offlineinstaller\ISCC.exe" ; Parameters : " /dElixirVersion=0.14.1 /dSkipPages /dNoCompression Elixir.iss" ; WorkingDir : " {tmp} \_offlineinstaller" ; Flags : waituntilterminated runhidden ; StatusMsg : " Preparing Elixir installer..."
53
+ Filename : " {tmp} \_offlineinstaller\ISCC.exe" ; Parameters : " /dElixirVersion={code:GetSelectedReleaseVersion} /dSkipPages /dNoCompression Elixir.iss" ; WorkingDir : " {tmp} \_offlineinstaller" ; Flags : waituntilterminated runhidden ; StatusMsg : " Preparing Elixir installer..."
54
54
Filename : " {tmp} \_offlineinstaller\Output\elixir-v0.14.1-setup.exe" ; Flags : waituntilterminated ; StatusMsg : " Running Elixir installer..."
55
55
56
56
[Code]
@@ -136,6 +136,22 @@ begin
136
136
end ;
137
137
end ;
138
138
139
+ function GetSelectedRelease (): TElixirRelease;
140
+ var
141
+ i: Integer;
142
+ begin
143
+ for i := 0 to GetArrayLength(ElixirReleases) - 1 do begin
144
+ if PSelectVerListBox.Checked[i] then begin
145
+ Result := ElixirReleases[i];
146
+ end ;
147
+ end ;
148
+ end ;
149
+
150
+ function GetSelectedReleaseVersion (Param: String): String;
151
+ begin
152
+ Result := GetSelectedRelease().Version;
153
+ end ;
154
+
139
155
procedure CurPageChanged (CurPageID: Integer);
140
156
begin
141
157
if CurPageID = PSelectVerPage.ID then begin
@@ -147,6 +163,11 @@ begin
147
163
ReleasesProcessed := True;
148
164
end ;
149
165
end ;
166
+
167
+ if CurPageID = wpReady then begin
168
+ idpAddFile(GetSelectedRelease().URL, ExpandConstant(' {tmp}\Precompiled.zip' ));
169
+ idpDownloadAfter(wpPreparing);
170
+ end ;
150
171
end ;
151
172
152
173
procedure CreatePages ();
@@ -170,8 +191,6 @@ procedure InitializeWizard();
170
191
begin
171
192
ReleasesProcessed := False;
172
193
CreatePages;
173
- idpAddFile(' https://github.com/elixir-lang/elixir/releases/download/v0.14.1/Precompiled.zip' , ExpandConstant(' {tmp}\Precompiled.zip' ));
174
- idpDownloadAfter(wpPreparing);
175
194
end ;
176
195
177
196
function PrepareToInstall (var NeedsRestart: Boolean): String;
0 commit comments