Erlang on Windows from USB

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang on Windows from USB

Giuseppe Luigi Punzi Ruiz
Hi all,

There are some way, to use erlang from an USB? I, and a friend, we have
a machine where we can't do installations. We need a "portable" erlang
to develop.

I installed on a WinXP box. Copied the erlang entire folder to my USB,
and tried to run in from other WinXP machine. I updated the paths in
"erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
gives me an error:

"G:\Desarrollo\erl5.7.4\bin\erl.exe
The aplication couldn't be started because it's configuration is
incorrect. Reinstall the application could solve the problem"

In the ini file, I updated the paths with double slash "\\".

Cheers, and thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Fabio Mazanatti
Hi Giuseppe,

why didn't you install it directly on your pendrive, instead of copying an
installation from your hardrive? I'm not aware of Erlang's install package
for Windows, but I guess you can point the installation to any drive you
want (that's standard Windows behaviour)...


Cheers,
Fabio Mazanatti


On Mon, Nov 30, 2009 at 2:58 PM, Giuseppe Luigi Punzi <
[hidden email]> wrote:

> Hi all,
>
> There are some way, to use erlang from an USB? I, and a friend, we have
> a machine where we can't do installations. We need a "portable" erlang
> to develop.
>
> I installed on a WinXP box. Copied the erlang entire folder to my USB,
> and tried to run in from other WinXP machine. I updated the paths in
> "erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
> gives me an error:
>
> "G:\Desarrollo\erl5.7.4\bin\erl.exe
> The aplication couldn't be started because it's configuration is
> incorrect. Reinstall the application could solve the problem"
>
> In the ini file, I updated the paths with double slash "\\".
>
> Cheers, and thanks.
>
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Robert Raschke
In reply to this post by Giuseppe Luigi Punzi Ruiz
On Mon, Nov 30, 2009 at 4:58 PM, Giuseppe Luigi Punzi <
[hidden email]> wrote:

> Hi all,
>
> There are some way, to use erlang from an USB? I, and a friend, we have
> a machine where we can't do installations. We need a "portable" erlang
> to develop.
>
> I installed on a WinXP box. Copied the erlang entire folder to my USB,
> and tried to run in from other WinXP machine. I updated the paths in
> "erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
> gives me an error:
>
> "G:\Desarrollo\erl5.7.4\bin\erl.exe
> The aplication couldn't be started because it's configuration is
> incorrect. Reinstall the application could solve the problem"
>
> In the ini file, I updated the paths with double slash "\\".
>
> Cheers, and thanks.
>

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.

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
(\\).

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
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Michael McDaniel-4
In reply to this post by Fabio Mazanatti
 I agree to install directly to pendrive from MS windows executable
 installer.

 When you invoke, use drive and path, for example

  F:\erl5.7.4\bin\werl.exe ...

 Maybe the fullpath will work with your existing copy.

~Michael


On Mon, Nov 30, 2009 at 03:08:12PM -0200, Fabio Mazanatti wrote:

> Hi Giuseppe,
>
> why didn't you install it directly on your pendrive, instead of copying an
> installation from your hardrive? I'm not aware of Erlang's install package
> for Windows, but I guess you can point the installation to any drive you
> want (that's standard Windows behaviour)...
>
>
> Cheers,
> Fabio Mazanatti
>
>
> On Mon, Nov 30, 2009 at 2:58 PM, Giuseppe Luigi Punzi <
> [hidden email]> wrote:
>
> > Hi all,
> >
> > There are some way, to use erlang from an USB? I, and a friend, we have
> > a machine where we can't do installations. We need a "portable" erlang
> > to develop.
> >
> > I installed on a WinXP box. Copied the erlang entire folder to my USB,
> > and tried to run in from other WinXP machine. I updated the paths in
> > "erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
> > gives me an error:
> >
> > "G:\Desarrollo\erl5.7.4\bin\erl.exe
> > The aplication couldn't be started because it's configuration is
> > incorrect. Reinstall the application could solve the problem"
> >
> > In the ini file, I updated the paths with double slash "\\".
> >
> > Cheers, and thanks.
> >

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Giuseppe Luigi Punzi Ruiz
In reply to this post by Robert Raschke


> 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 ;)
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Robert Raschke
On Mon, Nov 30, 2009 at 5:38 PM, Giuseppe Luigi Punzi <
[hidden email]> wrote:

>
>  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
>
>
>
Ah, it's been so long since I looked at all of this. There's actually TWO
erl.ini files! One in the top level bin, and another in the erts/bin folder.
Methinks that probably they have to agree if you're invoking from the top
level bin folder.

I tend to ignore the top level bin folder and invoke the exe's in the erts
folder instead. But I also pass in explicit config and boot options, so your
mileage may vary.

Robby

PS There's also some registry entries, but I've never quite understood what
they are for.
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Giuseppe Luigi Punzi Ruiz
In reply to this post by Michael McDaniel-4
El lun, 30-11-2009 a las 09:36 -0800, [hidden email] escribió:

> I agree to install directly to pendrive from MS windows executable
>  installer.
>
>  When you invoke, use drive and path, for example
>
>   F:\erl5.7.4\bin\werl.exe ...
>
>  Maybe the fullpath will work with your existing copy.
>
> ~Michael


Hi,

I suppose, install to pendrive directly is unnecesary. I don't know what
installer exactly does, but, with reg entries, or some configuration in
folders, once I take the USB and connect to other PC, the letter can
change, and the reg entries are not there.

I will try with a batch file, and invoking fullpath.

My friend and me are researching with erlang for some web projects, and,
we still learning at the moment.

This question, It's not very important for me, in all my computers I can
use erlang without problems, but my colleague, works at Spanish Army,
and, computers are restringed there. For this, he can't install
anything, and needs to get it working from USB, to develop from his
work.
Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Kenneth Lundin
In reply to this post by Giuseppe Luigi Punzi Ruiz
Hi,

From Erlang/OTP R13B02 the erl.ini file in the erl.5.7.x\bin directory
is no longer necessary.
If erl.ini exist it is used but if you remove it you can drop the file
tree erl.5.7.x anywhere in the file system.

I suggest that you install Erlang on an USB and then delete or rename
the erl.ini file.
After having done that you don't need any extra scripts, just start
werl.exe or erl.exe no matter what
drive -letter your USB is mounted to.

/Kenneth, Erlang/OTP Ericsson

On Mon, Nov 30, 2009 at 5:58 PM, Giuseppe Luigi Punzi
<[hidden email]> wrote:

> Hi all,
>
> There are some way, to use erlang from an USB? I, and a friend, we have
> a machine where we can't do installations. We need a "portable" erlang
> to develop.
>
> I installed on a WinXP box. Copied the erlang entire folder to my USB,
> and tried to run in from other WinXP machine. I updated the paths in
> "erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
> gives me an error:
>
> "G:\Desarrollo\erl5.7.4\bin\erl.exe
> The aplication couldn't be started because it's configuration is
> incorrect. Reinstall the application could solve the problem"
>
> In the ini file, I updated the paths with double slash "\\".
>
> Cheers, and thanks.
>

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Giuseppe Luigi Punzi Ruiz
Hi Keneth,

Thanks a lot,

I will try tomorrow.

El 30/11/2009, a las 22:02, Kenneth Lundin escribió:

> Hi,
>
> From Erlang/OTP R13B02 the erl.ini file in the erl.5.7.x\bin directory
> is no longer necessary.
> If erl.ini exist it is used but if you remove it you can drop the file
> tree erl.5.7.x anywhere in the file system.
>
> I suggest that you install Erlang on an USB and then delete or rename
> the erl.ini file.
> After having done that you don't need any extra scripts, just start
> werl.exe or erl.exe no matter what
> drive -letter your USB is mounted to.
>
> /Kenneth, Erlang/OTP Ericsson
>
> On Mon, Nov 30, 2009 at 5:58 PM, Giuseppe Luigi Punzi
> <[hidden email]> wrote:
>> Hi all,
>>
>> There are some way, to use erlang from an USB? I, and a friend, we  
>> have
>> a machine where we can't do installations. We need a "portable"  
>> erlang
>> to develop.
>>
>> I installed on a WinXP box. Copied the erlang entire folder to my  
>> USB,
>> and tried to run in from other WinXP machine. I updated the paths in
>> "erl.5.7.4\bin\erl.ini" but, when try to run "erl.5.7.4\bin\erl.exe"
>> gives me an error:
>>
>> "G:\Desarrollo\erl5.7.4\bin\erl.exe
>> The aplication couldn't be started because it's configuration is
>> incorrect. Reinstall the application could solve the problem"
>>
>> In the ini file, I updated the paths with double slash "\\".
>>
>> Cheers, and thanks.
>>

Giuseppe Luigi Punzi Ruiz
Blog: http://www.lordzealon.com
Twitter & Skype & GoogleTalk accounts: glpunzi






________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Vincent Siliakus-2
In reply to this post by Giuseppe Luigi Punzi Ruiz
On 30 nov, 17:58, Giuseppe Luigi Punzi <[hidden email]> wrote:
> "G:\Desarrollo\erl5.7.4\bin\erl.exe
> The aplication couldn't be started because it's configuration is
> incorrect. Reinstall the application could solve the problem"

My first guess would be missing Visual C++ run-time dll's. I'm pretty
sure Erlang is dynamically linked to these files (because the Erlang
setup automatically runs the VC++ redistributable installer) and if
these files are missing, I know from experience that exactly this
error message is generated. If you can't install the VC++
redistributable installer on the target machine, the solution would be
to manually copy the needed dll's in to the same folder as erl.exe and
werl.exe. I can't easily check which files these are but I think they
are all named like mfc*80.dll.

good luck,
vincent

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Christophe Romain-2
In reply to this post by Giuseppe Luigi Punzi Ruiz
>For this, he can't install anything, and needs to get it
>working from USB, to develop from his work.

just download CEAN
http://cean.process-one.net/downloads/
take the developper installer
if you need your USB key working regardless of OS, download REPOS
distribution, else download windows or whatever distribution you need.

I dayly ise erlang on an USB key, switching from windows/mac/linux/bsd
with the same codebase/installation using CEAN.




________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Erlang on Windows from USB

Giuseppe Luigi Punzi Ruiz
El mar, 15-12-2009 a las 18:01 +0100, Christophe Romain escribió:

> >For this, he can't install anything, and needs to get it
> >working from USB, to develop from his work.
>
> just download CEAN
> http://cean.process-one.net/downloads/
> take the developper installer
> if you need your USB key working regardless of OS, download REPOS
> distribution, else download windows or whatever distribution you need.
>
> I dayly ise erlang on an USB key, switching from windows/mac/linux/bsd
> with the same codebase/installation using CEAN.


Hi, when have time I will give a try.

Thanks,