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

Commit c92cf06

Browse files
committed
Always show Erlang task, use registry logic for default checkbox state instead
1 parent 4b16a47 commit c92cf06

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: ElixirWeb.iss

+10-8
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Filename: "Robocopy.exe"; Parameters: "{tmp}\Output {src} elixir-v{code:GetScrip
8080

8181
[Tasks]
8282
Name: "unins_previous"; Description: "Uninstall previous version at {code:GetScriptString|ElixirPreviousPath} (Recommended)"; Check: CheckPreviousVersionExists
83-
Name: "erlang"; Description: "Install Erlang"; Check: CheckToInstallErlang
84-
Name: "erlang\32"; Description: "{code:GetScriptString|ErlangName32}"; Flags: exclusive
85-
Name: "erlang\64"; Description: "{code:GetScriptString|ErlangName64}"; Flags: exclusive; Check: IsWin64
83+
Name: "erlang"; Description: "Install Erlang"; Flags: unchecked
84+
Name: "erlang\32"; Description: "{code:GetScriptString|ErlangName32}"; Flags: exclusive unchecked
85+
Name: "erlang\64"; Description: "{code:GetScriptString|ErlangName64}"; Flags: exclusive unchecked; Check: IsWin64
8686
Name: "defer"; Description: "Defer installation (advanced)"; Flags: unchecked
8787

8888
[Code]
@@ -126,9 +126,15 @@ var
126126
begin
127127
if CurPageID = wpPreparing then begin
128128
// We're on the page after the "Ready To Install" page but before [Files] and [Run] are processed
129-
130129
if IsTaskSelected('unins_previous') then
131130
ExecAsOriginalUser(GetPreviousUninsExe, '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, _int);
131+
end else if CurPageID = wpSelectTasks then begin
132+
if GetLatestErlangPath = '' then begin
133+
WizardSelectTasks('erlang');
134+
if IsWin64 then begin
135+
WizardSelectTasks('erlang\64');
136+
end;
137+
end;
132138
end;
133139
end;
134140
@@ -257,7 +263,3 @@ begin
257263
exit;
258264
end;
259265
end;
260-
261-
function CheckToInstallErlang: Boolean; begin
262-
// Erlang should be installed if there's no Erlang path in the registry
263-
Result := (GetLatestErlangPath = ''); end;

0 commit comments

Comments
 (0)