[RFC] ERL-1323 - Make Erlang/OTP work from any installation directory by removing the need for an absolute path

Jérôme de Bretagne jerome.debretagne@REDACTED
Thu Sep 10 00:11:29 CEST 2020


Le mer. 9 sept. 2020 à 00:14, Michael Truog <mjtruog@REDACTED> a écrit :
>
> On 9/8/20 2:06 PM, Jérôme de Bretagne wrote:
>
> There are some ways to find the absolute path of a script from within
> itself, including following symlinks, such as this one (with a proper
> formatting in the bug tracker):
>
> Hi Jérôme,

Hi Michael,

> If you had an escript print the result of code:root_dir(), that should be the simplest way of getting the root path of the Erlang installation that was used to start the escript.

Thanks for your pointer to escript, I'm not familiar with it, I'll
look at its possible use on Android since it mentions the support of
relocatable installations indeed. Android has many restrictions
compared to typical Unix systems, so it may not fully work as-is, I'll
see how far I can get.

Going back to my original goal, I'm still focusing on the typical
Erlang runtime installation and I would really like to make it more
"robust" for Android, in particular the erl program (which is a shell
script), as it has been working perfectly fine up to Android 9
included (until the newer Android restrictions I've described).

> Best Regards,
> Michael

Thanks,
Jérôme


More information about the erlang-questions mailing list