lua-users home
lua-l archive

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


On Fri, Sep 4, 2009 at 10:13 AM, John Hind<john.hind@zen.co.uk> wrote:
> I have been working on the next version of my Grunt (Windows only) Lua
> runtime. It has a resource loader which can load Lua scripts from text
> resources embedded in the exe file. This approach will do what you are
> looking for and has the additional advantage that you do not have to
> recompile to change the Lua (just use a resource editor).

Always was a cool thing about Win32 exes. But this can also be done
semi-elegantly in Linux:

http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967

The key is the magic command 'objcopy' which turns an arbitrary file
into a linkable .o file.

OK, would have to relink, but that's usually pretty fast.

steve d.