lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Motivated by the recent discussion, I've written srlua, a tool for
building self-running Lua programs. It's available as usual at
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/

The package includes a customized Lua interpreter that loads and runs a Lua
program appended to its executable file, and a tool for glueing it with a
Lua program.

For a change, I have included support for Windows, based on the information
and code kindly provided by Eric Tetz. It seems that argv[0] is not reliable
for finding the complete path of the running program: you have to use
GetModuleFileName. The Windows code in srlua should work (it's just a couple
of lines), but I haven't tested it. If some kind soul can do this and build
and release Windows binaries for this tool, it'll be great. Also please note
that the Lua interpreter opens all standard libraries but not Eric'c goodies,
such as console support.

Enjoy.
--lhf