16
16
; "Elixir" and the Elixir logo are copyright (c) 2012 Plataformatec.
17
17
18
18
#define COMPAT_MASK 1
19
- #define PATH_TO_7ZA " C:\Users\Chris\Documents\7za920"
19
+ #define PATH_TO_7ZA ' C:\Users\Chris\Documents\7za920'
20
+
21
+ #define OTP_32_NAME ' OTP 17.1 (32-bit)'
22
+ #define OTP_32_URL ' http://www.erlang.org/download/otp_win32_17.1.exe'
23
+ #define OTP_32_EXE ' otp_win32_17.1.exe'
24
+
25
+ #define OTP_64_NAME ' OTP 17.1 (64-bit)'
26
+ #define OTP_64_URL ' http://www.erlang.org/download/otp_win64_17.1.exe'
27
+ #define OTP_64_EXE ' otp_win64_17.1.exe'
28
+
20
29
#include <idp.iss>
21
30
22
31
[Setup]
@@ -52,16 +61,16 @@ Source: "compiler:Setup.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
52
61
Source : " compiler:SetupLdr.e32" ; DestDir : " {tmp} " ; Flags : deleteafterinstall
53
62
54
63
[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
64
+ Filename : " {tmp} \{#OTP_32_EXE} " ; Flags : hidewizard ; StatusMsg : " Installing {#OTP_32_NAME} ..." ; Tasks: erlang\32
65
+ Filename : " {tmp} \{#OTP_64_EXE} " ; Flags : hidewizard ; StatusMsg : " Installing {#OTP_64_NAME} ..." ; Tasks: erlang\64
57
66
Filename : " {tmp} \7za.exe" ; Parameters : " x -oelixir Precompiled.zip" ; WorkingDir : " {tmp} " ; StatusMsg : " Extracting Precompiled.zip archive..."
58
67
Filename : " {tmp} \ISCC.exe" ; Parameters : " /dElixirVersion={code:ConstGetSelectedReleaseVersion} /dSkipWelcome /dNoCompression Elixir.iss" ; WorkingDir : " {tmp} " ; StatusMsg : " Compiling Elixir installer..."
59
68
Filename : " {tmp} \Output\elixir-v{code:ConstGetSelectedReleaseVersion}-setup.exe" ; Flags : nowait ; StatusMsg : " Starting Elixir installer..."
60
69
61
70
[Tasks]
62
71
Name : " erlang" ; Description : " Install Erlang" ; GroupDescription: " Erlang" ; Check : CheckToInstallErlang
63
- Name : " erlang\32" ; Description : " OTP 17.1 (32-bit) " ; GroupDescription: " Erlang" ; Flags : exclusive
64
- Name : " erlang\64" ; Description : " OTP 17.1 (64-bit) " ; GroupDescription: " Erlang" ; Flags : exclusive ; Check : IsWin64
72
+ Name : " erlang\32" ; Description : " {#OTP_32_NAME} " ; GroupDescription: " Erlang" ; Flags : exclusive
73
+ Name : " erlang\64" ; Description : " {#OTP_64_NAME} " ; GroupDescription: " Erlang" ; Flags : exclusive ; Check : IsWin64
65
74
Name : " erlpath" ; Description : " Append Erlang directory to Path environment variable" ; GroupDescription: " Erlang" ; Check : CheckToAddErlangPath
66
75
67
76
[Code]
226
235
227
236
function CheckToInstallErlang : Boolean;
228
237
begin
229
- Result := (GetErlangPath = ' ' )
238
+ Result := (GetErlangPath = ' ' );
230
239
end ;
231
240
232
241
function CheckToAddErlangPath : Boolean;
@@ -238,10 +247,10 @@ procedure CurPageChanged(CurPageID: Integer);
238
247
begin
239
248
if CurPageID = wpPreparing then begin
240
249
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 ' ));
250
+ idpAddFile(' {#OTP_32_URL} ' , ExpandConstant(' {tmp}\{#OTP_32_EXE} ' ));
242
251
end ;
243
252
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 ' ));
253
+ idpAddFile(' {#OTP_64_URL} ' , ExpandConstant(' {tmp}\{#OTP_64_EXE} ' ));
245
254
end ;
246
255
idpAddFile(GetURL(GetSelectedRelease()), ExpandConstant(' {tmp}\Precompiled.zip' ));
247
256
idpDownloadAfter(wpPreparing);
0 commit comments