lua-users home
lua-l archive

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


> Can you document the build system, i.e. which 
> dependencies & parameters 
> are needed for compiling?
>
> -ak

It's not really my build system so you might want to
contact the real wxLua maintainer about this. I'm
heavily leveraging the GTK build system that already
comes with wxLua. I modified just enough of everything
to get it to build with the native wxMac port. But
here's what I can tell you:

The build system seems to take a modified resource
file which seems to have come from a Visual Basic
binding of Lua (the .i file in the Import directory).
There are comments/flags in that file that signify if
special actions need to be taken for Windows or GTK. I
added new comments/flags to allow Mac to be taken into
account.

Then there is a Lua program that is run that parses
that file and generates an .hpp file from the .i file.
The Lua program can take an argument that instructs it
to build a Windows or GTK specific result. I modified
this to also handle Mac. (However, I was too lazy to
rename the file, so the Mac version has GTK in the
filename with is a misnomer.)

There is an override file which seems to allow for
bindings that aren't automatically generated
correctly. I had to add one entry there.

For the actual C++ code to build everything, I had to
add flags in the C++ files to also check for
__WXMAC__.

The toplevel makefile seems to build Lua, then run a
Lua script to generate the .hpp file from the .i file.
Then it builds the entire thing leveraging Makefile
information contained in the wxWindows build
directory. I modified the toplevel makefile in wxLua
to pass an argument to the execution of the Lua
program that generates the .hpp file which will make
it generate for Mac. This can be commented out or
uncommented depending if you want GTK or Mac. (Windows
seems to have a totally separate build process and
makefile.)

As far as dependencies, I just needed wxWindows (for
Mac). If you are using Panther, you must grab the CVS
version (2_4_BRANCH) because of a known compile
problem in the current stable dist. 

Please see the README.OSX file I placed in the
wxLua501OSX.tar.gz package I posted. It contains more
specific information about how to actually build
everything and some details about what I had to do to
get this to work.

Thanks,
Eric