[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Precompile my Lua Library Code
- From: "Mark Edgar" <medgar123@...>
- Date: Fri, 27 Apr 2007 14:09:36 -0700
On 4/27/07, Edward Mitchell <email@example.com> wrote:
Looks like just what I need. I can compile srlua.exe and then give it the
bin2c.lua file to chew on which itself will chew on my +MyLibs.lua file to
produce an include with the characters for my library Lua code.
If I understood your original question, you need a build tool which
produces C files containing pre-compiled Lua chunks (scripts).
Assuming you have the standard Lua interpreter available, you don't
need srlua to run bin2c.lua at build time:
lua bin2c.lua +mylibs.lua >mylibs.c
Using srlua isn't necessarily wrong here; srlua is really useful for
distributing or deploying Lua programs in situations where the
standard interpreter isn't available or desired. If you're going to
be using bin2c only at build time, it doesn't make sense to add srlua
to your project when the Lua distribution already includes lua.exe.
If, on the other hand, you want to distribute bin2c.exe with your
system, then srlua is just what you want.