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

Commit 99da688

Browse files
committed
Now warns when Erlang isn't found
1 parent 50d2e2d commit 99da688

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Elixir.iss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,25 @@ end;
3434
procedure InitializeWizard();
3535
begin
3636
idpAddFile('@@URL', ExpandConstant('{tmp}\Precompiled.zip'));
37-
idpDownloadAfter(wpReady);
37+
idpDownloadAfter(wpPreparing);
38+
end;
39+
40+
function PrepareToInstall(var NeedsRestart: Boolean): String;
41+
var
42+
ErrorMsg: String;
43+
begin
44+
if ErlangIsInstalled then begin
45+
Result := '';
46+
end else begin
47+
ErrorMsg := 'Warning: Erlang does not seem to be installed.' + #13#10#13#10 +
48+
'In order for Elixir to run, you will need to install Erlang from http://www.erlang.org/ and then add it to your Path environment variable.' + #13#10#13#10 +
49+
'Proceed anyway?';
50+
if MsgBox(ErrorMsg, mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then begin
51+
Result := '';
52+
end else begin
53+
Result := 'Erlang not installed.';
54+
end;
55+
end;
3856
end;
3957
4058
procedure ExtractPrecompiled();

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Part of the Elixir on Windows Google Summer of Code 2014 project, this installer sets up [Elixir](http://elixir-lang.org/) on a Windows machine.
44

55
Currently, it will:
6+
* (Suggest that the user) install Erlang first
67
* Download the precompiled Elixir package
78
* Extract the package to your favorite directory (or mine)
89
* Create shortcuts to IEx and the uninstaller
910

1011
Currently, it won't:
1112
* Download the LATEST version of Elixir (currently hardcoded to v0.14.1)
12-
* (Suggest that the user) install Erlang first
1313
* Append the user's Path variable
1414

1515
## Acknowledgements

0 commit comments

Comments
 (0)