lua-users home
lua-l archive

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


> I'm confused.  Why don't you just use the linker to put in the data that 
> you want?  The most portable way to do this is just stuff everything 
> into a const char[] and compile it.  

1) Because with the srluaz approach I can develop as normal with various
lua sources in variuos directories, using 'require' and whatsoever. 
The other way I see no easy way to *transparently" make lua find and 
exeute the code in these char[]S (how would a require be resolved there?). 
If you have any idea how to achieve this, it is welcome.

2) Once I want to create a standalone "package" I just can use winzip to 
collect my sources, no "configuration" for what to include and no batch 
mechanism for its processing is required.

> If you want to skip the 
> octets->.c->.o overhead I suppose you could use objcopy to go directly 
> from octets->.o, or use a linker script for more control.

To be honest I didn't care much about size and startup speed. As I wrote in
another thread I'm mainly interested in creating small tool apps as
standalone executables in a Windows environment. 1 MB more and an
initial copy and unzip before the real program starts is really not an issue than.

> If the goal is to avoid having the whole development environment 
> including headers on the machine performing the append, then ship a 
> partially linked version of the lua executable with a weak symbol that 
> will be supplied by the .o containing the octets.  The target machine 
> then just needs objcopy and a linker.
> 
> If you can't depend on having a linker on the target machine, yeah, 
> you're going to have to play around with libelf like lhf says.  But just 
> about everybody has a linker.

No, that's not the problem. I have the development environment in my
hands and want to just make usage of the executables on the clients
as easy as possible.

Regards, Frank

__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201