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

Commit 073979d

Browse files
committed
Simply use GetLatestErlangPath everywhere
1 parent a3751fb commit 073979d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ElixirWeb.iss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ Source: "compiler:Setup.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
5858
Source: "compiler:SetupLdr.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
5959

6060
[Run]
61-
Filename: "{tmp}\{code:ConstGetErlangExe32}"; Flags: hidewizard; StatusMsg: "Installing {code:ConstGetErlangName32}..."; Tasks: erlang\32; AfterInstall: AppendNewErlangPathIfTaskSelected(False)
62-
Filename: "{tmp}\{code:ConstGetErlangExe64}"; Flags: hidewizard; StatusMsg: "Installing {code:ConstGetErlangName64}..."; Tasks: erlang\64; AfterInstall: AppendNewErlangPathIfTaskSelected(True)
61+
Filename: "{tmp}\{code:ConstGetErlangExe32}"; Flags: hidewizard; StatusMsg: "Installing {code:ConstGetErlangName32}..."; Tasks: erlang\32
62+
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
6364
Filename: "{tmp}\7za.exe"; Parameters: "x -oelixir Precompiled.zip"; WorkingDir: "{tmp}"; StatusMsg: "Extracting Precompiled.zip archive..."
6465
Filename: "{tmp}\ISCC.exe"; Parameters: "/dElixirVersion={code:ConstGetSelectedReleaseVersion} /dSkipWelcome /dNoCompression Elixir.iss"; WorkingDir: "{tmp}"; StatusMsg: "Compiling Elixir installer..."
6566
Filename: "{tmp}\Output\elixir-v{code:ConstGetSelectedReleaseVersion}-setup.exe"; Flags: nowait; StatusMsg: "Starting Elixir installer..."
@@ -69,7 +70,7 @@ Name: "erlang"; Description: "Install Erlang"; Check: CheckToInstallErlang
6970
Name: "erlang\32"; Description: "{code:ConstGetErlangName32}"; Flags: exclusive
7071
Name: "erlang\64"; Description: "{code:ConstGetErlangName64}"; Flags: exclusive; Check: IsWin64
7172
Name: "erlang\newpath"; Description: "Append Erlang directory to Path environment variable"
72-
Name: "existingpath"; Description: "Append {code:ConstGetExistingErlangPath}\bin to Path environment variable"; Check: CheckToAddExistingErlangPath
73+
Name: "existingpath"; Description: "Append {code:ConstGetLatestErlangPath}\bin to Path environment variable"; Check: CheckToAddExistingErlangPath
7374

7475
[Code]
7576
#include "src\util.iss"
@@ -91,10 +92,9 @@ var
9192
9293
CacheSelectedRelease: TElixirRelease;
9394
94-
procedure AppendNewErlangPathIfTaskSelected(Of64Bit: Boolean);
95+
procedure AppendLatestErlangPath;
9596
begin
96-
if IsTaskSelected('erlang\newpath') then
97-
AppendPath(GetLatestErlangPathOfArch(Of64Bit) + '\bin');
97+
AppendPath(GetLatestErlangPath + '\bin');
9898
end;
9999
100100
procedure CurPageChanged(CurPageID: Integer);
@@ -194,7 +194,7 @@ function ConstGetErlangExe32(Param: String): String; begin
194194
Result := GlobalErlangData.Exe32; end;
195195
function ConstGetErlangExe64(Param: String): String; begin
196196
Result := GlobalErlangData.Exe64; end;
197-
function ConstGetExistingErlangPath(Param: String): String; begin
197+
function ConstGetLatestErlangPath(Param: String): String; begin
198198
Result := GetLatestErlangPath; end;
199199
function ConstGetSelectedReleaseVersion(Param: String): String; begin
200200
Result := CacheSelectedRelease.Version; end;

0 commit comments

Comments
 (0)