Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 8e91415

Browse files
committed
Download and run Erlang installer if tasks are selected
1 parent 9a51574 commit 8e91415

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ElixirWeb.iss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ Source: "compiler:Setup.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
5252
Source: "compiler:SetupLdr.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
5353

5454
[Run]
55+
Filename: "{tmp}\otp_win32_17.1.exe"; Flags: hidewizard; StatusMsg: "Installing OTP 17.1 (32-bit)..."; Tasks: erlang\32
56+
Filename: "{tmp}\otp_win64_17.1.exe"; Flags: hidewizard; StatusMsg: "Installing OTP 17.1 (64-bit)..."; Tasks: erlang\64
5557
Filename: "{tmp}\7za.exe"; Parameters: "x -oelixir Precompiled.zip"; WorkingDir: "{tmp}"; StatusMsg: "Extracting Precompiled.zip archive..."
5658
Filename: "{tmp}\ISCC.exe"; Parameters: "/dElixirVersion={code:ConstGetSelectedReleaseVersion} /dSkipWelcome /dNoCompression Elixir.iss"; WorkingDir: "{tmp}"; StatusMsg: "Compiling Elixir installer..."
5759
Filename: "{tmp}\Output\elixir-v{code:ConstGetSelectedReleaseVersion}-setup.exe"; Flags: nowait; StatusMsg: "Starting Elixir installer..."
@@ -235,6 +237,12 @@ end;
235237
procedure CurPageChanged(CurPageID: Integer);
236238
begin
237239
if CurPageID = wpPreparing then begin
240+
if IsTaskSelected('erlang\32') then begin
241+
idpAddFile('http://www.erlang.org/download/otp_win32_17.1.exe', ExpandConstant('{tmp}\otp_win32_17.1.exe'));
242+
end;
243+
if IsTaskSelected('erlang\64') then begin
244+
idpAddFile('http://www.erlang.org/download/otp_win64_17.1.exe', ExpandConstant('{tmp}\otp_win64_17.1.exe'));
245+
end;
238246
idpAddFile(GetURL(GetSelectedRelease()), ExpandConstant('{tmp}\Precompiled.zip'));
239247
idpDownloadAfter(wpPreparing);
240248
end;
@@ -253,8 +261,6 @@ procedure InitializeWizard();
253261
var
254262
LatestRelease, LatestPrerelease: TStrings;
255263
begin
256-
idpSetOption('DetailsButton', '0');
257-
258264
PSelInstallType := CreateInputOptionPage(wpWelcome, 'Select Elixir installation type', 'Select which installation type you want to perform, then click Next.', 'I want to:', True, False);
259265
260266
PSelRelease := CreateInputOptionPage(PSelInstallType.ID, 'Select Elixir release', 'Setup will download and install the Elixir release you select.', 'All releases available to install are listed below, from newest to oldest.', True, True);

0 commit comments

Comments
 (0)