@@ -67,7 +67,8 @@ Filename: "{tmp}\Output\elixir-v{code:ConstGetSelectedReleaseVersion}-setup.exe"
67
67
Name : " erlang" ; Description : " Install Erlang" ; GroupDescription: " Erlang" ; Check : CheckToInstallErlang
68
68
Name : " erlang\32" ; Description : " {code:ConstGetErlangName32}" ; GroupDescription: " Erlang" ; Flags : exclusive
69
69
Name : " erlang\64" ; Description : " {code:ConstGetErlangName64}" ; GroupDescription: " Erlang" ; Flags : exclusive ; Check : IsWin64
70
- Name : " erlpath" ; Description : " Append Erlang directory to Path environment variable" ; GroupDescription: " Erlang" ; Check : CheckToAddErlangPath
70
+ Name : " erlang\newpath" ; Description : " Append Erlang directory to Path environment variable" ; GroupDescription: " Erlang"
71
+ Name : " existingpath" ; Description : " Append {code:ConstGetExistingErlangPath}\bin to Path environment variable" ; GroupDescription: " Erlang" ; Check : CheckToAddErlangPath
71
72
72
73
[Code]
73
74
#include " src\u til.iss"
88
89
89
90
CacheSelectedRelease: TElixirRelease;
90
91
92
+ function GetExistingErlangPath (PrefVersion: String): String;
93
+ begin
94
+ Result := ' ' ;
95
+ if IsWin64 then
96
+ Result := GetErlangPath(True, PrefVersion);
97
+ if Result = ' ' then
98
+ Result := GetErlangPath(False, PrefVersion);
99
+ end ;
100
+
91
101
procedure AppendErlangPathIfTaskSelected (Of64Bit: Boolean);
92
102
begin
93
- if IsTaskSelected(' erlpath ' ) then
103
+ if IsTaskSelected(' erlang\newpath ' ) or IsTaskSelected( ' existingpath ' ) then
94
104
AppendErlangPath(Of64Bit, GlobalErlangData.ERTSVersion);
95
105
end ;
96
106
@@ -179,16 +189,19 @@ begin
179
189
end ;
180
190
181
191
function CheckToInstallErlang : Boolean; begin
182
- Result := (not ErlangInPath) and
183
- (
184
- (GetErlangPath(False, GlobalErlangData.ERTSVersion) = ' ' ) or
185
- (GetErlangPath(True, GlobalErlangData.ERTSVersion) = ' ' )
186
- ); end ;
192
+ Result := (not ErlangInPath) and (GetExistingErlangPath(GlobalErlangData.ERTSVersion) = ' ' ); end ;
187
193
function CheckToAddErlangPath : Boolean; begin
188
194
Result := not ErlangInPath; end ;
189
195
190
- function ConstGetErlangName32 (Param: String): String; begin Result := GlobalErlangData.Name32; end ;
191
- function ConstGetErlangName64 (Param: String): String; begin Result := GlobalErlangData.Name64; end ;
192
- function ConstGetErlangExe32 (Param: String): String; begin Result := GlobalErlangData.Exe32; end ;
193
- function ConstGetErlangExe64 (Param: String): String; begin Result := GlobalErlangData.Exe64; end ;
194
- function ConstGetSelectedReleaseVersion (Param: String): String; begin Result := CacheSelectedRelease.Version; end ;
196
+ function ConstGetErlangName32 (Param: String): String; begin
197
+ Result := GlobalErlangData.Name32; end ;
198
+ function ConstGetErlangName64 (Param: String): String; begin
199
+ Result := GlobalErlangData.Name64; end ;
200
+ function ConstGetErlangExe32 (Param: String): String; begin
201
+ Result := GlobalErlangData.Exe32; end ;
202
+ function ConstGetErlangExe64 (Param: String): String; begin
203
+ Result := GlobalErlangData.Exe64; end ;
204
+ function ConstGetExistingErlangPath (Param: String): String; begin
205
+ Result := GetExistingErlangPath(GlobalErlangData.ERTSVersion); end ;
206
+ function ConstGetSelectedReleaseVersion (Param: String): String; begin
207
+ Result := CacheSelectedRelease.Version; end ;
0 commit comments