[Solved] Integrating CEGUI Lua with existing Lua
Posted: Wed Jul 04, 2007 16:19
Hi,
My C++ project already uses both Lua and CEGUI (+ Ogre, ODE, SDL, etc) and I'd like to combine CEGUI's scripting ability with the one I've already set up. I don't want to end up with two Lua "dialects" (and namespaces) in the same project. The project runs on Win32, 32 bit Linux and 64 bit linux, hopefully with OS X support to follow.
Currently we use Lua 5.1.2 whereas CEGUI seems to be built against 5.0.? (the svn copy of CEGUI's ./configure certainly refuses to compile the Lua module on my machine.)
I know that the CEGUI Lua scripting module provides a way to access it's Lua "state" (struct lua_State *) so hopefully I can just alter my code to use CEGUI's state instead of my own.
My question is really about organising the project in the least painful way. I need to distribute a source package to various developers and artists working on the project. I can see two options:
1) Ask all the developers to downgrade to the older Lua version, checkout CEGUI from svn and do ./configure --enable-toluacegui. This seems like a lot to ask of the other users. Or is it possible to compile CEGUI with the newer version of Lua? And how would I go about it?
2) The other possibility (as I see it) is to import both CEGUI and Lua 5.0.x into my source tree and compile them as part of my project (i.e. make vendor branches). My project doesn't even use autotools yet (and I'm basically unfamiliar) so I envisage this being tricky (for me, easier for everyone else). Does anyone have any tips for getting CEGUI to compile in these conditions?
Obviously I may be missing something so if there's another way to do it I'd be glad to hear about it!
Any help/pointers gratefully received.
--
Bull
http://sourceforge.net/projects/bugrdspace
My C++ project already uses both Lua and CEGUI (+ Ogre, ODE, SDL, etc) and I'd like to combine CEGUI's scripting ability with the one I've already set up. I don't want to end up with two Lua "dialects" (and namespaces) in the same project. The project runs on Win32, 32 bit Linux and 64 bit linux, hopefully with OS X support to follow.
Currently we use Lua 5.1.2 whereas CEGUI seems to be built against 5.0.? (the svn copy of CEGUI's ./configure certainly refuses to compile the Lua module on my machine.)
I know that the CEGUI Lua scripting module provides a way to access it's Lua "state" (struct lua_State *) so hopefully I can just alter my code to use CEGUI's state instead of my own.
My question is really about organising the project in the least painful way. I need to distribute a source package to various developers and artists working on the project. I can see two options:
1) Ask all the developers to downgrade to the older Lua version, checkout CEGUI from svn and do ./configure --enable-toluacegui. This seems like a lot to ask of the other users. Or is it possible to compile CEGUI with the newer version of Lua? And how would I go about it?
2) The other possibility (as I see it) is to import both CEGUI and Lua 5.0.x into my source tree and compile them as part of my project (i.e. make vendor branches). My project doesn't even use autotools yet (and I'm basically unfamiliar) so I envisage this being tricky (for me, easier for everyone else). Does anyone have any tips for getting CEGUI to compile in these conditions?
Obviously I may be missing something so if there's another way to do it I'd be glad to hear about it!
Any help/pointers gratefully received.
--
Bull
http://sourceforge.net/projects/bugrdspace