Changeset 1804 for code/branches/ceguilua/src
- Timestamp:
- Sep 21, 2008, 5:10:08 PM (16 years ago)
- Location:
- code/branches/ceguilua/src
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ceguilua/src/CMakeLists.txt
r1803 r1804 2 2 INCLUDE_DIRECTORIES(..) 3 3 INCLUDE_DIRECTORIES(orxonox) 4 INCLUDE_DIRECTORIES(tolua)4 #INCLUDE_DIRECTORIES(tolua) 5 5 6 6 ADD_SUBDIRECTORY(cpptcl) 7 7 ADD_SUBDIRECTORY(ois) 8 8 ADD_SUBDIRECTORY(tinyxml) 9 10 # This section deals with Lua version problems because CEGUILua scripting 11 # module for CEGUI also uses Lua, but maybe with a different version. 12 # So first, find out what CEGUI version we have. 13 14 9 15 ADD_SUBDIRECTORY(tolua) 10 16 … … 14 20 ADD_SUBDIRECTORY(network) 15 21 ADD_SUBDIRECTORY(orxonox) 16 17 # This section deals with Lua version problems because CEGUILua scripting18 # module for CEGUI also uses Lua, but maybe with a different version.19 # So first, find out what CEGUI version we have. -
code/branches/ceguilua/src/ceguilua-0.5.0b/ceguilua/CMakeLists.txt
r1803 r1804 9 9 10 10 ADD_LIBRARY( ceguilua_orxonox SHARED ${LUA_SRC_FILES} ) 11 12 TARGET_LINK_LIBRARIES( ceguilua_orxonox lua_orxonox ) -
code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILua.cpp
r1803 r1804 28 28 * OTHER DEALINGS IN THE SOFTWARE. 29 29 ***************************************************************************/ 30 #ifdef HAVE_CONFIG_H31 # include "config.h"32 #endif33 30 34 31 #include "CEGUI.h" … … 40 37 41 38 // include Lua libs and tolua++ 42 extern "C" { 43 #include "lua.h" 44 #include "lualib.h" 45 #include "lauxlib.h" 46 } 47 48 #include "tolua++.h" 39 #include "lua/lua.hpp" 40 #include "tolua/tolua++.h" 49 41 50 42 // prototype for bindings initialisation function … … 61 53 LuaScriptModule::LuaScriptModule() 62 54 { 63 #if CEGUI_LUA_VER >= 51 64 static const luaL_Reg lualibs[] = { 65 {"", luaopen_base}, 66 {LUA_LOADLIBNAME, luaopen_package}, 67 {LUA_TABLIBNAME, luaopen_table}, 68 {LUA_IOLIBNAME, luaopen_io}, 69 {LUA_OSLIBNAME, luaopen_os}, 70 {LUA_STRLIBNAME, luaopen_string}, 71 {LUA_MATHLIBNAME, luaopen_math}, 72 #if defined(DEBUG) || defined (_DEBUG) 73 {LUA_DBLIBNAME, luaopen_debug}, 74 #endif 75 {0, 0} 76 }; 77 #endif /* CEGUI_LUA_VER >= 51 */ 55 static const luaL_Reg lualibs[] = { 56 {"", luaopen_base}, 57 {LUA_LOADLIBNAME, luaopen_package}, 58 {LUA_TABLIBNAME, luaopen_table}, 59 {LUA_IOLIBNAME, luaopen_io}, 60 {LUA_OSLIBNAME, luaopen_os}, 61 {LUA_STRLIBNAME, luaopen_string}, 62 {LUA_MATHLIBNAME, luaopen_math}, 63 #if defined(DEBUG) || defined (_DEBUG) 64 {LUA_DBLIBNAME, luaopen_debug}, 65 #endif 66 {0, 0} 67 }; 78 68 79 69 // create a lua state … … 82 72 83 73 // init all standard libraries 84 #if CEGUI_LUA_VER >= 51 85 const luaL_Reg *lib = lualibs; 86 for (; lib->func; lib++) 87 { 88 lua_pushcfunction(d_state, lib->func); 89 lua_pushstring(d_state, lib->name); 90 lua_call(d_state, 1, 0); 91 } 92 #else /* CEGUI_LUA_VER >= 51 */ 93 luaopen_base(d_state); 94 luaopen_io(d_state); 95 luaopen_string(d_state); 96 luaopen_table(d_state); 97 luaopen_math(d_state); 98 #if defined(DEBUG) || defined (_DEBUG) 99 luaopen_debug(d_state); 100 #endif 101 #endif /* CEGUI_LUA_VER >= 51 */ 74 const luaL_Reg *lib = lualibs; 75 for (; lib->func; lib++) 76 { 77 lua_pushcfunction(d_state, lib->func); 78 lua_pushstring(d_state, lib->name); 79 lua_call(d_state, 1, 0); 80 } 102 81 103 82 setModuleIdentifierString(); -
code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CEGUILuaFunctor.cpp
r1803 r1804 34 34 35 35 // include Lua libs and tolua++ 36 extern "C" { 37 #include "lua.h" 38 #include "lualib.h" 39 #include "lauxlib.h" 40 } 41 42 #include "tolua++.h" 36 #include "lua/lua.hpp" 37 #include "tolua/tolua++.h" 43 38 44 39 // Start of CEGUI namespace section -
code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt
r1803 r1804 9 9 10 10 ADD_LIBRARY( ceguilua_orxonox SHARED ${LUA_SRC_FILES} ) 11 12 TARGET_LINK_LIBRARIES( ceguilua_orxonox lua_orxonox ) -
code/branches/ceguilua/src/ceguilua-0.6.1/ceguilua/lua_CEGUI.cpp
r1803 r1804 9 9 #include "string.h" 10 10 11 #include "tolua ++.h"11 #include "tolua/tolua++.h" 12 12 13 13 /* Exported function */ -
code/branches/ceguilua/src/core/CMakeLists.txt
r1764 r1804 65 65 66 66 TARGET_LINK_LIBRARIES(core 67 ${Lua_LIBRARIES}68 67 ${OGRE_LIBRARIES} 69 cpptcl 68 lua_orxonox 69 cpptcl_orxonox 70 70 ois_orxonox 71 tinyxml 72 tolualib 71 tinyxml_orxonox 72 tolualib_orxonox 73 73 util 74 74 ${Boost_thread_LIBRARIES} -
code/branches/ceguilua/src/core/Script.cc
r1755 r1804 34 34 #include "CoreIncludes.h" 35 35 36 extern "C" { 37 #include <lualib.h> 38 #include <lauxlib.h> 39 } 36 #include "lua/lua.hpp" 40 37 41 38 #include "tolua/tolua++.h" -
code/branches/ceguilua/src/core/Script.h
r1755 r1804 39 39 40 40 extern "C" { 41 #include <lua.h>41 #include "lua/lua.h" 42 42 } 43 43 -
code/branches/ceguilua/src/cpptcl/CMakeLists.txt
r1505 r1804 1 ADD_LIBRARY(cpptcl SHARED CppTcl.cc)1 ADD_LIBRARY(cpptcl_orxonox SHARED CppTcl.cc) 2 2 3 TARGET_LINK_LIBRARIES(cpptcl 3 TARGET_LINK_LIBRARIES(cpptcl_orxonox 4 4 ${TCL_LIBRARY} 5 5 ) -
code/branches/ceguilua/src/orxonox/CMakeLists.txt
r1755 r1804 97 97 TARGET_LINK_LIBRARIES( orxonox 98 98 ${OGRE_LIBRARIES} 99 ${Lua_LIBRARIES}100 99 ${CEGUI_LIBRARIES} 101 100 ${CEGUI_SCRIPT_LIBRARIES} 102 tinyxml 103 tolualib 101 lua_orxonox 102 tinyxml_orxonox 103 tolualib_orxonox 104 104 ois_orxonox 105 105 util -
code/branches/ceguilua/src/orxonox/OrxonoxStableHeaders.h
r1781 r1804 37 37 #include "util/OrxonoxPlatform.h" 38 38 39 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) && 039 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && !defined(ORXONOX_DISABLE_PCH) 40 40 41 41 // including std headers here is useless since they're already precompiled -
code/branches/ceguilua/src/orxonox/gui/GUIManager.cc
r1776 r1804 39 39 #include <OgreRoot.h> 40 40 #include <CEGUI.h> 41 #include <CEGUILua.h>41 #include "ceguilua/CEGUILua.h" 42 42 #include "util/Exception.h" 43 43 #include "core/input/InputManager.h" … … 50 50 #include "OgreCEGUIRenderer.h" 51 51 52 extern "C" { 53 #include <lualib.h> 54 #include <lauxlib.h> 55 } 52 #include "lua/lua.hpp" 56 53 57 54 namespace orxonox -
code/branches/ceguilua/src/tinyxml/CMakeLists.txt
r1505 r1804 7 7 ) 8 8 9 ADD_LIBRARY(tinyxml SHARED ${TINYXML_SRC_FILES})9 ADD_LIBRARY(tinyxml_orxonox SHARED ${TINYXML_SRC_FILES}) -
code/branches/ceguilua/src/tolua/CMakeLists.txt
r1755 r1804 7 7 ) 8 8 9 ADD_LIBRARY (tolualib SHARED ${TOLUALIB_SRC_FILES})9 ADD_LIBRARY (tolualib_orxonox SHARED ${TOLUALIB_SRC_FILES}) 10 10 11 TARGET_LINK_LIBRARIES (tolualib 12 ${Lua_LIBRARIES}11 TARGET_LINK_LIBRARIES (tolualib_orxonox 12 lua_orxonox 13 13 ) 14 14 … … 19 19 ) 20 20 21 ADD_EXECUTABLE (toluagen ${TOLUAGEN_SRC_FILES})21 ADD_EXECUTABLE (toluagen_orxonox ${TOLUAGEN_SRC_FILES}) 22 22 23 TARGET_LINK_LIBRARIES (toluagen 24 ${Lua_LIBRARIES}25 tolualib 23 TARGET_LINK_LIBRARIES (toluagen_orxonox 24 lua_orxonox 25 tolualib_orxonox 26 26 m 27 27 ) … … 34 34 ENDIF (Lua_VERSION EQUAL 5.0) 35 35 36 GET_TARGET_PROPERTY(TOLUAGEN_EXE toluagen LOCATION)36 GET_TARGET_PROPERTY(TOLUAGEN_EXE toluagen_orxonox LOCATION) 37 37 ADD_CUSTOM_COMMAND( 38 38 OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/toluabind_orxonox.c 39 39 COMMAND ${TOLUAGEN_EXE} -n tolua -o ../../src/tolua/toluabind_orxonox.c -H ../../src/tolua/toluabind_orxonox.h ${TOLUA_PACKAGE} 40 DEPENDS toluagen 40 DEPENDS toluagen_orxonox 41 41 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib 42 42 ) … … 47 47 ) 48 48 49 ADD_EXECUTABLE (tolua ${TOLUAEXE_SRC_FILES})49 ADD_EXECUTABLE (tolua_orxonox ${TOLUAEXE_SRC_FILES}) 50 50 51 TARGET_LINK_LIBRARIES (tolua 52 ${Lua_LIBRARIES}53 tolualib 51 TARGET_LINK_LIBRARIES (tolua_orxonox 52 lua_orxonox 53 tolualib_orxonox 54 54 m 55 55 ) -
code/branches/ceguilua/src/tolua/lua/package.lua
r1755 r1804 116 116 output('#endif\n') 117 117 output('#include "string.h"\n\n') 118 output('#include "tolua ++.h"\n\n')118 output('#include "tolua/tolua++.h"\n\n') 119 119 120 120 if not flags.h then -
code/branches/ceguilua/src/tolua/tolua++.h
r1755 r1804 65 65 typedef int lua_Object; 66 66 67 #include "lua .h"68 #include "l auxlib.h"67 #include "lua/lua.h" 68 #include "lua/lauxlib.h" 69 69 70 70 struct tolua_Error -
code/branches/ceguilua/src/tolua/tolua.c
r1505 r1804 15 15 #include "tolua++.h" 16 16 17 #include "lua .h"18 #include "lua lib.h"19 #include "l auxlib.h"17 #include "lua/lua.h" 18 #include "lua/lualib.h" 19 #include "lua/lauxlib.h" 20 20 21 21 #include <stdio.h> -
code/branches/ceguilua/src/tolua/tolua_is.c
r1505 r1804 14 14 15 15 #include "tolua++.h" 16 #include "l auxlib.h"16 #include "lua/lauxlib.h" 17 17 18 18 #include <stdlib.h> -
code/branches/ceguilua/src/tolua/tolua_map.c
r1505 r1804 15 15 #include "tolua++.h" 16 16 #include "tolua_event.h" 17 #include "l auxlib.h"17 #include "lua/lauxlib.h" 18 18 19 19 #include <string.h> -
code/branches/ceguilua/src/tolua/tolua_push.c
r1505 r1804 14 14 15 15 #include "tolua++.h" 16 #include "l auxlib.h"16 #include "lua/lauxlib.h" 17 17 18 18 #include <stdlib.h>
Note: See TracChangeset
for help on using the changeset viewer.