Changeset 1133 for code/branches/console
- Timestamp:
- Apr 22, 2008, 7:26:43 PM (17 years ago)
- Location:
- code/branches/console
- Files:
-
- 10 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/CMakeLists.txt
r1115 r1133 32 32 33 33 #set binary output directories 34 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_ BINARY_DIR}/bin)35 SET(LIBRARY_OUTPUT_PATH ${PROJECT_ BINARY_DIR}/bin/lib)34 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 35 SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/lib) 36 36 37 37 # global compiler/linker flags. force -O2! … … 43 43 SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined") 44 44 45 #Create verbose makefile output when compiling 46 SET(CMAKE_VERBOSE_MAKEFILE TRUE) 45 #use 'cmake -D make_verb:1 path' to get verbose make output when compiling 46 IF (MAKE_VERB) 47 SET(CMAKE_VERBOSE_MAKEFILE TRUE) 48 ENDIF (MAKE_VERB) 47 49 48 50 -
code/branches/console/cmake/FindLua.cmake
r1076 r1133 1 # Find Lua includes and library1 # Find Lua header and library files 2 2 # 3 # This module defines4 # Lua_INCLUDE_DIR 5 # Lua_LIBRARIES , the libraries to link against to use Lua.6 # Lua_ LIB_DIR, the location of the libraries7 # Lua_ FOUND, If false, do not try to use Lua3 # When called, this script tries to define: 4 # Lua_INCLUDE_DIR Header files directory 5 # Lua_LIBRARIES library files (or file when using lua 5.1) 6 # Lua_FOUND defined (true) if lua was found 7 # Lua_VERSION either 5.1 or 5.0 or undefined 8 8 # 9 # Copyright © 2007, Matt Williams 10 # 11 # Redistribution and use is allowed according to the terms of the BSD license. 9 # authors: Benjamin Knecht, Reto Grieder 12 10 13 MESSAGE(STATUS "lua libs in cache: ${Lua_LIBRARIES}")14 11 IF (Lua_LIBRARIES AND Lua_INCLUDE_DIR) 15 SET(Lua_FIND_QUIETLY TRUE) # Already in cache, be silent 12 13 # Already in cache, be silent 14 SET(Lua_FOUND TRUE) 15 SET(Lua_FIND_QUIETLY TRUE) 16 MESSAGE(STATUS "Lua was found.") 17 18 ELSE (Lua_LIBRARIES AND Lua_INCLUDE_DIR) 19 20 FIND_PATH(Lua_INCLUDE_DIR_51 lua.h 21 /usr/include/lua5.1 22 /usr/local/include/lua5.1 23 ../libs/lua-5.1.3/src) 24 25 FIND_PATH(Lua_INCLUDE_DIR_50 lua.h 26 /usr/include/lua50 27 /usr/local/include/lua50 28 /usr/pack/lua-5.0.3-sd/include) 29 30 FIND_LIBRARY(Lua_LIBRARY_51 lua5.1 31 /usr/lib 32 /usr/local/lib 33 ../libs/lua-5.1.3/lib) 34 35 FIND_LIBRARY(Lua_LIBRARY_1_50 NAMES lua50 lua PATHS 36 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis 37 /usr/lib 38 /usr/local/lib) 39 40 FIND_LIBRARY(Lua_LIBRARY_2_50 NAMES lualib50 lualib PATHS 41 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis 42 /usr/lib 43 /usr/local/lib) 44 45 46 IF (Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51) 47 48 # Found newer lua 5.1 libs 49 SET(Lua_FOUND TRUE) 50 SET(Lua_VERSION 5.1 CACHE STRING "") 51 SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_51} CACHE PATH "") 52 SET(Lua_LIBRARIES ${Lua_LIBRARY_51} CACHE FILEPATH "") 53 54 ELSEIF(Lua_INCLUDE_DIR_50 AND Lua_LIBRARY_1_50 AND Lua_LIBRARY_2_50) 55 56 # Found older lua 5.0 libs 57 SET(Lua_FOUND TRUE) 58 SET(Lua_VERSION 5.0 CACHE STRING "") 59 SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_50} CACHE PATH "") 60 SET(Lua_LIBRARIES ${Lua_LIBRARY_1_50} ${Lua_LIBRARY_2_50} CACHE FILEPATH "") 61 62 ENDIF (Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51) 63 64 65 IF (Lua_FOUND) 66 MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}") 67 ELSE (Lua_FOUND) 68 IF (Lua_FIND_REQUIRED) 69 MESSAGE(FATAL_ERROR "Could not find Lua") 70 ENDIF (Lua_FIND_REQUIRED) 71 ENDIF (Lua_FOUND) 72 16 73 ENDIF (Lua_LIBRARIES AND Lua_INCLUDE_DIR) 17 74 18 FIND_PATH(Lua_INCLUDE_DIR lua.h19 /usr/include/lua5.120 /usr/local/include/lua5.121 ../libs/lua-5.1.3/src)22 23 FIND_LIBRARY(Lua_LIBRARIES lua5.124 /usr/lib25 /usr/local/lib26 ../libs/lua-5.1.3/lib)27 28 IF (NOT Lua_INCLUDE_DIR)29 FIND_PATH(Lua_INCLUDE_DIR lua.h30 /usr/include/lua5031 /usr/local/include/lua5032 /usr/pack/lua-5.0.3-sd/include)33 ENDIF (NOT Lua_INCLUDE_DIR)34 35 IF (NOT Lua_LIBRARIES)36 FIND_LIBRARY(Lua_LIBRARIES lua5037 /usr/lib38 /usr/local/lib)39 40 FIND_LIBRARY(Lua_LIBRARY lualib5041 /usr/lib42 /usr/local/lib)43 44 #SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})45 ENDIF (NOT Lua_LIBRARIES)46 47 #especially for tardis48 IF (NOT Lua_LIBRARIES)49 FIND_LIBRARY(Lua_LIBRARIES lua50 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)51 52 FIND_LIBRARY(Lua_LIBRARY lualib53 /usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)54 55 #SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})56 ENDIF (NOT Lua_LIBRARIES)57 58 IF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)59 SET(Lua_FOUND TRUE)60 ENDIF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)61 62 IF (Lua_FOUND)63 MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")64 MESSAGE(STATUS "Found Lua: ${Lua_LIBRARY}")65 ELSE (Lua_FOUND)66 IF (Lua_FIND_REQUIRED)67 MESSAGE(FATAL_ERROR "Could not find Lua")68 ENDIF (Lua_FIND_REQUIRED)69 ENDIF (Lua_FOUND) -
code/branches/console/src/core/CMakeLists.txt
r1115 r1133 34 34 tolualib 35 35 ${Lua_LIBRARIES} 36 ${Lua_LIBRARY}37 36 ${OIS_LIBRARIES} 38 37 ) -
code/branches/console/src/orxonox/Orxonox.cc
r1092 r1133 54 54 //#include "util/Sleep.h" 55 55 #include "util/ArgReader.h" 56 #include "util/ExprParser.h" 56 57 57 58 // core … … 123 124 InputBuffer* ib_; 124 125 }; 126 127 class Calculator 128 { 129 public: 130 static void calculate(const std::string& calculation) 131 { 132 ExprParser expr(calculation); 133 if (expr.getSuccess()) 134 { 135 if (expr.getResult() == 42.0) 136 std::cout << "Greetings from the restaurant at the end of the universe." << std::endl; 137 // FIXME: insert modifier to display in full precision 138 std::cout << "Result is: " << expr.getResult() << std::endl; 139 if (expr.getRemains() != "") 140 std::cout << "Warning: Expression could not be parsed to the end! Remains: '" 141 << expr.getRemains() << "'" << std::endl; 142 } 143 else 144 std::cout << "Cannot calculate expression: Parse error" << std::endl; 145 } 146 }; 147 ConsoleCommandShortcut(Calculator, calculate, AccessLevel::None); 125 148 126 149 /** … … 410 433 return; 411 434 } 435 Ogre::Root& ogreRoot = Ogre::Root::getSingleton(); 436 412 437 413 438 // Contains the times of recently fired events … … 429 454 { 430 455 // Pump messages in all registered RenderWindows 456 // This calls the WindowEventListener objects. 431 457 Ogre::WindowEventUtilities::messagePump(); 432 458 … … 452 478 // don't forget to call _fireFrameStarted in ogre to make sure 453 479 // everything goes smoothly 454 Ogre::Root::getSingleton()._fireFrameStarted(evt);480 ogreRoot._fireFrameStarted(evt); 455 481 456 482 // server still renders at the moment 457 483 //if (mode_ != SERVER) 458 Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode484 ogreRoot._updateAllRenderTargets(); // only render in non-server mode 459 485 460 486 // get current time … … 466 492 467 493 // again, just to be sure ogre works fine 468 Ogre::Root::getSingleton()._fireFrameEnded(evt);494 ogreRoot._fireFrameEnded(evt); 469 495 } 470 496 } -
code/branches/console/src/tolua/CMakeLists.txt
r1115 r1133 14 14 TARGET_LINK_LIBRARIES(tolua 15 15 ${Lua_LIBRARIES} 16 ${Lua_LIBRARY}17 16 m 18 17 ) … … 41 40 ADD_CUSTOM_COMMAND( 42 41 OUTPUT tolua_bind.h tolua_bind.cc 43 COMMAND ${TOLUA_EXE} -n orxonox -o ../../src/tolua/tolua_bind.cc -H ../../src/tolua/tolua_bind.h ../../src/tolua/tolua.pkg42 COMMAND ${TOLUA_EXE} -n orxonox -o tolua/tolua_bind.cc -H tolua/tolua_bind.h tolua/tolua.pkg 44 43 DEPENDS tolua 45 WORKING_DIRECTORY ${CMAKE_ BINARY_DIR}/bin/lib44 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src 46 45 ) 47 46 … … 50 49 TARGET_LINK_LIBRARIES(tolualib 51 50 ${Lua_LIBRARIES} 52 ${Lua_LIBRARY}53 51 ) 54 52 -
code/branches/console/src/tolua/tolua.pkg
r1115 r1133 1 $cfile " ../../src/core/Script_clean.h"1 $cfile "core/Script_clean.h" -
code/branches/console/src/util/CMakeLists.txt
r1115 r1133 7 7 Clipboard.cc 8 8 SubString.cc 9 ExprParser.cc 9 10 MultiTypePrimitive.cc 10 11 MultiTypeString.cc -
code/branches/console/visual_studio/vc8/core.vcproj
r1084 r1133 252 252 > 253 253 </File> 254 <Filter255 Name="tolua"256 >257 <File258 RelativePath="..\..\src\core\tolua\tolua_bind.cc"259 >260 <FileConfiguration261 Name="Debug|Win32"262 >263 <Tool264 Name="VCCLCompilerTool"265 />266 </FileConfiguration>267 </File>268 </Filter>269 254 </Filter> 270 255 <Filter … … 425 410 > 426 411 </File> 427 <Filter428 Name="tolua"429 >430 <File431 RelativePath="..\..\src\core\tolua\tolua_bind.h"432 >433 </File>434 </Filter>435 412 </Filter> 436 413 </Files> -
code/branches/console/visual_studio/vc8/tolua++.vcproj
r1089 r1133 131 131 > 132 132 <File 133 RelativePath="..\..\src\ util\tolua\tolua_event.c"133 RelativePath="..\..\src\tolua\tolua_bind.cc" 134 134 > 135 135 </File> 136 136 <File 137 RelativePath="..\..\src\ util\tolua\tolua_is.c"137 RelativePath="..\..\src\tolua\tolua_event.c" 138 138 > 139 139 </File> 140 140 <File 141 RelativePath="..\..\src\ util\tolua\tolua_map.c"141 RelativePath="..\..\src\tolua\tolua_is.c" 142 142 > 143 143 </File> 144 144 <File 145 RelativePath="..\..\src\ util\tolua\tolua_push.c"145 RelativePath="..\..\src\tolua\tolua_map.c" 146 146 > 147 147 </File> 148 148 <File 149 RelativePath="..\..\src\util\tolua\tolua_to.c" 149 RelativePath="..\..\src\tolua\tolua_push.c" 150 > 151 </File> 152 <File 153 RelativePath="..\..\src\tolua\tolua_to.c" 150 154 > 151 155 </File> … … 157 161 > 158 162 <File 159 RelativePath="..\..\src\ util\tolua\tolua++.h"163 RelativePath="..\..\src\tolua\tolua++.h" 160 164 > 161 165 </File> 162 166 <File 163 RelativePath="..\..\src\util\tolua\tolua_event.h" 167 RelativePath="..\..\src\tolua\tolua_bind.h" 168 > 169 </File> 170 <File 171 RelativePath="..\..\src\tolua\tolua_event.h" 164 172 > 165 173 </File> -
code/branches/console/visual_studio/vc8/util.vcproj
r1064 r1133 157 157 </File> 158 158 <File 159 RelativePath="..\..\src\util\ExprParser.cc" 160 > 161 </File> 162 <File 159 163 RelativePath="..\..\src\util\Math.cc" 160 164 > … … 199 203 </File> 200 204 <File 205 RelativePath="..\..\src\util\ExprParser.h" 206 > 207 </File> 208 <File 201 209 RelativePath="..\..\src\util\Math.h" 202 210 >
Note: See TracChangeset
for help on using the changeset viewer.