[erlang-questions] Erlang on Windows from USB
Giuseppe Luigi Punzi
glpunzi@REDACTED
Mon Nov 30 18:38:25 CET 2009
> In the bin folder of your Erlang installation on Windows, you will
> find an erl.ini file. This contains some absolute paths that need to
> point to the correct locations of your installation root and the erts
> bin folder within that.
Yes, I changed it.
[erlang]
Bindir=G:\\Desarrollo\\erl5.7.4\\erts-5.7.4\\bin
Progname=erl
Rootdir=G:\\Desarrollo\\erl5.7.4
>
> As far as I am aware, the paths must be absolute (starting with drive
> letter and initial backslash) and all folder separators must be
> escaped backslashes (\\).
Did it..
>
> You could make yourself a small batch file to start Erlang after
> having written over the erl.ini file. For example (using R12B, in R13B
> the erts version'll be different):
>
> setlocal
> set ROOT=%~dsp0%
> set ERTSPATH=%ROOT%erts-5.6.5\bin
> set ERLINI=%ERTSPATH%\erl.ini
> echo [erlang] >%ERLINI%
> echo Bindir=%ERTSPATH:\=\\% >>%ERLINI%
> echo Progname=erl >>%ERLINI%
> echo Rootdir=%ROOT:\=\\% >>%ERLINI%
> %ERTSPATH%\erl
> endlocal
>
> Put this into your Erlang root on the USB drive and you should be able
> to run it from there. (BTW, this batch file ignores the top level bin
> folder and uses the erts one directly.)
>
> And then adapt to pass in whatever options you need, set a better PATH
> to include OpenSSL, etc.
>
> Getting all this correct with erlsrv.exe for running Erlang as a
> Windows Service is a lot harder!
>
> Hope this helps,
> Robby
>
> PS The magic %~dsp0% is explained here:
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx
Oh, ok. I will try this.
Thanks ;)
More information about the erlang-questions
mailing list