[erlang-questions] Build an EXE of an Erl application
Dave Cottlehuber
dch@REDACTED
Thu Oct 25 01:14:17 CEST 2012
On 24 October 2012 19:22, Matthias Lang <matthias@REDACTED> wrote:
> On Wednesday, October 24, Yash Ganthe wrote:
>
>> Is it possible to compile and package an erlang applictaion and all
>> its modules into a .exe? The Yaws web server is an example. What is
>> the procedure for compiling an app as a .exe?
>
> You can't. There isn't one.
>
> Matt
If you can live with distributing the core Erlang VM possibly
separately (not impossible in Windows land), you can definitely build
an escript archive, that contains modules and applications, and append
this to a suitably crafted .cmd file[1] for a single launchable
command.
You can pass most normal startup flags/arguments to the VM as well.
The escript archive can contain any required DLLs and successfully
call them too. This is very useful, but is it supported -- I've no
idea how it actually works.
There's brief notes on my recent (today) work for this with rebar
[2],[3] which should turn into a patch when I figure out a more clean
way of doing it. This was how erica.cmd was built.
A+
Dave
[1]: http://people.apache.org/~dch/dist/tools/
[2]: https://gist.github.com/3945979
[3]: https://github.com/dch/erica/commit/bade1b5fad40bc8f8bfefbf281666321ca65a182
More information about the erlang-questions
mailing list