[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: modifying tolua
- From: "Mark Fredrik Gumban" <mgumban_tsii@...>
- Date: Thu, 12 Jun 2003 15:18:50 +0800
I found something interesting to add. If makefiles aren't your style, you
can instead create a PKG file for tolua to parse. I saw the tolualua.pkg
and inside it were the following:
And it produces the same "embedded Lua code" tolualua.c has.
This raises a question of comfort though. Embedding the *.lua files into
tolua makes it more compact and you only have to deal with one file, but
modifying the scripts will require a recompile of tolua itself.
In my case I still would prefer the *.lua files separate from the
executable. Perhaps I just missed a few *.lua files in the code.
Thanks again :)
[mailto:email@example.com]On Behalf Of Ariel Manzur
Sent: 12 June 2003 14:56
To: Lua list
Subject: Re: modifying tolua
At 12:22 12/06/2003 +0800, you wrote:
>It seemed to work well and all, but unfortunately the output file it
>generated was zero(0) bytes... it didnt contain anything. I checked the
>program and lua_dofile () returns success, so there isnt a problem with the
>*.lua files (maybe). All the required lua libraries were called (baselib,
>iolib, strlib), so it couldnt be that. Whats the big difference between
>internal version and the *.lua files, besides being internal?
>I'm at a quandary now. Anyone can lend me a little insight? :)
I had the same problem with the included script files (they are all enbeded
on tolualua.c actually). Here's what I added to the Makefile to get it to
recompile when I change a .lua file:
SCRIPTS = array.lua \
tolua -H tolualua.h -o tolualua.c tolualua.pkg
right before the 'OBJS' line. That'll rebuild 'tolualua.c' everytime you
change on of the script files, and compile everything in the binary. As you
can see, it uses tolua, so you need to keep a copy of a working binary. I
don't know about the modifications you made, but that should make it easier
to test it.
hope it helps.. bye..