[erlang-questions] Re: Distributions of Erlang-coded SW on Windows (really)
Claes Wikstrom
klacke@REDACTED
Wed Aug 19 14:20:34 CEST 2009
Bjorn Gustavsson wrote:
> The Wings3D application has an NSIS-based installer for Windows.
Similarly, Yaws now has a proper win32 installer. I use
InstallBuilder http://bitrock.com/ which is free (as in beer)
for open source projects and (cheap - again as in beer)
for commercial projects.
Trick I used was to write a small exec wrapper ala...
# cat yaws.c
......
if(CreateProcess(0, execString, NULL, NULL, FALSE, 0, 0, 0, &si, &pi))
{
unsigned long ret = 0;
// wait for process to finish
WaitForSingleObject(pi.hProcess, INFINITE);
if (GetExitCodeProcess(pi.hProcess, &ret) == 0)
ret = 1;
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return ret;
}
See http://github.com/klacke/yaws/blob/d9c2d32e2dfad0c8710c134ba261a5dfa82c73c7/win32/yaws.c
For Yaws I chose to invoke erl from the path, for software I wrote at tail-f I invoke
erl that get's installed together with my app.
/klacke
More information about the erlang-questions
mailing list