[erlang-questions] Can werl be detached?

Dan Gudmundsson dangud@REDACTED
Wed May 25 22:22:16 CEST 2016


Hmm,
It works fine for me on Windows 10 from msys2 with erlang in the path
and from cmd shell without erlang in the path:

C:\Users\familjen>"c:\Program Files (x86)\erl7.3\bin\werl" -run wx demo

C:\Users\familjen>"c:\Program Files (x86)\erl7.3\bin\werl" -detached -run
wx demo

Oh noticed the version you are running...

It also works for me with 17.0 i.e. erl-6.0 which is the oldest I have
installed here at home.

Why are you using an old version of erlang?
Can you try a newer version and see if that works?


On Wed, May 25, 2016 at 9:49 PM John Ashmun <john.ashmun@REDACTED> wrote:

> I just found time to try what you suggested with the wx demo, but I got
> the same pop up Windows error message as when I try to run my release with
> -detached.
>
> I added ...\erts-5.9\bin to %Path% and tried again but it failed again
> with the same error message.
>
> Sent from my iPhone
>
> On May 18, 2016, at 12:02 AM, Dan Gudmundsson <dangud@REDACTED> wrote:
>
> At least this works as it should:
>
> werl -detached -run wx demo
>
>
> On Wed, May 18, 2016 at 3:48 AM John R. Ashmun <john.ashmun@REDACTED>
> wrote:
>
>>
>>
>> On Tue, May 17, 2016 at 6:32 PM, zxq9 <zxq9@REDACTED> wrote:
>>
>>> On Tuesday 17 May 2016 16:47:35 John R. Ashmun wrote:
>>> > Perhaps my subject is not quite the correct question.  Here's my
>>> context:
>>> >
>>> > I'm beginning to recreate in Erlang on Microsoft Windows 10 a public
>>> domain
>>> > program I used to enjoy on my Commodore Amiga:  mATC was a game in
>>> which
>>> > the user acted as a military Air Traffic Controller.  I am using a wx
>>> > window to draw the player's map with aircraft data blocks overlaid.  I
>>> > don't have a use for the initial window that opens when werl is
>>> started.
>>>
>>> Awesome!
>>>
>>> > If I use this Command Prompt batch file, mATC.bat:
>>> >
>>> > werl -pa ebin -pa mATC_app\ebin -detached -boot mATC -config sys
>>> >
>>> > a Windows error message window appears that says:
>>> >
>>> > "Failed to execute C:\Program Files\erl5.9\erts5.9\bin\beam.smp.dll
>>> >  The system cannot find the file specified."
>>> >
>>> > The DLL is actually present at that location, and of course everything
>>> runs
>>> > well when I don't use -detached.
>>>
>>> Hrm... that seems odd, but I have to admit I have no experience running
>>> actual releases on Windows. What I usually do instead is have the runtime
>>> installed on the Windows machine, unpack project code and kick things off
>>> with an escript that builds and then launches the code I want to run.
>>>
>>> Changing from releases to from-source build->run may require a bit of
>>> shuffling -- and may or may not be worth it depending on the project.
>>> But this has been very effective and lightweight for my purposes.
>>>
>>> Like everything else on Windows there are a few quirks to making escripts
>>> a click-to-run experience (specifying full path to "escript.exe" instead
>>> of "escript" in your launcher, space for unheeded shebang, etc.). I've
>>> wanted for a few years now to formalize and simplify a solution to
>>> this...
>>> but real life gets in the way of the things I wish I could do as
>>> community
>>> project work. :-(
>>>
>>> The escript-to-bootstrap approach has made my Erlang GUI experience on
>>> Windows fairly painless -- I can develop on Linux or BSD and almost
>>> always
>>> get away with relying on anything that works there (to include wx)
>>> working
>>> pretty much the same way on Windows.
>>>
>>> I have not tried this on Windows 10 yet, but I assume it will continue to
>>> work the same way it does on Windows 7 and 8.1.
>>>
>>> -Craig
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>> I will look into escript, thanks.
>>
>> John
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160525/11876eca/attachment.htm>


More information about the erlang-questions mailing list