lua-users home
lua-l archive

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

>- adding functionality to Lua libs w/o ending up in an 
>5,000 file installation: I would prefer additional workload for 
>the developer if it would still be possible to deliver a 
>standalone app (a statically linked lua.exe w/ core and 
>appropriate C-libs) w/ maybe one extra file (Lua-lib and app 
>source in one "package").

Assuming you have a Lua library that is statically built (I have 
one with all the standard libraries, plus LuaThread, LuaSocket 
and LuaFileSystem) then delivering a Lua program in a single EXE 
is trivial. See srlua (sr == "self-running") as a good HowTo 
guide. See also bin2c (in the /etc directory) for how to take Lua 
code (in source or object form) and "link" it into your EXE.

The Lua 5.2 package system (with "loaded" and "preloaded" 
libraries) should make things even cooler -- some of the hacks
needed to make LuaSocket statically linkable into a single file
will become redundant. (LuaSocket was made to have supercool
run-time loading characteristics, which need to be emulated if
it is to be statically bound to an EXE.)