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

Commit 9abc425

Browse files
committed
Add Erlang path as post-install step instead of run entry
1 parent 73301e8 commit 9abc425

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ElixirWeb.iss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ Source: "compiler:SetupLdr.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
6060
[Run]
6161
Filename: "{tmp}\{code:ConstGetErlangExe32}"; Flags: hidewizard; StatusMsg: "Installing {code:ConstGetErlangName32}..."; Tasks: erlang\32
6262
Filename: "{tmp}\{code:ConstGetErlangExe64}"; Flags: hidewizard; StatusMsg: "Installing {code:ConstGetErlangName64}..."; Tasks: erlang\64
63-
Filename: "cmd"; Parameters: "/C true"; Flags: runhidden; StatusMsg: "Appending {code:ConstGetLatestErlangPath}\bin to Path environment variable..."; Tasks: erlang\newpath existingpath; BeforeInstall: AppendLatestErlangPath
6463
Filename: "{tmp}\7za.exe"; Parameters: "x -oelixir Precompiled.zip"; WorkingDir: "{tmp}"; StatusMsg: "Extracting Precompiled.zip archive..."
6564
Filename: "{tmp}\ISCC.exe"; Parameters: "/dElixirVersion={code:ConstGetSelectedReleaseVersion} /dSkipWelcome /dNoCompression Elixir.iss"; WorkingDir: "{tmp}"; StatusMsg: "Compiling Elixir installer..."
6665
Filename: "{tmp}\Output\elixir-v{code:ConstGetSelectedReleaseVersion}-setup.exe"; Flags: nowait; StatusMsg: "Starting Elixir installer..."
@@ -92,9 +91,12 @@ var
9291
9392
CacheSelectedRelease: TElixirRelease;
9493
95-
procedure AppendLatestErlangPath;
94+
procedure CurStepChanged(CurStep: TSetupStep);
9695
begin
97-
AppendPath(GetLatestErlangPath + '\bin');
96+
if CurStep = ssPostInstall then begin
97+
if IsTaskSelected('erlang\newpath') or IsTaskSelected('existingpath') then
98+
AppendPath(GetLatestErlangPath + '\bin');
99+
end;
98100
end;
99101
100102
procedure CurPageChanged(CurPageID: Integer);

0 commit comments

Comments
 (0)