[erlang-questions] Relocating Erlang installation on Windows?
Johan Holmberg
johan556@REDACTED
Tue Jun 3 09:12:23 CEST 2008
On Thu, May 29, 2008 at 7:42 PM, Scott Lystig Fritchie
<fritchie@REDACTED> wrote:
> Johan Holmberg <johan556@REDACTED> wrote:
>
> jh> I wonder if there is some way of getting the installation "position
> jh> independent"?
>
> Not that I'm aware of. (I'm just catching up on my mailing list reading
> and noticed that no one (?) has replied to your query.)
>
Thanks for your answer (yes, you were the first to answer).
I think I understand what your script is doing. I have tried similar
things on Windows, but there other files contain the "absolute paths"
(e.g. "erl.ini"). Erlang seems to handle this stuff in totally
different ways on Unix and Windows: on Unix with symlinks and shell
script wrappers, and on Windows by reading the "erl.ini" files.
Doesn't your script still produce an installation that is not position
independent, just relocated to another place? (since one absolute
path is replaced with a new one in the scripts). I would like to take
this one step further to be able to move the directory tree to a new
place and have it work "out of the box".
For my Windows Erlang I decided to change the C source code reading
the "erl.ini" file. So now I can use a symbolic value in my "erl.ini"
files like this:
[erlang]
Bindir=%EXE_DIR%\\..\\erts-5.6.2\\bin
Progname=erl
Rootdir=%EXE_DIR%\\..
When "erl.exe" is started, it will replace %EXE_DIR% with the actual
directory of the "erl.exe" binary. This feels like a kludge, and I had
to rebuild Erlang. But it seems to work ...
> We use a shell script to relocate builds of R11B-5 on Linux, which is
> included below. It mostly works, but since we don't use "escript" and
> some of the other scripts, I don't know if it does 100% the right thing
> with all the scripts. It also doesn't do anything with Windows-only
> files. Hope it helps.
>
> -Scott
Since I found the same "absolute paths" as you, I now believe my
changes have a chance of working. But like you, I'm not 100% sure.
/Johan
More information about the erlang-questions
mailing list