[erlang-questions] Can werl be detached?
Wed May 18 09:02:40 CEST 2016
At least this works as it should:
werl -detached -run wx demo
On Wed, May 18, 2016 at 3:48 AM John R. Ashmun <>
> On Tue, May 17, 2016 at 6:32 PM, zxq9 <> 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
>> > I'm beginning to recreate in Erlang on Microsoft Windows 10 a public
>> > 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.
>> > 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
>> > 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.
>> erlang-questions mailing list
> I will look into escript, thanks.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions