You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mar...@us...> - 2009-08-24 00:59:11
|
Revision: 91 http://simspark.svn.sourceforge.net/simspark/?rev=91&view=rev Author: marianbuchta Date: 2009-08-24 00:59:01 +0000 (Mon, 24 Aug 2009) Log Message: ----------- rcssserver3d: -add search path when using 32bit SDL library in 64bit Windows rsgedit: -add header files and extra install/uninstall commands for NSIS installer -set RSGEDIT_DIR environment variable when using NSIS installer -add finding macros because Rsgedit is independent project like rcssserver3d -fixed CMake configuration error in Windows -change subsystem of rsgedit in VS2008 -try to copy all required .dll files to rsgedit's bin/ directory spark: -fixed CMake configuration error on Linux -add search path when using 32bit SDL library in 64bit Windows Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rsgedit/CMakeLists.txt trunk/rsgedit/ChangeLog trunk/rsgedit/src/CMakeLists.txt trunk/rsgedit/wxutil/CMakeLists.txt trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindRuby.cmake Added Paths: ----------- trunk/rsgedit/cmake/FindBoost.cmake trunk/rsgedit/cmake/FindODE.cmake trunk/rsgedit/windows/ trunk/rsgedit/windows/include/ trunk/rsgedit/windows/include/GL/ trunk/rsgedit/windows/include/GL/glext.h trunk/rsgedit/windows/include/GL/wglext.h trunk/rsgedit/windows/install_extra.nsi trunk/rsgedit/windows/uninstall_extra.nsi Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-08-21 21:13:24 UTC (rev 90) +++ trunk/rcssserver3d/CMakeLists.txt 2009-08-24 00:59:01 UTC (rev 91) @@ -10,7 +10,7 @@ check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) -set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" C:/SDL/) +set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" "C:/Program Files (x86)/SDL/" C:/SDL/) find_package(Spark REQUIRED) find_package(Freetype REQUIRED) @@ -20,7 +20,6 @@ find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) - ########## add extra flags ########## if(NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE Release) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) +++ trunk/rcssserver3d/ChangeLog 2009-08-24 00:59:01 UTC (rev 91) @@ -1,3 +1,8 @@ +2009-08-24 Marian Buchta <mar...@gm...> + + * CMakeLists.txt: + - add search path when using 32bit SDL library in 64bit Windows + 2009-08-21 Marian Buchta <mar...@gm...> * cmake/FindBoost.cmake: Modified: trunk/rsgedit/CMakeLists.txt =================================================================== --- trunk/rsgedit/CMakeLists.txt 2009-08-21 21:13:24 UTC (rev 90) +++ trunk/rsgedit/CMakeLists.txt 2009-08-24 00:59:01 UTC (rev 91) @@ -4,9 +4,9 @@ set(PACKAGE_VERSION "0.1") ########## check for headerfiles/libraries ########## -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ ${CMAKE_SOURCE_DIR}/../spark/cmake/) +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) find_package(Spark REQUIRED) -find_package(Boost REQUIRED) +find_package(Boost REQUIRED thread COMPONENTS date_time) find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) find_package(wxWidgets REQUIRED gl base core adv) @@ -27,6 +27,14 @@ STRING "C++ compiler flags for Release builds" FORCE) endif (UNIX) +if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) + include_directories(${CMAKE_SOURCE_DIR}/windows/include) + if(MSVC) + add_definitions(/Gm /Zi /GL) + endif(MSVC) +endif(WIN32) + set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") set(LIBDIR "lib" CACHE PATH "The directory to install libraries into.") set(DATADIR "share" CACHE PATH "The directory to install data files into.") @@ -63,6 +71,24 @@ install(FILES ${CMAKE_BINARY_DIR}/rsgedit_config.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) +if (WIN32) # try to find and install third-party .dlls to bin/ directory + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") + if (EXISTS ${ODEDLL}) + install(PROGRAMS ${ODEDLL} DESTINATION ${BINDIR}) + endif (EXISTS ${ODEDLL}) + + install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${DevIL_LIBRARY_IL}") + if (EXISTS ${DevIL_DLL}) + install(PROGRAMS ${DevIL_DLL} DESTINATION ${BINDIR}) + endif (EXISTS ${DevIL_DLL}) + + install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") +endif (WIN32) + ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" @@ -73,6 +99,7 @@ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") ########### CPack section ############# +include(InstallRequiredSystemLibraries) set(CPACK_SOURCE_GENERATOR TGZ) set(CPACK_SOURCE_IGNORE_FILES /CVS/ /[.]svn/ /.*[.]o$ /.*[.]o/ /autom4te[.]cache/ /[.].* /bootstrap @@ -81,4 +108,11 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") +set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") +set(CPACK_NSIS_CONTACT "sim...@li...") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\install_extra.nsi") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\uninstall_extra.nsi") include(CPack) Modified: trunk/rsgedit/ChangeLog =================================================================== --- trunk/rsgedit/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) +++ trunk/rsgedit/ChangeLog 2009-08-24 00:59:01 UTC (rev 91) @@ -1,3 +1,28 @@ +2009-08-24 Marian Buchta <mar...@gm...> + + * src/CMakeLists.txt: + - change from Console to Window subsystem in VS2008 + + * windows/include/GL/glext.h: + * windows/include/GL/wglext.h: + - add header files because Rsgedit is independent project like rcssserver3d. + + * windows/install_extra.nsi: + * windows/uninstall_extra.nsi: + - add extra install/uninstall commands for NSIS installer + + * cmake/FindBoost.cmake: + * cmake/FindODE.cmake: + - add finding macros because Rsgedit is independent project like rcssserver3d. + + * wxutil/CMakeLists.txt: + - fixed CMake configuration error in Windows + + * CMakeLists.txt: + - add thread and date_time components in Boost + - try to find and copy all thirdparty dlls in the binary package's bin/ directory include system libraries. + - add definitions and include directory into VS2008 + 2009-08-21 Marian Buchta <mar...@gm...> * cmake/FindSpark.cmake: Added: trunk/rsgedit/cmake/FindBoost.cmake =================================================================== --- trunk/rsgedit/cmake/FindBoost.cmake (rev 0) +++ trunk/rsgedit/cmake/FindBoost.cmake 2009-08-24 00:59:01 UTC (rev 91) @@ -0,0 +1,860 @@ +# - Try to find Boost include dirs and libraries +# Usage of this module as follows: +# +# == Using Header-Only libraries from within Boost: == +# +# find_package( Boost 1.36.0 ) +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# endif() +# +# +# == Using actual libraries from within Boost: == +# +# set(Boost_USE_STATIC_LIBS ON) +# set(Boost_USE_MULTITHREADED ON) +# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) +# +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# target_link_libraries(foo ${Boost_LIBRARIES}) +# endif() +# +# +# The components list needs to contain actual names of boost libraries only, +# such as "date_time" for "libboost_date_time". If you're using parts of +# Boost that contain header files only (e.g. foreach) you do not need to +# specify COMPONENTS. +# +# You should provide a minimum version number that should be used. If you provide this +# version number and specify the REQUIRED attribute, this module will fail if it +# can't find the specified or a later version. If you specify a version number this is +# automatically put into the considered list of version numbers and thus doesn't need +# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). +# +# NOTE for Visual Studio Users: +# Automatic linking is used on MSVC & Borland compilers by default when +# #including things in Boost. It's important to note that setting +# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, +# should you need this feature. Automatic linking typically uses static +# libraries with a few exceptions (Boost.Python is one). +# +# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for +# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example +# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS +# gets set to OFF. It is suggested you avoid automatic linking since it +# will make your application less portable. +# +# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ +# +# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for Boost. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this variable will certainly be needed +# in the future when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, +# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0 +# +# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should +# add both 1.x and 1.x.0 as shown above. Official Boost include directories +# omit the 3rd version number from include paths if it is 0 although not all +# binary Boost releases do so. +# +# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0") +# +# ============================================================================ +# +# Variables used by this module, they can change the default behaviour and need to be set +# before calling find_package: +# +# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded +# boost libraries. If not specified, defaults +# to ON. +# +# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static +# boost libraries. Defaults to OFF. +# +# Other Variables used by this module which you may want to set. +# +# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching +# the boost include directory. Please see +# the documentation above regarding this +# annoying, but necessary variable :( +# +# Boost_DEBUG Set this to TRUE to enable debugging output +# of FindBoost.cmake if you are having problems. +# Please enable this before filing any bug +# reports. +# +# Boost_COMPILER Set this to the compiler suffix used by Boost +# (e.g. "-gcc43") if FindBoods has problems finding +# the proper Boost installation +# +# These last three variables are available also as environment variables: +# +# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for +# Boost. Set this if the module has problems finding +# the proper Boost installation. +# +# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the +# module has problems finding the proper Boost installation +# +# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the +# module has problems finding the proper Boost installation +# +# Variables defined by this module: +# +# Boost_FOUND System has Boost, this means the include dir was +# found, as well as all the libraries specified in +# the COMPONENTS list. +# +# Boost_INCLUDE_DIRS Boost include directories: not cached +# +# Boost_INCLUDE_DIR This is almost the same as above, but this one is +# cached and may be modified by advanced users +# +# Boost_LIBRARIES Link these to use the Boost libraries that you +# specified: not cached +# +# Boost_LIBRARY_DIRS The path to where the Boost library files are. +# +# Boost_VERSION The version number of the boost libraries that +# have been found, same as in version.hpp from Boost +# +# Boost_LIB_VERSION The version number in filename form as +# it's appended to the library filenames +# +# Boost_MAJOR_VERSION major version number of boost +# Boost_MINOR_VERSION minor version number of boost +# Boost_SUBMINOR_VERSION subminor version number of boost +# +# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call +# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS}) +# to have diagnostic information about Boost's +# automatic linking outputted during compilation time. +# +# For each component you list the following variables are set. +# ATTENTION: The component names need to be in lower case, just as the boost +# library names however the CMake variables use upper case for the component +# part. So you'd get Boost_SERIALIZATION_FOUND for example. +# +# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. +# Boost_${COMPONENT}_LIBRARY The absolute path of the Boost library "component". +# Boost_${COMPONENT}_LIBRARY_DEBUG The absolute path of the debug version of the +# Boost library "component". +# Boost_${COMPONENT}_LIBRARY_RELEASE The absolute path of the release version of the +# Boost library "component" +# +# Copyright (c) 2006-2008 Andreas Schneider <ma...@cy...> +# Copyright (c) 2007 Wengo +# Copyright (c) 2007 Mike Jackson +# Copyright (c) 2008 Andreas Pakulat <ap...@gm...> +# +# Redistribution AND use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +IF(NOT DEFINED Boost_USE_MULTITHREADED) + SET(Boost_USE_MULTITHREADED TRUE) +ENDIF() + +if(Boost_FIND_VERSION_EXACT) + # The version may appear in a directory with or without the patch + # level, even when the patch level is non-zero. + set(_boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") +else(Boost_FIND_VERSION_EXACT) + # The user has not requested an exact version. Among known + # versions, find those that are acceptable to the user request. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.38.0" "1.38" "1.37.0" "1.37" + "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" + "1.34" "1.33.1" "1.33.0" "1.33") + set(_boost_TEST_VERSIONS) + if(Boost_FIND_VERSION) + set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + # Select acceptable versions. + foreach(version ${_Boost_KNOWN_VERSIONS}) + if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") + # This version is high enough. + list(APPEND _boost_TEST_VERSIONS "${version}") + elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") + # This version is a short-form for the requested version with + # the patch level dropped. + list(APPEND _boost_TEST_VERSIONS "${version}") + endif() + endforeach(version) + else(Boost_FIND_VERSION) + # Any version is acceptable. + set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") + endif(Boost_FIND_VERSION) +endif(Boost_FIND_VERSION_EXACT) + +# The reason that we failed to find Boost. This will be set to a +# user-friendly message when we fail to find some necessary piece of +# Boost. +set(Boost_ERROR_REASON) + +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +######################################################################### + +MACRO (_Boost_ADJUST_LIB_VARS basename) + IF (Boost_INCLUDE_DIR ) + IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + + # if only the release version was found, set the debug variable also to the release version + IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) + ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + + IF (Boost_${basename}_LIBRARY) + set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + + # Remove superfluous "debug" / "optimized" keywords from + # Boost_LIBRARY_DIRS + FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) + GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) + LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) + ENDFOREACH() + LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) + + set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") + ENDIF (Boost_${basename}_LIBRARY) + + ENDIF (Boost_INCLUDE_DIR ) + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( + Boost_${basename}_LIBRARY + Boost_${basename}_LIBRARY_RELEASE + Boost_${basename}_LIBRARY_DEBUG + ) +ENDMACRO (_Boost_ADJUST_LIB_VARS) + +# +# Runs compiler with "-dumpversion" and parses major/minor +# version with a regex. +# +FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) + + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + + SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) +ENDFUNCTION() + + +#------------------------------------------------------------------------------- + + +SET( _boost_IN_CACHE TRUE) +IF(Boost_INCLUDE_DIR) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( _boost_IN_CACHE FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) +ELSE(Boost_INCLUDE_DIR) + SET( _boost_IN_CACHE FALSE) +ENDIF(Boost_INCLUDE_DIR) + +IF (_boost_IN_CACHE) + # in cache already + SET(Boost_FOUND TRUE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) + ENDFOREACH(COMPONENT) + SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) + IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " + "is already in the cache. For debugging messages, please clear the cache.") + endif() +ELSE (_boost_IN_CACHE) + # Need to search for boost + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost not in cache") + # Output some of their choices + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") + endif() + + IF(WIN32) + # In windows, automatic linking is performed, so you do not have + # to specify the libraries. If you are linking to a dynamic + # runtime, then you can choose to link to either a static or a + # dynamic Boost library, the default is to do a static link. You + # can alter this for a specific library "whatever" by defining + # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be + # linked dynamically. Alternatively you can force all Boost + # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. + + # This feature can be disabled for Boost library "whatever" by + # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining + # BOOST_ALL_NO_LIB. + + # If you want to observe which libraries are being linked against + # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking + # code to emit a #pragma message each time a library is selected + # for linking. + SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS + "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") + ENDIF(WIN32) + + SET(_boost_INCLUDE_SEARCH_DIRS + C:/boost/include + C:/boost + "$ENV{ProgramFiles}/boost" + C:/library/boost + "C:/Program Files/boost" + "C:/Program Files (x86)/boost" + /sw/local/include + ) + + # If BOOST_ROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOST_ROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + + # If BOOSTROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOSTROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + + # If BOOST_INCLUDEDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) + ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + + # If BOOST_LIBRARYDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) + ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) + ENDIF( BOOST_ROOT ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Declared as CMake or Environmental Variables:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_ROOT = ${BOOST_ROOT}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + endif() + + IF( BOOST_ROOT ) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_ROOT}/include + ${BOOST_ROOT} + ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_INCLUDEDIR ) + file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_INCLUDEDIR ) + + # ------------------------------------------------------------------------ + # Search for Boost include DIR + # ------------------------------------------------------------------------ + # Try to find Boost by stepping backwards through the Boost versions + # we know about. + IF( NOT Boost_INCLUDE_DIR ) + # Build a list of path suffixes for each version. + SET(_boost_PATH_SUFFIXES) + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + # Add in a path suffix, based on the required version, ideally + # we could read this from version.hpp, but for that to work we'd + # need to know the include dir already + set(_boost_BOOSTIFIED_VERSION) + + # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 + IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ENDIF() + + list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") + if(WIN32) + # For BoostPro's underscores (and others?) + list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") + endif() + + ENDFOREACH(_boost_VER) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Include debugging info:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") + endif() + + # Look for a standard boost header file. + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + HINTS ${_boost_INCLUDE_SEARCH_DIRS} + PATH_SUFFIXES ${_boost_PATH_SUFFIXES} + ) + ENDIF( NOT Boost_INCLUDE_DIR ) + + # ------------------------------------------------------------------------ + # Extract version information from version.hpp + # ------------------------------------------------------------------------ + + IF(Boost_INCLUDE_DIR) + # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp + # Read the whole file: + # + SET(BOOST_VERSION 0) + SET(BOOST_LIB_VERSION "") + FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") + endif() + + STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + + SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") + SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") + + IF(NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") + ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "version.hpp reveals boost " + "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + endif() + ELSE(Boost_INCLUDE_DIR) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") + ENDIF(Boost_INCLUDE_DIR) + + # ------------------------------------------------------------------------ + # Suffix initialization and compiler suffix detection. + # ------------------------------------------------------------------------ + + # Setting some more suffixes for the library + SET (Boost_LIB_PREFIX "") + if ( MSVC AND Boost_USE_STATIC_LIBS ) + SET (Boost_LIB_PREFIX "lib") + endif() + + if (Boost_COMPILER) + set(_boost_COMPILER ${Boost_COMPILER}) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "using user-specified Boost_COMPILER = ${_boost_COMPILER}") + endif() + else(Boost_COMPILER) + # Attempt to guess the compiler suffix + # NOTE: this is not perfect yet, if you experience any issues + # please report them and use the Boost_COMPILER variable + # to work around the problems. + if (MSVC90) + SET (_boost_COMPILER "-vc90") + elseif (MSVC80) + SET (_boost_COMPILER "-vc80") + elseif (MSVC71) + SET (_boost_COMPILER "-vc71") + elseif (MSVC70) # Good luck! + SET (_boost_COMPILER "-vc7") # yes, this is correct + elseif (MSVC60) # Good luck! + SET (_boost_COMPILER "-vc6") # yes, this is correct + elseif (BORLAND) + SET (_boost_COMPILER "-bcb") + elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + if(WIN32) + set (_boost_COMPILER "-iw") + else() + set (_boost_COMPILER "-il") + endif() + elseif (MINGW) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + endif() + elseif (UNIX) + if (CMAKE_COMPILER_IS_GNUCXX) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + # Determine which version of GCC we have. + IF(APPLE) + IF(Boost_MINOR_VERSION) + IF(${Boost_MINOR_VERSION} GREATER 35) + # In Boost 1.36.0 and newer, the mangled compiler name used + # on Mac OS X/Darwin is "xgcc". + SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") + ELSE(${Boost_MINOR_VERSION} GREATER 35) + # In Boost <= 1.35.0, there is no mangled compiler name for + # the Mac OS X/Darwin version of GCC. + SET(_boost_COMPILER "") + ENDIF(${Boost_MINOR_VERSION} GREATER 35) + ELSE(Boost_MINOR_VERSION) + # We don't know the Boost version, so assume it's + # pre-1.36.0. + SET(_boost_COMPILER "") + ENDIF(Boost_MINOR_VERSION) + ELSE() + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF() + endif() + endif (CMAKE_COMPILER_IS_GNUCXX) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "guessed _boost_COMPILER = ${_boost_COMPILER}") + endif() + endif(Boost_COMPILER) + + SET (_boost_MULTITHREADED "-mt") + if( NOT Boost_USE_MULTITHREADED ) + set (_boost_MULTITHREADED "") + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") + endif() + + SET( _boost_STATIC_TAG "") + set( _boost_ABI_TAG "") + IF (WIN32) + IF(MSVC) + SET (_boost_ABI_TAG "g") + ENDIF(MSVC) + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_STATIC_TAG "-s") + ENDIF( Boost_USE_STATIC_LIBS ) + ENDIF(WIN32) + SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_STATIC_TAG = ${_boost_STATIC_TAG}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_ABI_TAG = ${_boost_ABI_TAG}") + endif() + + # ------------------------------------------------------------------------ + # Begin finding boost libraries + # ------------------------------------------------------------------------ + + SET(_boost_LIBRARIES_SEARCH_DIRS + C:/boost/lib + C:/boost + "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" + "$ENV{ProgramFiles}/boost" + C:/library/boost/stage/lib + "C:/Program Files/boost/stage/lib" + "C:/Program Files (x86)/boost/stage/lib" + C:/boost/lib + /sw/local/lib + ) + IF( BOOST_ROOT ) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_ROOT}/lib + ${BOOST_ROOT}/stage/lib + ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_LIBRARYDIR ) + file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_LIBRARYDIR ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}") + endif() + + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) + SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") + + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + IF(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ELSE(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF(WIN32) + ENDIF( Boost_USE_STATIC_LIBS ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) + IF( Boost_USE_STATIC_LIBS ) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF( Boost_USE_STATIC_LIBS ) + ENDFOREACH(COMPONENT) + # ------------------------------------------------------------------------ + # End finding boost libraries + # ------------------------------------------------------------------------ + + SET(Boost_INCLUDE_DIRS + ${Boost_INCLUDE_DIR} + ) + + SET(Boost_FOUND FALSE) + IF(Boost_INCLUDE_DIR) + SET( Boost_FOUND TRUE ) + + # Check the version of Boost against the requested version. + if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") + endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + + if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + # If the user requested an exact version of Boost, check + # that. We already know that the Boost version we have is >= the + # requested version. + set(_Boost_VERSION_AGE "new") + + # If the user didn't specify a patchlevel, it's 0. + if (NOT Boost_FIND_VERSION_PATCH) + set(Boost_FIND_VERSION_PATCH 0) + endif (NOT Boost_FIND_VERSION_PATCH) + + # We'll set Boost_FOUND true again if we have an exact version match. + set(Boost_FOUND FALSE) + if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND TRUE ) + endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + + if(NOT Boost_FOUND) + # State that we found a version of Boost that is too new or too old. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + if (Boost_FIND_VERSION_PATCH) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") + endif (Boost_FIND_VERSION_PATCH) + if (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") + endif (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") + endif (NOT Boost_FOUND) + + if (Boost_FOUND) + set(_boost_CHECKED_COMPONENT FALSE) + set(_Boost_MISSING_COMPONENTS) + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} COMPONENT) + set(_boost_CHECKED_COMPONENT TRUE) + if(NOT Boost_${COMPONENT}_FOUND) + string(TOLOWER ${COMPONENT} COMPONENT) + list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) + set( Boost_FOUND FALSE) + endif(NOT Boost_${COMPONENT}_FOUND) + endforeach(COMPONENT) + endif (Boost_FOUND) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") + endif() + + if (_Boost_MISSING_COMPONENTS) + # We were unable to find some libraries, so generate a sensible + # error message that lists the libraries we were unable to find. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") + foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON} boost_${COMPONENT}\n") + endforeach(COMPONENT) + + list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) + list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) + if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + endif (_Boost_MISSING_COMPONENTS) + + IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + # Compatibility Code for backwards compatibility with CMake + # 2.4's FindBoost module. + + # Look for the boost library path. + # Note that the user may not have installed any libraries + # so it is quite possible the Boost_LIBRARY_PATH may not exist. + SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) + + IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + + IF("${_boost_LIB_DIR}" MATCHES "/include$") + # Strip off the trailing "/include" in the path. + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") + + IF(EXISTS "${_boost_LIB_DIR}/lib") + SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/lib") + IF(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR "") + ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") + ENDIF(EXISTS "${_boost_LIB_DIR}/lib") + + IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") + ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + + ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + + ELSE(Boost_INCLUDE_DIR) + SET( Boost_FOUND FALSE) + ENDIF(Boost_INCLUDE_DIR) + + IF (Boost_FOUND) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + ENDIF(NOT Boost_FIND_QUIETLY) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Found the following Boost libraries:") + ENDIF(NOT Boost_FIND_QUIETLY) + FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) + STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) + IF ( Boost_${UPPERCOMPONENT}_FOUND ) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE (STATUS " ${COMPONENT}") + ENDIF(NOT Boost_FIND_QUIETLY) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) + ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) + ENDFOREACH(COMPONENT) + ELSE (Boost_FOUND) + IF (Boost_FIND_REQUIRED) + message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") + ENDIF(Boost_FIND_REQUIRED) + ENDIF(Boost_FOUND) + + # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view + MARK_AS_ADVANCED(Boost_INCLUDE_DIR + Boost_INCLUDE_DIRS + Boost_LIBRARY_DIRS + ) +ENDIF(_boost_IN_CACHE) + Added: trunk/rsgedit/cmake/FindODE.cmake =================================================================== --- trunk/rsgedit/cmake/FindODE.cmake (rev 0) +++ trunk/rsgedit/cmake/FindODE.cmake 2009-08-24 00:59:01 UTC (rev 91) @@ -0,0 +1,109 @@ +# find ODE (Open Dynamics Engine) includes and library +# +# ODE_INCLUDE_DIR - where the directory containing the ODE headers can be +# found +# ODE_LIBRARY - full path to the ODE library +# ODE_CFLAGS - additional compiler flags for ODE +# ODE_FOUND - TRUE if ODE was found + +IF (NOT ODE_FOUND) + + FIND_PROGRAM(ODE_CONFIG ode-config) + IF(ODE_CONFIG) + # Use the newer EXECUTE_PROCESS command if it is available. + IF(COMMAND EXECUTE_PROCESS) + EXECUTE_PROCESS( + COMMAND ${ODE_CONFIG} --cflags + OUTPUT_VARIABLE ODE_CONFIG_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE ODE_CONFIG_RESULT + ) + ELSE(COMMAND EXECUTE_PROCESS) + EXEC_PROGRAM(${ODE_CONFIG} ARGS "--cflags" + OUTPUT_VARIABLE ODE_CONFIG_CFLAGS + RETURN_VALUE ODE_CONFIG_RESULT + ) + ENDIF(COMMAND EXECUTE_PROCESS) + + # Parse the include flags. + IF("${ODE_CONFIG_RESULT}" MATCHES "^0$") + # Convert the compile flags to a CMake list. + STRING(REGEX REPLACE " +" ";" + ODE_CONFIG_CFLAGS "${ODE_CONFIG_CFLAGS}") + + # Look for -D options. + SET(ODE_EXTRA_CFLAGS) + FOREACH(flag ${ODE_CONFIG_CFLAGS}) + IF("${flag}" MATCHES "^-D") + SET(ODE_EXTRA_CFLAGS ${ODE_EXTRA_CFLAGS} "${flag}") + ENDIF("${flag}" MATCHES "^-D") + ENDFOREACH(flag) + ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") + MESSAGE("Error running ${ODE_CONFIG}: [${ODE_CONFIG_RESULT}]") + ENDIF("${ODE_CONFIG_RESULT}" MATCHES "^0$") + ENDIF(ODE_CONFIG) + + FIND_PATH(ODE_INCLUDE_DIR ode/ode.h + /usr/include + /usr/local/include + $ENV{OGRE_HOME}/include # OGRE SDK on WIN32 + $ENV{INCLUDE} + C:/library/ode/include + "C:/Program Files/ode/include" + "C:/Program Files (x86)/ode/include" + C:/ode/include + ) + FIND_LIBRARY(ODE_LIBRARY + NAMES ode ode_double ode_single + PATHS + /usr/lib + /usr/lib64 + /usr/local/lib + $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 + C:/library/ode/lib/ + "C:/Program Files/ode/lib/" + "C:/Program Files (x86)/ode/lib/" + C:/ode/lib/ + PATH_SUFFIXES + releaselib + ReleaseDoubleDLL ReleaseDoubleLib + ReleaseSingleDLL ReleaseSingleLib + ) + + IF (WIN32) + IF("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") + ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdSINGLE") + ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") + ENDIF (WIN32) + + IF (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") + MESSAGE(STATUS "Found additional flags for ODE: ${ODE_CFLAGS}") + ELSE (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS CACHE STRING "Additional ODE flags") + ENDIF (ODE_EXTRA_CFLAGS) + + IF(ODE_INCLUDE_DIR) + MESSAGE(STATUS "Found ODE include dir: ${ODE_INCLUDE_DIR}") + ELSE(ODE_INCLUDE_DIR) + MESSAGE(STATUS "Could NOT find ODE headers.") + ENDIF(ODE_INCLUDE_DIR) + + IF(ODE_LIBRARY) + MESSAGE(STATUS "Found ODE library: ${ODE_LIBRARY}") + ELSE(ODE_LIBRARY) + MESSAGE(STATUS "Could NOT find ODE library.") + ENDIF(ODE_LIBRARY) + + IF(ODE_INCLUDE_DIR AND ODE_LIBRARY) + SET(ODE_FOUND TRUE CACHE STRING "Whether ODE was found or not") + ELSE(ODE_INCLUDE_DIR AND ODE_LIBRARY) + SET(ODE_FOUND FALSE) + IF(ODE_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find ODE. Please install ODE (http://www.ode.org)") + ENDIF(ODE_FIND_REQUIRED) + ENDIF(ODE_INCLUDE_DIR AND ODE_LIBRARY) +ENDIF (NOT ODE_FOUND) + Modified: trunk/rsgedit/src/CMakeLists.txt =================================================================== --- trunk/rsgedit/src/CMakeLists.txt 2009-08-21 21:13:24 UTC (rev 90) +++ trunk/rsgedit/src/CMakeLists.txt 2009-08-24 00:59:01 UTC (rev 91) @@ -44,14 +44,20 @@ ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) -add_executable(rsgedit ${rsgedit_SRCS}) +add_executable(rsgedit WIN32 ${rsgedit_SRCS}) -set_target_properties(rsgedit PROPERTIES COMPILE_FLAGS ${wxWidgets_CXX_FLAGS}) +set_target_properties(rsgedit PROPERTIES COMPILE_FLAGS "${wxWidgets_CXX_FLAGS}") set_target_properties(rsgedit PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") -target_link_libraries(rsgedit pthread wxutil ${SPARK_LIBRARIES} ${SALT_LIBRARIES} +if(WIN32) + target_link_libraries(rsgedit wxutil ${SPARK_LIBRARIES} ${SALT_LIBRARIES} + ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES} + ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${Boost_LIBRARIES}) +else(WIN32) + target_link_libraries(rsgedit pthread wxutil ${SPARK_LIBRARIES} ${SALT_LIBRARIES} ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES}) +endif(WIN32) install(TARGETS rsgedit DESTINATION ${BINDIR}) Added: trunk/rsgedit/windows/include/GL/glext.h =================================================================== --- trunk/rsgedit/windows/include/GL/glext.h (rev 0) +++ trunk/rsgedit/windows/include/GL/glext.h 2009-08-24 00:59:01 UTC (rev 91) @@ -0,0 +1,8395 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glext.h last updated 2008/08/16 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GL_GLEXT_VERSION 42 + +#ifndef GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#endif + +#ifndef GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define ... [truncated message content] |
From: <mar...@us...> - 2009-08-21 21:13:37
|
Revision: 90 http://simspark.svn.sourceforge.net/simspark/?rev=90&view=rev Author: marianbuchta Date: 2009-08-21 21:13:24 +0000 (Fri, 21 Aug 2009) Log Message: ----------- add search paths when using 32bit libraries in 64bit Windows Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/cmake/FindBoost.cmake trunk/rcssserver3d/cmake/FindDevIL.cmake trunk/rcssserver3d/cmake/FindFreetype.cmake trunk/rcssserver3d/cmake/FindODE.cmake trunk/rcssserver3d/cmake/FindSpark.cmake trunk/rsgedit/ChangeLog trunk/rsgedit/cmake/FindSpark.cmake trunk/simspark-utilities/ChangeLog trunk/simspark-utilities/cmake/FindSpark.cmake trunk/spark/ChangeLog trunk/spark/cmake/FindBoost.cmake trunk/spark/cmake/FindDevIL.cmake trunk/spark/cmake/FindFreetype.cmake trunk/spark/cmake/FindODE.cmake trunk/spark/cmake/FindRuby.cmake trunk/spark/cmake/FindZLIB.cmake Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) @@ -1,3 +1,12 @@ +2009-08-21 Marian Buchta <mar...@gm...> + + * cmake/FindBoost.cmake: + * cmake/FindDevIL.cmake: + * cmake/FindFreetype.cmake: + * cmake/FindODE.cmake: + * cmake/FindSpark.cmake: + - add search paths when using 32bit libraries in 64bit Windows + 2009-08-13 Hedayat Vatankhah <he...@gr...> * simspark/CMakeLists.txt: Modified: trunk/rcssserver3d/cmake/FindBoost.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindBoost.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/cmake/FindBoost.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -358,6 +358,7 @@ "$ENV{ProgramFiles}/boost" C:/library/boost "C:/Program Files/boost" + "C:/Program Files (x86)/boost" /sw/local/include ) @@ -619,6 +620,7 @@ "$ENV{ProgramFiles}/boost" C:/library/boost/stage/lib "C:/Program Files/boost/stage/lib" + "C:/Program Files (x86)/boost/stage/lib" C:/boost/lib /sw/local/lib ) Modified: trunk/rcssserver3d/cmake/FindDevIL.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindDevIL.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/cmake/FindDevIL.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -33,6 +33,7 @@ /opt/net/gcc33/DevIL C:/library/DevIL "C:/Program Files/DevIL" + "C:/Program Files (x86)/DevIL" C:/DevIL ) Modified: trunk/rcssserver3d/cmake/FindFreetype.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindFreetype.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/cmake/FindFreetype.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -41,6 +41,7 @@ /usr/freeware/include C:/library/GnuWin32/include "C:/Program Files/GnuWin32/include" + "C:/Program Files (x86)/GnuWin32/include" C:/GnuWin32/include ) @@ -56,6 +57,7 @@ /usr/freeware/include C:/library/GnuWin32/include/freetype2 "C:/Program Files/GnuWin32/include/freetype2" + "C:/Program Files (x86)/GnuWin32/include/freetype2" C:/GnuWin32/include/freetype2 PATH_SUFFIXES freetype2 ) @@ -73,6 +75,7 @@ /usr/freeware C:/library/GnuWin32/lib "C:/Program Files/GnuWin32/lib" + "C:/Program Files (x86)/GnuWin32/lib" C:/GnuWin32/lib ) Modified: trunk/rcssserver3d/cmake/FindODE.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindODE.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/cmake/FindODE.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -50,6 +50,7 @@ $ENV{INCLUDE} C:/library/ode/include "C:/Program Files/ode/include" + "C:/Program Files (x86)/ode/include" C:/ode/include ) FIND_LIBRARY(ODE_LIBRARY @@ -61,6 +62,7 @@ $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 C:/library/ode/lib/ "C:/Program Files/ode/lib/" + "C:/Program Files (x86)/ode/lib/" C:/ode/lib/ PATH_SUFFIXES releaselib Modified: trunk/rcssserver3d/cmake/FindSpark.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindSpark.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rcssserver3d/cmake/FindSpark.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -27,7 +27,7 @@ SET(SPARK_FIND_QUIETLY TRUE) ENDIF (SPARK_INCLUDE_DIR) -SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Library/simspark") +SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Program Files (x86)/simspark" "C:/library/simspark") FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h PATHS ${SPARK_DIR} Modified: trunk/rsgedit/ChangeLog =================================================================== --- trunk/rsgedit/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rsgedit/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) @@ -1,3 +1,9 @@ +2009-08-21 Marian Buchta <mar...@gm...> + + * cmake/FindSpark.cmake: + - update file from rcssserver3d + - add search paths when using 32bit libraries in 64bit Windows + 2009-08-13 Hedayat Vatankhah <he...@gr...> * src/CMakeLists.txt: Modified: trunk/rsgedit/cmake/FindSpark.cmake =================================================================== --- trunk/rsgedit/cmake/FindSpark.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/rsgedit/cmake/FindSpark.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -24,10 +24,16 @@ SET(SPARK_FIND_QUIETLY TRUE) ENDIF (SPARK_INCLUDE_DIR) -FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h PATH_SUFFIXES simspark) +SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Program Files (x86)/simspark" "C:/Library/simspark") +FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) + SET(SPARK_NAMES spark spark_debug) -FIND_LIBRARY(SPARK_LIBRARY NAMES ${SPARK_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(SPARK_LIBRARY NAMES ${SPARK_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) GET_FILENAME_COMPONENT(SPARK_LIB_DIR ${SPARK_LIBRARY} PATH) # handle the QUIETLY and REQUIRED arguments and set SPARK_FOUND to TRUE if @@ -50,10 +56,14 @@ SET(SALT_FIND_QUIETLY TRUE) ENDIF (SALT_INCLUDE_DIR) -FIND_PATH(SALT_INCLUDE_DIR salt/salt.h PATH_SUFFIXES simspark) +FIND_PATH(SALT_INCLUDE_DIR salt/salt.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(SALT_NAMES salt salt_debug) -FIND_LIBRARY(SALT_LIBRARY NAMES ${SALT_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(SALT_LIBRARY NAMES ${SALT_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set SALT_FOUND to TRUE if # all listed variables are TRUE @@ -75,10 +85,14 @@ SET(ZEITGEIST_FIND_QUIETLY TRUE) ENDIF (ZEITGEIST_INCLUDE_DIR) -FIND_PATH(ZEITGEIST_INCLUDE_DIR zeitgeist/zeitgeist.h PATH_SUFFIXES simspark) +FIND_PATH(ZEITGEIST_INCLUDE_DIR zeitgeist/zeitgeist.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(ZEITGEIST_NAMES zeitgeist zeitgeist_debug) -FIND_LIBRARY(ZEITGEIST_LIBRARY NAMES ${ZEITGEIST_NAMES} PATH_SUFFIXES simspark) +FIND_LIBRARY(ZEITGEIST_LIBRARY NAMES ${ZEITGEIST_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set ZEITGEIST_FOUND to TRUE if # all listed variables are TRUE @@ -100,10 +114,14 @@ SET(OXYGEN_FIND_QUIETLY TRUE) ENDIF (OXYGEN_INCLUDE_DIR) -FIND_PATH(OXYGEN_INCLUDE_DIR oxygen/oxygen.h PATH_SUFFIXES simspark) +FIND_PATH(OXYGEN_INCLUDE_DIR oxygen/oxygen.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(OXYGEN_NAMES oxygen oxygen_debug) -FIND_LIBRARY(OXYGEN_LIBRARY NAMES ${OXYGEN_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(OXYGEN_LIBRARY NAMES ${OXYGEN_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set OXYGEN_FOUND to TRUE if # all listed variables are TRUE @@ -125,10 +143,14 @@ SET(KEROSIN_FIND_QUIETLY TRUE) ENDIF (KEROSIN_INCLUDE_DIR) -FIND_PATH(KEROSIN_INCLUDE_DIR kerosin/kerosin.h PATH_SUFFIXES simspark) +FIND_PATH(KEROSIN_INCLUDE_DIR kerosin/kerosin.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(KEROSIN_NAMES kerosin kerosin_debug) -FIND_LIBRARY(KEROSIN_LIBRARY NAMES ${KEROSIN_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(KEROSIN_LIBRARY NAMES ${KEROSIN_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set KEROSIN_FOUND to TRUE if # all listed variables are TRUE Modified: trunk/simspark-utilities/ChangeLog =================================================================== --- trunk/simspark-utilities/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/simspark-utilities/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) @@ -1,3 +1,8 @@ +2009-08-21 Marian Buchta <mar...@gm...> + + * cmake/FindSpark.cmake: + - add search path when using 32bit library in 64bit Windows + 2009-08-13 Hedayat Vatankhah <he...@gr...> * CMakeLists.txt: @@ -9,13 +14,13 @@ * samplesim/CMakeLists.txt: - remove duplicate include directories -2009-08-07 Marian Buchta <mar...@gm...> - - * CMakeLists.txt - - try to find and copy all thirdparty dlls in the binary package's bin/ directory. - - * cmake/FindSpark.cmake - - Update script from rcssserver3d\cmake\FindSpark.cmake - - * sampleagent/CMakeLists.txt +2009-08-07 Marian Buchta <mar...@gm...> + + * CMakeLists.txt + - try to find and copy all thirdparty dlls in the binary package's bin/ directory. + + * cmake/FindSpark.cmake + - Update script from rcssserver3d\cmake\FindSpark.cmake + + * sampleagent/CMakeLists.txt - add RCSSNET3D_LIBRARIES and NET_LIBS - fixed linking error in VS2008 \ No newline at end of file Modified: trunk/simspark-utilities/cmake/FindSpark.cmake =================================================================== --- trunk/simspark-utilities/cmake/FindSpark.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/simspark-utilities/cmake/FindSpark.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -27,7 +27,7 @@ SET(SPARK_FIND_QUIETLY TRUE) ENDIF (SPARK_INCLUDE_DIR) -SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Library/simspark") +SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Program Files (x86)/simspark" "C:/library/simspark") FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h PATHS ${SPARK_DIR} Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/ChangeLog 2009-08-21 21:13:24 UTC (rev 90) @@ -1,3 +1,13 @@ +2009-08-21 Marian Buchta <mar...@gm...> + + * cmake/FindBoost.cmake: + * cmake/FindDevIL.cmake: + * cmake/FindFreetype.cmake: + * cmake/FindODE.cmake: + * cmake/FindRuby.cmake: + * cmake/FindZLIB.cmake: + - add search paths when using 32bit libraries in 64bit Windows + 2009-08-13 Hedayat Vatankhah <he...@gr...> * spark/CMakeLists.txt: Modified: trunk/spark/cmake/FindBoost.cmake =================================================================== --- trunk/spark/cmake/FindBoost.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindBoost.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -358,6 +358,7 @@ "$ENV{ProgramFiles}/boost" C:/library/boost "C:/Program Files/boost" + "C:/Program Files (x86)/boost" /sw/local/include ) @@ -619,6 +620,7 @@ "$ENV{ProgramFiles}/boost" C:/library/boost/stage/lib "C:/Program Files/boost/stage/lib" + "C:/Program Files (x86)/boost/stage/lib" C:/boost/lib /sw/local/lib ) Modified: trunk/spark/cmake/FindDevIL.cmake =================================================================== --- trunk/spark/cmake/FindDevIL.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindDevIL.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -33,6 +33,7 @@ /opt/net/gcc33/DevIL C:/library/DevIL "C:/Program Files/DevIL" + "C:/Program Files (x86)/DevIL" C:/DevIL ) Modified: trunk/spark/cmake/FindFreetype.cmake =================================================================== --- trunk/spark/cmake/FindFreetype.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindFreetype.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -41,6 +41,7 @@ /usr/freeware/include C:/library/GnuWin32/include "C:/Program Files/GnuWin32/include" + "C:/Program Files (x86)/GnuWin32/include" C:/GnuWin32/include ) @@ -56,6 +57,7 @@ /usr/freeware/include C:/library/GnuWin32/include/freetype2 "C:/Program Files/GnuWin32/include/freetype2" + "C:/Program Files (x86)/GnuWin32/include/freetype2" C:/GnuWin32/include/freetype2 PATH_SUFFIXES freetype2 ) @@ -73,6 +75,7 @@ /usr/freeware C:/library/GnuWin32/lib "C:/Program Files/GnuWin32/lib" + "C:/Program Files (x86)/GnuWin32/lib" C:/GnuWin32/lib ) Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindODE.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -50,6 +50,7 @@ $ENV{INCLUDE} C:/library/ode/include "C:/Program Files/ode/include" + "C:/Program Files (x86)/ode/include" C:/ode/include ) FIND_LIBRARY(ODE_LIBRARY @@ -61,6 +62,7 @@ $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 C:/library/ode/lib/ "C:/Program Files/ode/lib/" + "C:/Program Files (x86)/ode/lib/" C:/ode/lib/ PATH_SUFFIXES releaselib Modified: trunk/spark/cmake/FindRuby.cmake =================================================================== --- trunk/spark/cmake/FindRuby.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindRuby.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -77,7 +77,11 @@ ${RUBY_HDR_DIR} /usr/lib/ruby/1.8/i586-linux-gnu/ C:/library/ruby/lib/ruby/1.8/i386-mswin32/ + C:/Program Files/ruby/lib/ruby/1.8/i386-mswin32/ + C:/Program Files (x86)/ruby/lib/ruby/1.8/i386-mswin32/ C:/library/ruby/include/ruby-1.9.1/ + C:/Program Files/ruby/include/ruby-1.9.1/ + C:/Program Files (x86)/ruby/include/ruby-1.9.1/ ) # search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix @@ -86,6 +90,8 @@ msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby191 msvcrt-ruby18-static msvcrt-ruby19-static msvcrt-ruby191-static PATHS ${RUBY_POSSIBLE_LIB_DIR} C:/library/ruby/lib/ + C:/Program Files/ruby/lib/ + C:/Program Files (x86)/ruby/lib/ ) set(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_PATH} ${RUBY_ARCH_DIR} "${RUBY_INCLUDE_PATH}/i386-mswin32") Modified: trunk/spark/cmake/FindZLIB.cmake =================================================================== --- trunk/spark/cmake/FindZLIB.cmake 2009-08-13 14:54:41 UTC (rev 89) +++ trunk/spark/cmake/FindZLIB.cmake 2009-08-21 21:13:24 UTC (rev 90) @@ -16,6 +16,7 @@ C:/library/ C:/ "C:/Program Files/" + "C:/Program Files (x86)/" PATH_SUFFIXES zlib123 ) @@ -25,6 +26,7 @@ C:/library/zlib123/ C:/zlib123/ "C:/Program Files/zlib123/" + "C:/Program Files (x86)/zlib123/" PATH_SUFFIXES projects/visualc6/Win32_DLL_Release ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-13 14:55:00
|
Revision: 89 http://simspark.svn.sourceforge.net/simspark/?rev=89&view=rev Author: hedayat Date: 2009-08-13 14:54:41 +0000 (Thu, 13 Aug 2009) Log Message: ----------- Many CMake cleanups Add ODE flags globally Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/cmake/FindODE.cmake trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt trunk/rcssserver3d/rcssagent3d/CMakeLists.txt trunk/rcssserver3d/rcssmonitor3d/CMakeLists.txt trunk/rcssserver3d/simspark/CMakeLists.txt trunk/rsgedit/CMakeLists.txt trunk/rsgedit/ChangeLog trunk/rsgedit/src/CMakeLists.txt trunk/rsgedit/wxutil/CMakeLists.txt trunk/simspark-utilities/CMakeLists.txt trunk/simspark-utilities/ChangeLog trunk/simspark-utilities/gendot/CMakeLists.txt trunk/simspark-utilities/monitorspark/CMakeLists.txt trunk/simspark-utilities/sampleagent/CMakeLists.txt trunk/simspark-utilities/samplesim/CMakeLists.txt trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindFMOD.cmake trunk/spark/lib/CMakeLists.txt trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/plugin/CMakeLists.txt trunk/spark/spark/CMakeLists.txt trunk/spark/test/CMakeLists.txt trunk/spark/utility/CMakeLists.txt Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -26,9 +26,12 @@ set (CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) -add_definitions(-DHAVE_CONFIG_H) -include_directories(${CMAKE_BINARY_DIR} ${Boost_INCLUDE_DIRS}) +add_definitions(-DHAVE_CONFIG_H ${ODE_CFLAGS}) +include_directories(${CMAKE_BINARY_DIR} ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} + ${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} ${ZEITGEIST_INCLUDE_DIR} + ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) + if (UNIX) set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "Common C++ compiler flags" FORCE) @@ -37,10 +40,10 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "C++ compiler flags for Release builds" FORCE) endif (UNIX) + if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) - include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} - ${CMAKE_SOURCE_DIR}/windows/include) + include_directories(${CMAKE_SOURCE_DIR}/windows/include) if(MSVC) add_definitions(/Gm /Zi /GL) endif(MSVC) @@ -58,7 +61,6 @@ ########## generate configuration file ########## if (APPLE) - # TODO: it probably doesn't work on Mac OSX. Please fix it! set(BUNDLE_PATH ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}) elseif (UNIX) set(BUNDLE_PATH ${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}) @@ -85,7 +87,7 @@ install(FILES ${CMAKE_BINARY_DIR}/rcssserver3d_config.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) -if (WIN32) +if (WIN32) # try to find and install third-party .dlls to bin/ directory string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") if (EXISTS ${ODEDLL}) install(PROGRAMS ${ODEDLL} DESTINATION ${BINDIR}) @@ -107,6 +109,7 @@ install(PROGRAMS ${SDL_DLL} DESTINATION ${BINDIR}) endif (EXISTS ${SDL_DLL}) endif (WIN32) + ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) @@ -1,3 +1,20 @@ +2009-08-13 Hedayat Vatankhah <he...@gr...> + + * simspark/CMakeLists.txt: + * rcssmonitor3d/CMakeLists.txt: + * rcssagent3d/CMakeLists.txt: + * plugin/soccermonitor/CMakeLists.txt: + * plugin/soccer/CMakeLists.txt: + - removing duplicate include dirs + + * cmake/FindODE.cmake: + - updated with spark FindODE.cmake module which adds proper compiler flags + for possible ode usage + + * CMakeLists.txt: + - add ode flags and include dir to compiler flags + - add common include directories to compiler flags + 2009-08-09 Hedayat Vatankhah <he...@gr...> * plugin/soccer/CMakeLists.txt: Modified: trunk/rcssserver3d/cmake/FindODE.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindODE.cmake 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/cmake/FindODE.cmake 2009-08-13 14:54:41 UTC (rev 89) @@ -3,10 +3,46 @@ # ODE_INCLUDE_DIR - where the directory containing the ODE headers can be # found # ODE_LIBRARY - full path to the ODE library +# ODE_CFLAGS - additional compiler flags for ODE # ODE_FOUND - TRUE if ODE was found IF (NOT ODE_FOUND) + FIND_PROGRAM(ODE_CONFIG ode-config) + IF(ODE_CONFIG) + # Use the newer EXECUTE_PROCESS command if it is available. + IF(COMMAND EXECUTE_PROCESS) + EXECUTE_PROCESS( + COMMAND ${ODE_CONFIG} --cflags + OUTPUT_VARIABLE ODE_CONFIG_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE ODE_CONFIG_RESULT + ) + ELSE(COMMAND EXECUTE_PROCESS) + EXEC_PROGRAM(${ODE_CONFIG} ARGS "--cflags" + OUTPUT_VARIABLE ODE_CONFIG_CFLAGS + RETURN_VALUE ODE_CONFIG_RESULT + ) + ENDIF(COMMAND EXECUTE_PROCESS) + + # Parse the include flags. + IF("${ODE_CONFIG_RESULT}" MATCHES "^0$") + # Convert the compile flags to a CMake list. + STRING(REGEX REPLACE " +" ";" + ODE_CONFIG_CFLAGS "${ODE_CONFIG_CFLAGS}") + + # Look for -D options. + SET(ODE_EXTRA_CFLAGS) + FOREACH(flag ${ODE_CONFIG_CFLAGS}) + IF("${flag}" MATCHES "^-D") + SET(ODE_EXTRA_CFLAGS ${ODE_EXTRA_CFLAGS} "${flag}") + ENDIF("${flag}" MATCHES "^-D") + ENDFOREACH(flag) + ELSE("${ODE_CONFIG_RESULT}" MATCHES "^0$") + MESSAGE("Error running ${ODE_CONFIG}: [${ODE_CONFIG_RESULT}]") + ENDIF("${ODE_CONFIG_RESULT}" MATCHES "^0$") + ENDIF(ODE_CONFIG) + FIND_PATH(ODE_INCLUDE_DIR ode/ode.h /usr/include /usr/local/include @@ -26,12 +62,27 @@ C:/library/ode/lib/ "C:/Program Files/ode/lib/" C:/ode/lib/ - PATH_SUFFIXES - releaselib - ReleaseDoubleDLL ReleaseDoubleLib - ReleaseSingleDLL ReleaseSingleLib + PATH_SUFFIXES + releaselib + ReleaseDoubleDLL ReleaseDoubleLib + ReleaseSingleDLL ReleaseSingleLib ) + IF (WIN32) + IF("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") + ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdSINGLE") + ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") + ENDIF (WIN32) + + IF (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") + MESSAGE(STATUS "Found additional flags for ODE: ${ODE_CFLAGS}") + ELSE (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS CACHE STRING "Additional ODE flags") + ENDIF (ODE_EXTRA_CFLAGS) + IF(ODE_INCLUDE_DIR) MESSAGE(STATUS "Found ODE include dir: ${ODE_INCLUDE_DIR}") ELSE(ODE_INCLUDE_DIR) Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -119,9 +119,8 @@ hmdp_effector/naospecific.cpp ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SPARK_INCLUDE_DIR} - ${SALT_INCLUDE_DIR} ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} - ${KEROSIN_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${FREETYPE_INCLUDE_DIRS} + ${DevIL_INCLUDE_DIR}) add_library(soccer MODULE ${soccer_LIB_SRCS} ${soccer_LIB_HDRS}) Modified: trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -18,9 +18,8 @@ soccerinputlogplayer_c.cpp ) -include_directories(${CMAKE_SOURCE_DIR}/plugin ${SPARK_INCLUDE_DIR} - ${SALT_INCLUDE_DIR} ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} - ${KEROSIN_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/plugin ${FREETYPE_INCLUDE_DIRS} + ${DevIL_INCLUDE_DIR}) add_library(soccermonitor MODULE ${soccermonitor_LIB_SRCS} ${soccermonitor_LIB_HDRS}) Modified: trunk/rcssserver3d/rcssagent3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssagent3d/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/rcssagent3d/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -13,9 +13,6 @@ naobehavior.cpp ) -include_directories(${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR}) - add_executable(rcssagent3d ${rcssagent3d_SRCS}) if (WIN32) Modified: trunk/rcssserver3d/rcssmonitor3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/rcssmonitor3d/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -8,9 +8,7 @@ set(SDL_LINK_LIBS ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) endif (APPLE) -include_directories(${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR} - ${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}) add_executable(rcssmonitor3d ${rcssmonitor3d_SRCS}) Modified: trunk/rcssserver3d/simspark/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/simspark/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rcssserver3d/simspark/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -10,9 +10,7 @@ set(SDL_LINK_LIBS ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) endif (APPLE) -include_directories( ${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR} - ${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}) target_link_libraries(simspark ${SPARK_LIBRARIES} ${SALT_LIBRARIES} ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES} Modified: trunk/rsgedit/CMakeLists.txt =================================================================== --- trunk/rsgedit/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rsgedit/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -16,7 +16,7 @@ set (CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) -add_definitions(-DHAVE_CONFIG_H) +add_definitions(-DHAVE_CONFIG_H ${wxWidgets_DEFINITIONS}) include_directories(${CMAKE_BINARY_DIR}) if (UNIX) set(CMAKE_CXX_FLAGS "-Wno-deprecated" CACHE Modified: trunk/rsgedit/ChangeLog =================================================================== --- trunk/rsgedit/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rsgedit/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) @@ -0,0 +1,7 @@ +2009-08-13 Hedayat Vatankhah <he...@gr...> + + * src/CMakeLists.txt: + * wxutil/CMakeLists.txt: + * CMakeLists.txt: + - add wxWidgets definitions to toplevel compiler flags and remove from + other files \ No newline at end of file Modified: trunk/rsgedit/src/CMakeLists.txt =================================================================== --- trunk/rsgedit/src/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rsgedit/src/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -38,7 +38,6 @@ sparkglcanvas.cpp ) -add_definitions(${wxWidgets_DEFINITIONS}) include_directories(${CMAKE_SOURCE_DIR}/wxutil/include ${CMAKE_SOURCE_DIR} ${wxWidgets_INCLUDE_DIRS} ${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} Modified: trunk/rsgedit/wxutil/CMakeLists.txt =================================================================== --- trunk/rsgedit/wxutil/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/rsgedit/wxutil/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -132,7 +132,7 @@ src/wxscintilla/src/XPM.cxx ) -add_definitions(${wxWidgets_DEFINITIONS} -D __WX__ -D LINK_LEXERS -D SCI_LEXER) +add_definitions(-D __WX__ -D LINK_LEXERS -D SCI_LEXER) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${wxWidgets_INCLUDE_DIRS}) add_library(wxutil SHARED ${wxutil_LIB_SRCS} ${wxutil_LIB_HDRS}) Modified: trunk/simspark-utilities/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -22,6 +22,11 @@ endif(NOT CMAKE_BUILD_TYPE) add_definitions(-DHAVE_CONFIG_H) +include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${SPARK_INCLUDE_DIR} + ${SALT_INCLUDE_DIR} ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} + ${KEROSIN_INCLUDE_DIR}) +link_directories(${Boost_LIBRARY_DIRS}) + if (UNIX) set(CMAKE_CXX_FLAGS "-Wno-deprecated" CACHE STRING "Common C++ compiler flags" FORCE) @@ -42,8 +47,6 @@ if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) - include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) - link_directories(${Boost_LIBRARY_DIRS}) if(MSVC) add_definitions(/Gm /Zi /GL) endif(MSVC) Modified: trunk/simspark-utilities/ChangeLog =================================================================== --- trunk/simspark-utilities/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) @@ -1,3 +1,14 @@ +2009-08-13 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - add common include directories + + * gendot/CMakeLists.txt: + * monitorspark/CMakeLists.txt: + * sampleagent/CMakeLists.txt: + * samplesim/CMakeLists.txt: + - remove duplicate include directories + 2009-08-07 Marian Buchta <mar...@gm...> * CMakeLists.txt Modified: trunk/simspark-utilities/gendot/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/gendot/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/gendot/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -4,9 +4,6 @@ main.cpp ) -include_directories(${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR}) - add_executable(gendot ${gendot_SRCS}) target_link_libraries(gendot ${SPARK_LIBRARIES} ${SALT_LIBRARIES} Modified: trunk/simspark-utilities/monitorspark/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/monitorspark/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/monitorspark/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -3,9 +3,6 @@ main.cpp ) -include_directories(${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR}) - add_executable(monitorspark ${monitorspark_SRCS}) target_link_libraries(monitorspark ${SPARK_LIBRARIES} ${SALT_LIBRARIES} Modified: trunk/simspark-utilities/sampleagent/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/sampleagent/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/sampleagent/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -9,7 +9,6 @@ leggedspherebehavior.cpp ) -include_directories(${SPARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR}) add_executable(sampleagent ${sampleagent_SRCS}) target_link_libraries(sampleagent ${SPARK_LIBRARIES} ${SALT_LIBRARIES} Modified: trunk/simspark-utilities/samplesim/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/samplesim/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/simspark-utilities/samplesim/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -4,9 +4,6 @@ main.cpp ) -include_directories(${SPARK_INCLUDE_DIR} ${SALT_INCLUDE_DIR} - ${ZEITGEIST_INCLUDE_DIR} ${OXYGEN_INCLUDE_DIR} ${KEROSIN_INCLUDE_DIR}) - add_executable(samplesim ${samplesim_SRCS}) target_link_libraries(samplesim ${SPARK_LIBRARIES} ${SALT_LIBRARIES} Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -28,10 +28,10 @@ if (NOT USE_COREFOUNDATION STREQUAL "OFF") if (HAVE_COREFOUNDATION_COREFOUNDATION_H) set(USE_COREFOUNDATION ON) - message("USE_COREFOUNDATION ON") + message(STATUS " USE_COREFOUNDATION ON") else (HAVE_COREFOUNDATION_COREFOUNDATION_H) set(USE_COREFOUNDATION OFF) - message("USE_COREFOUNDATION OFF") + message(STATUS " USE_COREFOUNDATION OFF") endif (HAVE_COREFOUNDATION_COREFOUNDATION_H) endif (NOT USE_COREFOUNDATION STREQUAL "OFF") @@ -94,8 +94,8 @@ set (CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) -add_definitions(-DHAVE_CONFIG_H) -include_directories(${CMAKE_BINARY_DIR}) +add_definitions(-DHAVE_CONFIG_H ${ODE_CFLAGS}) +include_directories(${CMAKE_BINARY_DIR} ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) if (UNIX) @@ -123,14 +123,23 @@ if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) - include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} - ${CMAKE_SOURCE_DIR}/windows/include) + include_directories(${CMAKE_SOURCE_DIR}/windows/include) if(MSVC) add_definitions(/Gm /Zi /GL) endif(MSVC) endif(WIN32) ########## library version numbers ########## +# Version numbers: .so version, major version, and minor version +# example: libspark.so.SO_VERSION.MAJOR_VERSION.MINOR_VERSION +# Each of these version numbers should be increased on different situations: +# 1. So version: when the library breaks compatibility like removing an interface +# or changing data types. Reste major & minor versions to 0. +# 2. Major version: when library provides new features (e.g. new interface) but +# doesn't break compatibility. Reset minor version to 0 when incremented. +# 3. Minor version: library changed but without any new interfaces or breaking +# compatibility + set(SALT_SO_VERSION 0) set(SALT_VERSION ${SALT_SO_VERSION}.3.2) set(ZEITGEIST_SO_VERSION 3) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/ChangeLog 2009-08-13 14:54:41 UTC (rev 89) @@ -1,7 +1,23 @@ +2009-08-13 Hedayat Vatankhah <he...@gr...> + + * spark/CMakeLists.txt: + * test/CMakeLists.txt: + * utility/CMakeLists.txt: + * lib/oxygen/CMakeLists.txt: + - remove duplicate compiler flags + + * CMakeLists.txt: + - always add boost and ode include directories, not just in windows + - added a small guideline about changing library version numbers + - add ode compiler flags instead of providing it only for oxygen + + * cmake/FindFMOD.cmake: + - do not check for 2.6 version here, it's done before + 2009-08-11 Hedayat Vatankhah <he...@gr...> * cmake/FindODE.cmake: - - do not check for ODe library name under Linux + - do not check for ODE library name under Linux 2009-08-09 Hedayat Vatankhah <he...@gr...> Modified: trunk/spark/cmake/FindFMOD.cmake =================================================================== --- trunk/spark/cmake/FindFMOD.cmake 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/cmake/FindFMOD.cmake 2009-08-13 14:54:41 UTC (rev 89) @@ -47,7 +47,6 @@ FIND_LIBRARY(FMOD_LIBRARIES debug fmodexp optimized fmodex PATHS ${FMOD_LIBRARY_SEARCH_DIRS}) ELSE (WIN32) #Unix - CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) FIND_PACKAGE(PkgConfig) IF(PKG_CONFIG_FOUND) # TODO i don't know how this would be registered in pkg-config Modified: trunk/spark/lib/CMakeLists.txt =================================================================== --- trunk/spark/lib/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/lib/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -1,5 +1,4 @@ -include_directories(${CMAKE_SOURCE_DIR}/utility ${Boost_INCLUDE_DIRS} - ${ODE_INCLUDE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/utility) if (USE_COREFOUNDATION) add_definitions(-DUSE_COREFOUNDATION) Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -218,8 +218,7 @@ ) endif(SPADES_FOUND) -add_definitions(${ODE_CFLAGS}) -include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility/) +include_directories(${CMAKE_SOURCE_DIR}/lib) add_library(oxygen ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS}) Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/plugin/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -1,5 +1,5 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility - ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) + ${OPENGL_INCLUDE_DIR}) # It is problematic under Linux! Will cause segfaults on simspark exit. if (WIN32 OR APPLE) Modified: trunk/spark/spark/CMakeLists.txt =================================================================== --- trunk/spark/spark/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/spark/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -6,7 +6,7 @@ ) include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${FREETYPE_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${DevIL_INCLUDE_DIR}) + ${DevIL_INCLUDE_DIR}) add_library(spark ${spark_LIB_SRCS}) Modified: trunk/spark/test/CMakeLists.txt =================================================================== --- trunk/spark/test/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/test/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -1,8 +1,5 @@ -include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility - ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility) -link_directories(${Boost_LIBRARY_DIRS}) - add_subdirectory(coretest) add_subdirectory(fonttest) add_subdirectory(inputtest) Modified: trunk/spark/utility/CMakeLists.txt =================================================================== --- trunk/spark/utility/CMakeLists.txt 2009-08-11 16:17:37 UTC (rev 88) +++ trunk/spark/utility/CMakeLists.txt 2009-08-13 14:54:41 UTC (rev 89) @@ -1,4 +1,4 @@ -include_directories(${CMAKE_SOURCE_DIR}/lib ${Boost_INCLUDE_DIRS}) +include_directories(${CMAKE_SOURCE_DIR}/lib) add_subdirectory(libobj) add_subdirectory(rcssnet) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-11 16:18:12
|
Revision: 88 http://simspark.svn.sourceforge.net/simspark/?rev=88&view=rev Author: hedayat Date: 2009-08-11 16:17:37 +0000 (Tue, 11 Aug 2009) Log Message: ----------- Do not check for ode library name (for detecting correct ode compilation flags) in Linux and Mac Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-08-09 17:02:16 UTC (rev 87) +++ trunk/spark/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) @@ -1,3 +1,8 @@ +2009-08-11 Hedayat Vatankhah <he...@gr...> + + * cmake/FindODE.cmake: + - do not check for ODe library name under Linux + 2009-08-09 Hedayat Vatankhah <he...@gr...> * windows/install_extra.nsi: Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-08-09 17:02:16 UTC (rev 87) +++ trunk/spark/cmake/FindODE.cmake 2009-08-11 16:17:37 UTC (rev 88) @@ -68,11 +68,13 @@ ReleaseSingleDLL ReleaseSingleLib ) - IF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") - SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") - ELSE(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") - SET(ODE_EXTRA_CFLAGS "-DdSINGLE") - ENDIF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") + IF (WIN32) + IF("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") + ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdSINGLE") + ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") + ENDIF (WIN32) IF (ODE_EXTRA_CFLAGS) SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-09 17:02:23
|
Revision: 87 http://simspark.svn.sourceforge.net/simspark/?rev=87&view=rev Author: hedayat Date: 2009-08-09 17:02:16 +0000 (Sun, 09 Aug 2009) Log Message: ----------- Releasing simspark 0.1.2 Added Paths: ----------- tags/SIMSPARK_0.1.2_RELEASE/spark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-09 17:00:19
|
Revision: 86 http://simspark.svn.sourceforge.net/simspark/?rev=86&view=rev Author: hedayat Date: 2009-08-09 17:00:09 +0000 (Sun, 09 Aug 2009) Log Message: ----------- Releasing simspark 0.1.2 Added Paths: ----------- tags/SIMSPARK_0.1.2_RELEASE/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-08 22:50:49
|
Revision: 85 http://simspark.svn.sourceforge.net/simspark/?rev=85&view=rev Author: hedayat Date: 2009-08-08 22:50:21 +0000 (Sat, 08 Aug 2009) Log Message: ----------- - incrementing soccer.so minor version (because of HMDP) - compilation fix: add missing return command to some functions - use external files for extra NSIS install/uninstall commands - add simspark and rcssmonitor3d start menu shortcuts - bump simspark version to 0.1.2, preparing for a new release - bump release version for modified libraries Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp trunk/spark/CMakeLists.txt trunk/spark/ChangeLog Added Paths: ----------- trunk/rcssserver3d/windows/install_extra.nsi trunk/rcssserver3d/windows/uninstall_extra.nsi trunk/spark/windows/install_extra.nsi trunk/spark/windows/uninstall_extra.nsi Removed Paths: ------------- trunk/rcssserver3d/windows/simspark.iss Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/CMakeLists.txt 2009-08-08 22:50:21 UTC (rev 85) @@ -129,18 +129,14 @@ set(CPACK_PACKAGE_VENDOR "RoboCup Soccer Server 3D Maintenance Group") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RoboCup Soccer Simulation Server 3D") +#set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/data/logos/simsparklogo.png") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") -set(CREATE_SIMSPARK_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\simspark.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe %1 %2 %3 %4'\nFileClose \$0") -set(CREATE_MONITOR_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssmonitor3d.exe %1 %2 %3 %4'\nFileClose \$0") -set(CREATE_AGENT_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssagent3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssagent3d.exe %1 %2 %3 %4'\nFileClose \$0") -set(CREATE_BATCH_FILES "${CREATE_SIMSPARK_BAT}\n${CREATE_MONITOR_BAT}\n${CREATE_AGENT_BAT}") -set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR' '\$INSTDIR'\n${CREATE_BATCH_FILES}") -set(DELETE_BATCH_FILES "Delete '\$INSTDIR\\\\bin\\\\simspark.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssagent3d.cmd'") -set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${DELETE_BATCH_FILES}\nDeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR'") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\install_extra.nsi") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\uninstall_extra.nsi") include(CPack) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/ChangeLog 2009-08-08 22:50:21 UTC (rev 85) @@ -1,3 +1,19 @@ +2009-08-09 Hedayat Vatankhah <he...@gr...> + + * plugin/soccer/CMakeLists.txt: + - incrementing soccer.so minor version + + * plugin/soccer/hmdp_effector/hmdp_c/base.c: + * plugin/soccer/hmdp_effector/hmdpwrapper.cpp: + - compilation fix: add missing return command to some functions + + * windows/install_extra.nsi: + * windows/uninstall_extra.nsi: + - extra install/uninstall commands for NSIS installer + + * CMakeLists.txt: + - use external files for extra NSIS install/uninstall commands + 2009-07-31 Hedayat Vatankhah <he...@gr...> * plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h: Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-08-08 22:50:21 UTC (rev 85) @@ -128,7 +128,7 @@ target_link_libraries(soccer ${spark_libs} ${OPENGL_gl_LIBRARY}) if (NOT APPLE) - set_target_properties(soccer PROPERTIES VERSION 1.0.0 SOVERSION 1) + set_target_properties(soccer PROPERTIES VERSION 1.1.0 SOVERSION 1) endif (NOT APPLE) install(TARGETS soccer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c 2009-08-08 22:50:21 UTC (rev 85) @@ -630,7 +630,6 @@ main_eval(base_data->buff); // see base.c clearBuffer(); }; - + return 0; } -; Modified: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp 2009-08-08 22:50:21 UTC (rev 85) @@ -32,7 +32,7 @@ hmdpEffectorHandle->sendMessage(messageToSend); //! after a carriage return or line feed is emmitted from the motor controller messageToSend = ""; } - + return 0; } //! reads the current servo positions (needed by the motorcontroller) @@ -119,7 +119,7 @@ int sendBytetoMo(int data) { - + return 0; } //!currently max 7 character (+\0) per servo for the name Added: trunk/rcssserver3d/windows/install_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/install_extra.nsi (rev 0) +++ trunk/rcssserver3d/windows/install_extra.nsi 2009-08-08 22:50:21 UTC (rev 85) @@ -0,0 +1,24 @@ +CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Simspark.lnk" "$INSTDIR\bin\simspark.cmd" +CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\RCSSMonitor3D.lnk" "$INSTDIR\bin\rcssmonitor3d.cmd" +!insertmacro MUI_STARTMENU_WRITE_END +!define MUI_STARTMENUPAGE_CURRENT_ID "SOMETHING_NOT_AVAILABLE" + +WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' '$INSTDIR' +ClearErrors +FileOpen $0 $INSTDIR\bin\simspark.cmd w +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' +FileWrite $0 'simspark.exe %1 %2 %3 %4' +FileClose $0 +ClearErrors +FileOpen $0 $INSTDIR\bin\rcssmonitor3d.cmd w +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' +FileWrite $0 'rcssmonitor3d.exe %1 %2 %3 %4' +FileClose $0 +ClearErrors +FileOpen $0 $INSTDIR\bin\rcssagent3d.cmd w +FileWrite $0 'PATH=%PATH%;%SPARK_DIR%\lib\simspark;%RCSSSERVER3D_DIR%\lib\rcssserver3d$\n' +FileWrite $0 'cd "%RCSSSERVER3D_DIR%\bin\"$\n' +FileWrite $0 'rcssagent3d.exe %1 %2 %3 %4' +FileClose $0 Deleted: trunk/rcssserver3d/windows/simspark.iss =================================================================== --- trunk/rcssserver3d/windows/simspark.iss 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/rcssserver3d/windows/simspark.iss 2009-08-08 22:50:21 UTC (rev 85) @@ -1,79 +0,0 @@ -; -; This is an Inno Setup Script for SimSpark. Use the Inno Compiler -; available at http://www.jrsoftware.org/isinfo.php to create a -; setup.exe for Windows. This script uses the Inno preprocessor addon -; that has to be installed additionally -; - -#define MyAppName "SimSpark" -#define MyAppVerName "SimSpark" -#define MyAppPublisher "RoboCup Soccer Server 3D Maintenance Group" -#define MyAppURL "http://sourceforge.net/projects/simspark" -#define MyAppExeName "rsgedit.exe" -#define MyVcReleaseDir "..\vcrelease" -#define MyRsgEditDir "..\..\contrib\rsgedit" -#define MyZeitgeistDir "..\zeitgeist" -#define MyOxygenDir "..\oxygen" -#define MyKerosinDir "..\kerosin" -#define MySparkDir "..\spark" -#define MyRsgDir "..\..\simulations\parts\rsg" - -[Setup] -AppName={#MyAppName} -AppVerName={#MyAppVerName} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DefaultDirName={pf}\simspark -DefaultGroupName={#MyAppName} -DisableProgramGroupPage=yes -LicenseFile=..\COPYING -OutputBaseFilename=setup -Compression=lzma -SolidCompression=yes - -[Languages] -Name: english; MessagesFile: compiler:Default.isl - -[Tasks] -Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked -Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked - -[Files] -; applications -Source: {#MyVcReleaseDir}\rsgedit.exe; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\agentspark.exe; DestDir: {app}; Flags: ignoreversion - -; plugins -Source: {#MyVcReleaseDir}\inputwx.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\rubysceneimporter.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\sexpparser.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\filesystemstd.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\soccer.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\sparkagent.dll; DestDir: {app}; Flags: ignoreversion -Source: {#MyVcReleaseDir}\sceneeffector.dll; DestDir: {app}; Flags: ignoreversion - -; ruby scripts -Source: {#MyZeitgeistDir}\zeitgeist.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MyOxygenDir}\oxygen.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MyKerosinDir}\kerosin.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MySparkDir}\spark.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MyRsgEditDir}\bindings.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MyRsgEditDir}\german.scan.rb; DestDir: {app}; Flags: ignoreversion -Source: {#MyRsgEditDir}\rsgedit.rb; DestDir: {app}; Flags: ignoreversion - -; rsg files -Source: {#MyRsgDir}\*.rsg; DestDir: {app}\rsg; Flags: recursesubdirs -Source: {#MyRsgDir}\*.rb; DestDir: {app}\rsg; Flags: recursesubdirs - -; support dlls -Source: C:\ode\lib\releasedll\ode.dll; DestDir: {app}; Flags: ignoreversion -Source: C:\ruby\bin\msvcrt-ruby18.dll; DestDir: {app}; Flags: ignoreversion - -[Icons] -Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; WorkingDir: {app} -Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL} -Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} -Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; WorkingDir: {app}; Tasks: desktopicon -Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filename: {app}\{#MyAppExeName}; WorkingDir: {app}; Tasks: quicklaunchicon Added: trunk/rcssserver3d/windows/uninstall_extra.nsi =================================================================== --- trunk/rcssserver3d/windows/uninstall_extra.nsi (rev 0) +++ trunk/rcssserver3d/windows/uninstall_extra.nsi 2009-08-08 22:50:21 UTC (rev 85) @@ -0,0 +1,10 @@ +Delete '$INSTDIR\bin\simspark.cmd' +Delete '$INSTDIR\bin\rcssmonitor3d.cmd' +Delete '$INSTDIR\bin\rcssagent3d.cmd' +DeleteRegValue HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'RCSSSERVER3D_DIR' + +Var /GLOBAL STARTMENU_DIR_FORLINKS +!insertmacro MUI_STARTMENU_GETFOLDER Application $STARTMENU_DIR_FORLINKS + +Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\Simspark.lnk" +Delete "$SMPROGRAMS\$STARTMENU_DIR_FORLINKS\RCSSMonitor3D.lnk" Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/spark/CMakeLists.txt 2009-08-08 22:50:21 UTC (rev 85) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) -set(PACKAGE_VERSION "0.1.1") +set(PACKAGE_VERSION "0.1.2") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -132,13 +132,13 @@ ########## library version numbers ########## set(SALT_SO_VERSION 0) -set(SALT_VERSION ${SALT_SO_VERSION}.3.1) +set(SALT_VERSION ${SALT_SO_VERSION}.3.2) set(ZEITGEIST_SO_VERSION 3) -set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.0.1) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.0.2) set(OXYGEN_SO_VERSION 3) -set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.2.3) +set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.2.4) set(KEROSIN_SO_VERSION 1) -set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.1) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.2) set(SPARK_SO_VERSION 0) set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) set(RCSSNET_SO_VERSION 0) @@ -208,12 +208,9 @@ set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") -#set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "Push \$INSTDIR\\\\lib\\\\${CMAKE_PROJECT_NAME}\nCall AddToPath") -#set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Push \$INSTDIR\\\\lib\\\\${CMAKE_PROJECT_NAME}\nCall un.RemoveFromPath") -set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'SPARK_DIR' '\$INSTDIR'") -set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "DeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'SPARK_DIR'") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\install_extra.nsi") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " !include ${CMAKE_SOURCE_DIR}\\\\windows\\\\uninstall_extra.nsi") - include(CPack) #original Makefile.am contents follow: @@ -229,5 +226,3 @@ #include $(top_srcdir)/config.aux/sf.am # #include $(top_srcdir)/config.aux/cvs.am - - Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-08-08 09:27:18 UTC (rev 84) +++ trunk/spark/ChangeLog 2009-08-08 22:50:21 UTC (rev 85) @@ -1,3 +1,14 @@ +2009-08-09 Hedayat Vatankhah <he...@gr...> + + * windows/install_extra.nsi: + * windows/uninstall_extra.nsi: + - add extra NSIS commands in these files + + * CMakeLists.txt: + - bump package version to 0.1.2, preparing for a new release + - using external files for NSIS installer extra commands + - bump release number for modified libraries + 2009-07-31 Hedayat Vatankhah <he...@gr...> * lib/oxygen/simulationserver/agentcontrol.cpp: Added: trunk/spark/windows/install_extra.nsi =================================================================== --- trunk/spark/windows/install_extra.nsi (rev 0) +++ trunk/spark/windows/install_extra.nsi 2009-08-08 22:50:21 UTC (rev 85) @@ -0,0 +1,4 @@ +!insertmacro MUI_STARTMENU_WRITE_END +!define MUI_STARTMENUPAGE_CURRENT_ID "SOMETHING_NOT_AVAILABLE" + +WriteRegExpandStr HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'SPARK_DIR' '$INSTDIR' Added: trunk/spark/windows/uninstall_extra.nsi =================================================================== --- trunk/spark/windows/uninstall_extra.nsi (rev 0) +++ trunk/spark/windows/uninstall_extra.nsi 2009-08-08 22:50:21 UTC (rev 85) @@ -0,0 +1 @@ +DeleteRegValue HKLM 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' 'SPARK_DIR' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-08 09:27:36
|
Revision: 84 http://simspark.svn.sourceforge.net/simspark/?rev=84&view=rev Author: hedayat Date: 2009-08-08 09:27:18 +0000 (Sat, 08 Aug 2009) Log Message: ----------- Updating release notes for 0.1.2 version Modified Paths: -------------- trunk/spark/NEWS trunk/spark/RELEASE Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2009-08-07 12:27:42 UTC (rev 83) +++ trunk/spark/NEWS 2009-08-08 09:27:18 UTC (rev 84) @@ -1,3 +1,15 @@ +[0.1.2] +This release brings some bugfixes, better performance and also better Windows +support. A Windows installer will be available too. This is the first version +which runs in multi-threaded mode by default. The multi-threaded mode is still +in early stages, and it can be improved cosiderably in future. + +Main changes of this release are: + - improved Windows support, including Windows Installer. + - Multi-threaded mode now works, and is the default mode when running simspark + - Performance improvements + - Fixed a bug in networking code, which were introduced in 0.1.1 + [0.1.1] This release is mainly a bug-fix release, and is the last release before RoboCup 2009 competitions. It is not much different from version 0.1. Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2009-08-07 12:27:42 UTC (rev 83) +++ trunk/spark/RELEASE 2009-08-08 09:27:18 UTC (rev 84) @@ -1,11 +1,15 @@ -RELEASE News of simspark-0.1.1 +RELEASE News of simspark-0.1.2 -This release is mainly a bugfix release, and is the last release before -RoboCup 2009 competitions. -Main changes are: - - improved MacOSX and Windows support - - compilation fixes for latest library versions - - more reliable and a bit more fair network communication with the agents +This release brings some bugfixes, better performance and also better Windows +support. A Windows installer will be available too. This is the first version +which runs in multi-threaded mode by default. The multi-threaded mode is still +in early stages, and it can be improved cosiderably in future. +Main changes of this release are: + - improved Windows support, including Windows Installer. + - Multi-threaded mode now works, and is the default mode when running simspark + - Performance improvements + - Fixed a bug in networking code, which were introduced in 0.1.1 + You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-08-07 12:27:52
|
Revision: 83 http://simspark.svn.sourceforge.net/simspark/?rev=83&view=rev Author: marianbuchta Date: 2009-08-07 12:27:42 +0000 (Fri, 07 Aug 2009) Log Message: ----------- Try to find and copy all thirdparty dlls in the simspark-utilities bin/ directory Update script from rcssserver3d\cmake\FindSpark.cmake Add RCSSNET3D_LIBRARIES and NET_LIBS - fixed linking error in VS2008 Modified Paths: -------------- trunk/simspark-utilities/CMakeLists.txt trunk/simspark-utilities/ChangeLog trunk/simspark-utilities/cmake/FindSpark.cmake trunk/simspark-utilities/sampleagent/CMakeLists.txt Modified: trunk/simspark-utilities/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/CMakeLists.txt 2009-07-31 20:40:14 UTC (rev 82) +++ trunk/simspark-utilities/CMakeLists.txt 2009-08-07 12:27:42 UTC (rev 83) @@ -4,10 +4,18 @@ set(PACKAGE_VERSION "0.1") ########## check for headerfiles/libraries ########## -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ ${CMAKE_SOURCE_DIR}/../spark/cmake/) find_package(Spark REQUIRED) find_package(Boost REQUIRED) +find_package(ODE REQUIRED) +find_package(Freetype REQUIRED) +find_package(SDL REQUIRED) +find_package(DevIL REQUIRED) + +if (WIN32) + set(NET_LIBS WS2_32.lib) +endif (WIN32) ########## add extra flags ########## if(NOT CMAKE_BUILD_TYPE) set (CMAKE_BUILD_TYPE Release) @@ -32,6 +40,14 @@ mark_as_advanced(BINDIR LIBDIR DATADIR INCLUDEDIR) +if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) + include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) + link_directories(${Boost_LIBRARY_DIRS}) + if(MSVC) + add_definitions(/Gm /Zi /GL) + endif(MSVC) +endif(WIN32) ########## add subdirectories ############ add_subdirectory(data) add_subdirectory(gendot) @@ -44,6 +60,28 @@ install(FILES AUTHORS ChangeLog COPYING README DESTINATION ${DATADIR}/doc/${CMAKE_PROJECT_NAME}) +if (WIN32) + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") + if (EXISTS ${ODEDLL}) + install(PROGRAMS ${ODEDLL} DESTINATION ${BINDIR}) + endif (EXISTS ${ODEDLL}) + + install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${DevIL_LIBRARY_IL}") + if (EXISTS ${DevIL_DLL}) + install(PROGRAMS ${DevIL_DLL} DESTINATION ${BINDIR}) + endif (EXISTS ${DevIL_DLL}) + + install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") + + set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") + if (EXISTS ${SDL_DLL}) + install(PROGRAMS ${SDL_DLL} DESTINATION ${BINDIR}) + endif (EXISTS ${SDL_DLL}) +endif (WIN32) ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" @@ -55,7 +93,9 @@ ########### CPack section ############# set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES /CVS/ /[.]svn/ /.*[.]o$ /.*[.]o/ /[.].*) +set(CPACK_SOURCE_IGNORE_FILES + /CVS/ /[.]svn/ /.*[.]o$ /.*[.]o/ /autom4te[.]cache/ /[.].* /bootstrap + /RELEASE /rpm.am /msi.am) set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) Modified: trunk/simspark-utilities/ChangeLog =================================================================== --- trunk/simspark-utilities/ChangeLog 2009-07-31 20:40:14 UTC (rev 82) +++ trunk/simspark-utilities/ChangeLog 2009-08-07 12:27:42 UTC (rev 83) @@ -0,0 +1,10 @@ +2009-08-07 Marian Buchta <mar...@gm...> + + * CMakeLists.txt + - try to find and copy all thirdparty dlls in the binary package's bin/ directory. + + * cmake/FindSpark.cmake + - Update script from rcssserver3d\cmake\FindSpark.cmake + + * sampleagent/CMakeLists.txt + - add RCSSNET3D_LIBRARIES and NET_LIBS - fixed linking error in VS2008 \ No newline at end of file Modified: trunk/simspark-utilities/cmake/FindSpark.cmake =================================================================== --- trunk/simspark-utilities/cmake/FindSpark.cmake 2009-07-31 20:40:14 UTC (rev 82) +++ trunk/simspark-utilities/cmake/FindSpark.cmake 2009-08-07 12:27:42 UTC (rev 83) @@ -17,6 +17,9 @@ # KEROSIN_INCLUDE_DIR - where to find kerosin include files # KEROSIN_LIBRARIES - List of libraries when using kerosin. # KEROSIN_FOUND - True if kerosin found. +# RCSSNET3D_INCLUDE_DIR - where to find kerosin include files +# RCSSNET3D_LIBRARIES - List of libraries when using kerosin. +# RCSSNET3D_FOUND - True if kerosin found. # Spark section IF (SPARK_INCLUDE_DIR) @@ -24,10 +27,16 @@ SET(SPARK_FIND_QUIETLY TRUE) ENDIF (SPARK_INCLUDE_DIR) -FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h PATH_SUFFIXES simspark) +SET(SPARK_DIR $ENV{SPARK_DIR} "C:/Program Files/simspark" "C:/Library/simspark") +FIND_PATH(SPARK_INCLUDE_DIR spark/spark.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) + SET(SPARK_NAMES spark spark_debug) -FIND_LIBRARY(SPARK_LIBRARY NAMES ${SPARK_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(SPARK_LIBRARY NAMES ${SPARK_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) GET_FILENAME_COMPONENT(SPARK_LIB_DIR ${SPARK_LIBRARY} PATH) # handle the QUIETLY and REQUIRED arguments and set SPARK_FOUND to TRUE if @@ -50,10 +59,14 @@ SET(SALT_FIND_QUIETLY TRUE) ENDIF (SALT_INCLUDE_DIR) -FIND_PATH(SALT_INCLUDE_DIR salt/salt.h PATH_SUFFIXES simspark) +FIND_PATH(SALT_INCLUDE_DIR salt/salt.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(SALT_NAMES salt salt_debug) -FIND_LIBRARY(SALT_LIBRARY NAMES ${SALT_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(SALT_LIBRARY NAMES ${SALT_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set SALT_FOUND to TRUE if # all listed variables are TRUE @@ -75,10 +88,14 @@ SET(ZEITGEIST_FIND_QUIETLY TRUE) ENDIF (ZEITGEIST_INCLUDE_DIR) -FIND_PATH(ZEITGEIST_INCLUDE_DIR zeitgeist/zeitgeist.h PATH_SUFFIXES simspark) +FIND_PATH(ZEITGEIST_INCLUDE_DIR zeitgeist/zeitgeist.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(ZEITGEIST_NAMES zeitgeist zeitgeist_debug) -FIND_LIBRARY(ZEITGEIST_LIBRARY NAMES ${ZEITGEIST_NAMES} PATH_SUFFIXES simspark) +FIND_LIBRARY(ZEITGEIST_LIBRARY NAMES ${ZEITGEIST_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set ZEITGEIST_FOUND to TRUE if # all listed variables are TRUE @@ -100,10 +117,14 @@ SET(OXYGEN_FIND_QUIETLY TRUE) ENDIF (OXYGEN_INCLUDE_DIR) -FIND_PATH(OXYGEN_INCLUDE_DIR oxygen/oxygen.h PATH_SUFFIXES simspark) +FIND_PATH(OXYGEN_INCLUDE_DIR oxygen/oxygen.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(OXYGEN_NAMES oxygen oxygen_debug) -FIND_LIBRARY(OXYGEN_LIBRARY NAMES ${OXYGEN_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(OXYGEN_LIBRARY NAMES ${OXYGEN_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set OXYGEN_FOUND to TRUE if # all listed variables are TRUE @@ -125,10 +146,14 @@ SET(KEROSIN_FIND_QUIETLY TRUE) ENDIF (KEROSIN_INCLUDE_DIR) -FIND_PATH(KEROSIN_INCLUDE_DIR kerosin/kerosin.h PATH_SUFFIXES simspark) +FIND_PATH(KEROSIN_INCLUDE_DIR kerosin/kerosin.h + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) SET(KEROSIN_NAMES kerosin kerosin_debug) -FIND_LIBRARY(KEROSIN_LIBRARY NAMES ${KEROSIN_NAMES} PATH_SUFFIXES simspark ) +FIND_LIBRARY(KEROSIN_LIBRARY NAMES ${KEROSIN_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) # handle the QUIETLY and REQUIRED arguments and set KEROSIN_FOUND to TRUE if # all listed variables are TRUE @@ -143,3 +168,32 @@ ENDIF(KEROSIN_FOUND) MARK_AS_ADVANCED( KEROSIN_LIBRARY KEROSIN_INCLUDE_DIR ) + +# rcssnet3D +IF (RCSSNET3D_INCLUDE_DIR) + # Already in cache, be silent + SET(RCSSNET3D_FIND_QUIETLY TRUE) +ENDIF (RCSSNET3D_INCLUDE_DIR) + +FIND_PATH(RCSSNET3D_INCLUDE_DIR rcssnet/addr.hpp + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark include/simspark) + +SET(RCSSNET3D_NAMES rcssnet3D rcssnet3D_debug) +FIND_LIBRARY(RCSSNET3D_LIBRARY NAMES ${RCSSNET3D_NAMES} + PATHS ${SPARK_DIR} + PATH_SUFFIXES simspark lib/simspark) + +# handle the QUIETLY and REQUIRED arguments and set RCSSNET3D_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(RCSSNET3D DEFAULT_MSG RCSSNET3D_LIBRARY + RCSSNET3D_INCLUDE_DIR) + +IF(RCSSNET3D_FOUND) + SET( RCSSNET3D_LIBRARIES ${RCSSNET3D_LIBRARY} ) +ELSE(RCSSNET3D_FOUND) + SET( RCSSNET3D_LIBRARIES ) +ENDIF(RCSSNET3D_FOUND) + +MARK_AS_ADVANCED( RCSSNET3D_LIBRARY RCSSNET3D_INCLUDE_DIR ) Modified: trunk/simspark-utilities/sampleagent/CMakeLists.txt =================================================================== --- trunk/simspark-utilities/sampleagent/CMakeLists.txt 2009-07-31 20:40:14 UTC (rev 82) +++ trunk/simspark-utilities/sampleagent/CMakeLists.txt 2009-08-07 12:27:42 UTC (rev 83) @@ -13,7 +13,7 @@ add_executable(sampleagent ${sampleagent_SRCS}) target_link_libraries(sampleagent ${SPARK_LIBRARIES} ${SALT_LIBRARIES} - ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES}) + ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES} ${RCSSNET3D_LIBRARIES} ${NET_LIBS}) set_target_properties(sampleagent PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-31 20:40:34
|
Revision: 82 http://simspark.svn.sourceforge.net/simspark/?rev=82&view=rev Author: hedayat Date: 2009-07-31 20:40:14 +0000 (Fri, 31 Jul 2009) Log Message: ----------- Added the HMDP plugin (By: N. Michael Mayer and Joschka) Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccer/export.cpp Added Paths: ----------- trunk/rcssserver3d/plugin/soccer/hmdp_effector/ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpaction.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpeffector_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor.h trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdpwrapper.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.cpp trunk/rcssserver3d/plugin/soccer/hmdp_effector/naospecific.h Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-07-31 20:27:41 UTC (rev 81) +++ trunk/rcssserver3d/ChangeLog 2009-07-31 20:40:14 UTC (rev 82) @@ -1,3 +1,29 @@ +2009-07-31 Hedayat Vatankhah <he...@gr...> + + * plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.h: + * plugin/soccer/hmdp_effector/hmdp_c/sine_fixed.c: + * plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h: + * plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c: + * plugin/soccer/hmdp_effector/hmdp_c/compatible.h: + * plugin/soccer/hmdp_effector/hmdp_c/base.h: + * plugin/soccer/hmdp_effector/hmdp_c/base.c: + * plugin/soccer/hmdp_effector/naospecific.h: + * plugin/soccer/hmdp_effector/naospecific.cpp: + * plugin/soccer/hmdp_effector/hmdpwrapper.cpp: + * plugin/soccer/hmdp_effector/hmdpperceptor.h: + * plugin/soccer/hmdp_effector/hmdpperceptor.cpp: + * plugin/soccer/hmdp_effector/hmdpperceptor_c.cpp: + * plugin/soccer/hmdp_effector/hmdpeffector.h: + * plugin/soccer/hmdp_effector/hmdpeffector.cpp: + * plugin/soccer/hmdp_effector/hmdpeffector_c.cpp: + * plugin/soccer/hmdp_effector/hmdpaction.h: + * plugin/soccer/CMakeLists.txt: + * plugin/soccer/export.cpp: + * data/rsg/agent/nao/nao.rsg: + - added HMDP effector/perceptor. Thanks to N. Michael Mayer and Joschka. + - some code cleanup and formatting + - replacing the use of the obsolete function boost::make_shared() + 2009-07-30 Hedayat Vatankhah <he...@gr...> * plugin/CMakeLists.txt: Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-07-31 20:27:41 UTC (rev 81) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-07-31 20:40:14 UTC (rev 82) @@ -37,14 +37,14 @@ (switch $loadObj (true - (nd Transform - (setLocalRotation -90 0 180) - (nd StaticMesh - (load 'models/naobody.obj') - (setScale $TorsoLength $TorsoLength $TorsoLength) - ) - ) + (nd Transform + (setLocalRotation -90 0 180) + (nd StaticMesh + (load 'models/naobody.obj') + (setScale $TorsoLength $TorsoLength $TorsoLength) + ) ) + ) (false (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey) @@ -59,10 +59,10 @@ (importScene rsg/agent/nao/contactjointhandler.rsg) ) - ;Install effectors and perceptors + ;Install effectors and perceptors (nd StaticMeshInitEffector) - (nd TimePerceptor) + (nd TimePerceptor) (nd AgentState (setName AgentState) @@ -72,11 +72,14 @@ (nd GyroRatePerceptor (setName torso)) - (nd BeamEffector) + ;(nd HMDPPerceptor) + ;(nd HMDPEffector) + (nd BeamEffector) + (nd SayEffector) - ;(nd VisionPerceptor + ;(nd VisionPerceptor ; (setSenseMyPos false) ; (setStaticSenseAxis false) ; (addNoise false)) Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-07-31 20:27:41 UTC (rev 81) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-07-31 20:40:14 UTC (rev 82) @@ -41,6 +41,10 @@ gametimeperceptor/gametimeperceptor.h visionperceptor/visionperceptor.h agentintegration/soccerbotbehavior.h + hmdp_effector/hmdpaction.h + hmdp_effector/hmdpeffector.h + hmdp_effector/hmdpperceptor.h + hmdp_effector/naospecific.h ) set(soccer_LIB_SRCS @@ -107,6 +111,12 @@ gametimeperceptor/gametimeperceptor_c.cpp agentintegration/soccerbotbehavior.cpp agentintegration/soccerbotbehavior_c.cpp + hmdp_effector/hmdpeffector_c.cpp + hmdp_effector/hmdpeffector.cpp + hmdp_effector/hmdpperceptor_c.cpp + hmdp_effector/hmdpperceptor.cpp + hmdp_effector/hmdpwrapper.cpp + hmdp_effector/naospecific.cpp ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SPARK_INCLUDE_DIR} Modified: trunk/rcssserver3d/plugin/soccer/export.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/export.cpp 2009-07-31 20:27:41 UTC (rev 81) +++ trunk/rcssserver3d/plugin/soccer/export.cpp 2009-07-31 20:40:14 UTC (rev 82) @@ -51,6 +51,8 @@ #include "hearperceptor/hearperceptor.h" #include "gametimeperceptor/gametimeperceptor.h" #include "agentintegration/soccerbotbehavior.h" +#include "hmdp_effector/hmdpeffector.h" +#include "hmdp_effector/hmdpperceptor.h" ZEITGEIST_EXPORT_BEGIN() ZEITGEIST_EXPORT(SoccerControlAspect); @@ -84,5 +86,7 @@ ZEITGEIST_EXPORT(VisionPerceptor); ZEITGEIST_EXPORT(GameTimePerceptor); ZEITGEIST_EXPORT(SoccerbotBehavior); + ZEITGEIST_EXPORT(HMDPPerceptor); + ZEITGEIST_EXPORT(HMDPEffector); ZEITGEIST_EXPORT_END() Added: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c (rev 0) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c 2009-07-31 20:40:14 UTC (rev 82) @@ -0,0 +1,636 @@ +/*************************************************************************** + * Base routines of the command parser (without the HMDP commands) * + * Part of the Microcontroller Basimplementation of HMDP * + * N. Michael Mayer, 2007 email: nm...@gm... * + * This part of the program is intended to be used in the micro-controller * + ***************************************************************************/ + +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + Copyright (C) 2008 N. Michael Mayer, email: nm...@gm... + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +// + +#include "base.h" +#include "hmdp_c.h" +#include "compatible.h" + +Base_data *base_data; // pointer to current instantiation of the data + + +void sendMesg(const char *str) //! uses sendByte to make messages... +{ + while (*str) + { + sendByte(*str); + str++; + } +} + +void write_int(int in) //! write out integer to master +{ + char xx[] = + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + data2hex(8, in, xx); + sendMesg(xx); +} + +void set_current_servo_pos_as_zero() +{ + int i; + init_servo_list(); + for (i = 1; i <= base_data->servo_list_base[0]; ++i) + + base_data->zero_pos_inits_feed[base_data->servo_list_base[i]] + = read_back_pos_set(base_data->servo_list_base[i]); + base_data->zero_pos_inits = &(base_data->zero_pos_inits_feed[0]); + sendMesg("Current zero pos is now zero\r\n"); +} + +void init_base() +{ + base_data->op_state = 0; + base_data->echo_on = 0; + base_data->bbase = 0; + init_servo_list(); /*! search for all servos */ + //init_hmdl(); /*! in arm.c */ + sendMesg("# HMDP 0.3 \n"); +} + +int servo_list_in_hex(char *li) +{ + + init_servo_list(); + int i; + for (i = 0; i <= base_data->servo_list_base[0]; ++i) + { + data2hex(2, base_data->servo_list_base[i], &li[2* i ]); + } + li[base_data->servo_list_base[0] * 2 + 2] = 0; + return 0; +} + +void send_servo_list() +{ + char list[200]; + servo_list_in_hex(list); + + sendByte('!'); //!Data indikator + + sendMesg(list); + sendByte(13); + sendByte(10); +} + +int init_servo_list() //!gives back +//!(size, id, id...) +{ + + char i; + int pos = 1; + for (i = 0; i < 62; ++i) + { + if (read_back_id(i)) + { + base_data->servo_list_base[pos] = i; + pos++; + } + } + base_data->servo_list_base[0] = pos - 1; + return 0; +} +; + +void eval_set_echo_on_off(const char in[]) +/*! >E command one can turn on/off the echo */ +{ + if (in[1] == 'N') + base_data->echo_on = 0; + if (in[1] == 'F') + base_data->echo_on = -1; + +} +; + +void eval_send_gen_message(const char in[]) +/*! >$ command allows direct access to the servos */ +{ + int si = hex2data(2, in); + int i; + for (i = 0; i < si; i++) + { + char me = hex2data(2, in + 2 + 2* i ); + sendBytetoMo(me); + + }; +} +; + +void eval_set_position_message(const char in[]) +/*! >P command sets servo to position */ +{ + int servoid, value; + servoid = hex2data(2, in); + value = hex2data(4, in + 2); + value += base_data->zero_pos_inits[servoid] + - base_data->zero_pos_inits_feed[servoid]; + send_servo_to_pos(servoid, value); +} +; + +void eval_set_min_max_message(const char in[]) +//! >M message -- for setting up min and max values +{ + int servoid, minvalue, maxvalue; + servoid = hex2data(2, in); + base_data->servo_min_val[servoid] = hex2data(4, in + 2); + base_data->servo_max_val[servoid] = hex2data(4, in + 6); + char eins[5]; + eins[4] = 0; + sendMesg("\n"); + data2hex(4, base_data->servo_min_val[servoid], eins); + sendMesg(eins); + data2hex(4, base_data->servo_max_val[servoid], eins); + sendMesg(eins); + sendMesg("\n"); +} +; + +void eval_set_state_message(const char in[]) +//! >S message +{ + base_data->op_state = hex2data(2, in); + + sendMesg("\r\n"); + write_int(base_data->op_state); + sendMesg("\r\n"); +} +; + +void eval_set_gain_message(const char in[]) +//! set gain for servo +{ + int servoid, value; + servoid = hex2data(2, in); + value = hex2data(2, &in[2]); + send_servo_to_gain(servoid, value); + +} +; + +void eval_set_time(const char in[]) +//! set time +{ + long time = hex2data(8, in); + set_hmdl_time(time); +} +; + +void send_time() +//! read time from HMDP and send it to the client +{ + char mes[12] = + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + data2hex(8, get_hmdl_time(), mes); + sendMesg("!"); + sendMesg(mes); + sendMesg("\r\n"); + + data2hex(8, get_hmdl_time_inc(), mes); + sendMesg("inc: "); + sendMesg(mes); + sendMesg("\r\n"); + +} +; + +void eval_set_servo_on_off(const char in[]) +//! check for >ON or >OFF message both start with the the letter O +{ + + int servoid; + sendMesg("in on off\n"); + switch (in[0]) + { + case 'N': //! >ON## + + servoid = hex2data(2, &in[1]); + send_servo_on(servoid); + break; + + default: //! >OFF## + servoid = hex2data(2, &in[2]); + send_servo_off(servoid); + break; + } + +} +; + +void eval_get_jname(const char in[]) +/*! reads the name of the servo form the preprogrammed list defined in + compatible.h */ +{ + + int servoid, position, i; + + sendByte('!'); //Data indikator + + if (jointnames != NULL) + { + + if (in[0] == 'v') //! all joints + { + //init_servo_list(); + for (i = 0; i < base_data->servo_list_base[0]; ++i) + { + + sendMesg(jointnames[i]); + sendByte(':'); + + }; + + } + else + { + servoid = hex2data(2, &in[0]); + + sendMesg(jointnames[servoid]); + + }; + } + sendByte(13); + sendByte(10); + +} + +void eval_get_pos_message(const char in[]) +/* <P command read serv-pos from potis */ +{ + + int servoid, position, i; + + sendByte('!'); //Data indikator + + if (in[0] == 'v') + { + //init_servo_list(); + for (i = 0; i < base_data->servo_list_base[0]; ++i) + { + servoid = base_data->servo_list_base[i + 1]; + position = read_back_pos(servoid); + position -= base_data->zero_pos_inits[servoid] + - base_data->zero_pos_inits_feed[servoid]; //ACHTUNG + + char xx[] = + { 0, 0, 0, 0, 0 }; + data2hex(4, position, xx); + sendMesg(xx); + + }; + sendByte(13); + sendByte(10); + + } + else + { + servoid = hex2data(2, &in[0]); + position = read_back_pos(servoid); + position -= base_data->zero_pos_inits[servoid] + - base_data->zero_pos_inits_feed[servoid]; //ACHTUNG + + char xx[] = + { 0, 0, 0, 0, 13, 0 }; + data2hex(4, position, xx); + sendMesg(xx); + //uart0SendByte('*'); + sendByte(13); + sendByte(10); + }; +} +; + +void eval_get_pos_set_message(const char in[]) +/*! <R get target value */ +{ + + int servoid, position, i; + + sendByte('!'); //Data indikator + + if (in[0] == 'v') + { + init_servo_list(); + for (i = 0; i < base_data->servo_list_base[0]; ++i) + { + servoid = base_data->servo_list_base[i + 1]; + position = read_back_pos_set(servoid); + char xx[] = + { 0, 0, 0, 0, 0 }; + data2hex(4, position, xx); + sendMesg(xx); + + }; + //uart0SendByte('*'); + sendByte(13); + sendByte(10); + + } + else + { + + servoid = hex2data(2, &in[0]); + position = read_back_pos_set(servoid); + char xx[] = + { 0, 0, 0, 0, 13, 0 }; + data2hex(4, position, xx); + sendMesg(xx); + sendByte(13); + sendByte(10); + } +} +; + +void send_zero_pos() +{ + + int i; + sendByte('!'); + for (i = 0; i < base_data->servo_list_base[0]; ++i) + { + unsigned char servoid = base_data->servo_list_base[i + 1]; + int zeropos = base_data->zero_pos_inits_feed[servoid]; //ACHTUNG DEBUG + + char xx[] = + { 0, 0, 0, 0, 0 }; + data2hex(4, zeropos, xx); + sendMesg(xx); + + }; + sendByte(13); + sendByte(10); + +} +; // send zero pos feed + + +void plastic_state() +/*! timer call for plastic state */ +{ + init_servo_list(); + int i; + int j, val; + for (i = 1; i <= base_data->servo_list_base[0]; ++i) + { + + j = base_data->servo_list_base[i]; + val = read_back_pos(j); + send_servo_to_pos(j, val); + }; +} +; + +/* first level parser for base.c commands (<..., >...., @....)*/ +int eval_seq_base(const char in[]) +{ + + int found_command = 0; + found_command = -1; + switch (in[0]) + { + case '>': + disableIRQ(); + + switch (in[1]) + { + case '$': + eval_send_gen_message(&in[2]); /* >$ (gen messg command */ + case 'S': + eval_set_state_message(&in[2]); /* >S command */ + break; + case 'P': + eval_set_position_message(&in[2]); /* >P command */ + break; + case 'G': + eval_set_gain_message(&in[2]); /* >G command */ + break; + case 'O': + eval_set_servo_on_off(&in[2]); /* >O command */ + break; + case 'M': + eval_set_min_max_message(&in[2]); /* >M command */ + break; + case 'T': + eval_set_time(&in[2]); /* >T command */ + break; + case 'E': + eval_set_echo_on_off(&in[2]); /* >E command */ + break; + case 'Z': + set_current_servo_pos_as_zero(); + break; + } + enableIRQ(); + break; + case '<': + + switch (in[1]) + { + case 'N': + disableIRQ(); + eval_get_jname(&in[2]); /* <N command: get the names of the servos */ + break; + case 'P': + disableIRQ(); + eval_get_pos_message(&in[2]); /* <P command */ + break; + case 'R': + disableIRQ(); + eval_get_pos_set_message(&in[2]); /* <R command */ + break; + case 'L': + disableIRQ(); + send_servo_list(); /* <L command servo list*/ + break; + case 'T': + disableIRQ(); + send_time(); + break; + case 'Z': + send_zero_pos(); // send zero pos feed + break; + + } + enableIRQ(); + default: + found_command = -1; + break; + } + return found_command; +} +; + +/* sending motion to servo ...*/ + +void send_hmdp_motion_to_servo() +{ + int i; + for (i = 0; i < base_data->servo_list_base[0]; ++i) + { + + int ID = base_data->servo_list_base[i + 1]; + int pos = base_data->zero_pos_inits[(int) base_data->servo_list_base[i + + 1]] + get_hmdl_servo_out(i); + + send_servo_to_pos((int) base_data->servo_list_base[i + 1], pos); + }; + +} +; + +/*! interrupt routine for plastic state */ +void inter_routine_state_2() +{ + plastic_state(); +} +; + +/*! interrupt routine for HMDP runnung */ +void inter_routine_state_1() +{ + // if ((get_hmdl_time_inc()!=0)) + // { + calc_next_timer_value(); + send_hmdp_motion_to_servo(); + motion_machine(calc_next_timer_value()); + +} +; + +/*! main interrupt routine */ +void inter_routine_base() +{ + if (base_data->op_state == 1) + inter_routine_state_1(); + if (base_data->op_state == 2) + inter_routine_state_2(); + +} +; + +int main_eval(char *buff) +{ + + if (eval_seq_base(buff) == -1) + { + //sendMesg ("\n"); + eval_seq(buff); // HMDP parser in hmdp_c.c + + } + return 0; +} + +//! main parser +int parse_one_line() +{ + char in[3]; + in[0] = 0; + in[1] = 0; + int buff_c = 0; + int a = 0; + + while (a != 13) + { + // led1_off(); + a = readByte(); + ; + if (a != -1) + { + // led1_on(); + base_data->buff[base_data->bbase + buff_c] = a; + buff_c++; + in[0] = a; + if (base_data->echo_on == 0) + sendByte(a); + + }; + }; + + if (buff_c > 5) //! Checksum feature + { + if ((base_data->buff[base_data->bbase + buff_c - 4] == 'C') + && (base_data->buff[base_data->bbase + buff_c - 3] == 'S')) + { + int sum = 0; + int i; + for (i = 0; i < buff_c - 4; ++i) + sum += base_data->buff[base_data->bbase + i]; + sum %= 15; + int sum2 = hex2data(1, &(base_data->buff[base_data->bbase + buff_c + - 2])); + if (sum == sum2) + { + sendMesg("\r\n*\r\n"); + } + else + { + sendMesg("\r\nE\r\n"); + }; + buff_c -= 3; + + }; + }; + if (buff_c > 1) //! Long message feature + { + if (base_data->buff[base_data->bbase + buff_c - 2] == '&') + { + base_data->bbase += buff_c - 2; + sendMesg("add line \n"); + } + else + { + base_data->buff[base_data->bbase + buff_c] = 13; + base_data->buff[base_data->bbase + buff_c + 1] = 0; + + base_data->bbase = 0; + + } + + } + else + { + + base_data->buff[base_data->bbase + buff_c] = 13; + base_data->buff[base_data->bbase + buff_c + 1] = 0; + base_data->bbase = 0; + } + if (base_data->bbase == 0) + { + sendMesg("\r\n"); + + main_eval(base_data->buff); // see base.c + clearBuffer(); + }; + +} +; + Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h (rev 0) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h 2009-07-31 20:40:14 UTC (rev 82) @@ -0,0 +1,73 @@ +/*************************************************************************** + * base.h for the Harmonic Motion Description Protocol (HMDP) * + * N. Michael Mayer, 2007 email: nm...@gm... * + * This part of the program is intended to be used in the micro-controller * + ***************************************************************************/ + +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + Copyright (C) 2008 N. Michael Mayer, email: nm...@gm... + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __HMDP_BASE__ +#define __HMDP_BASE__ + +#define MAX_ALLOWED_SERVOS 64 +#define MAX_PARSER_BUFFER_SIZE 200 + +typedef struct +{ + /*! instantiation of the state variable + + */ + int op_state; // main state variable HMDP off=0, HMDP on =1, plastic =2 + int servo_min_val[MAX_ALLOWED_SERVOS + 1]; // sets a min and a max value for each joint + int servo_max_val[MAX_ALLOWED_SERVOS + 1]; + char servo_list_base[MAX_ALLOWED_SERVOS + 1]; // reserved memory for the joint ids + int *zero_pos_inits; // pointer to current zero positions + int zero_pos_inits_feed[MAX_ALLOWED_SERVOS + 1]; // ram list of the zero positions + int bbase; // pointer to the current position in the parser buffer + char buff[MAX_PARSER_BUFFER_SIZE]; // parser buffer + int echo_on; // echo flag -- for terminal communication + +} Base_data; // all "global" data put for base.c + + +// functions in base.c + + +void init_base(); +int parse_one_line(); +void inter_routine_base(); + +int init_servo_list(); +int servo_list_in_hex(char *li); +int eval_seq_base(const char in[]); +void send_hmdp_motion_to_servo(); +void write_int(int in); + +extern char jointnames[MAX_ALLOWED_SERVOS][8]; + +#ifndef NULL +#define NULL 0 +#endif + +#endif Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/base.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h (rev 0) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h 2009-07-31 20:40:14 UTC (rev 82) @@ -0,0 +1,92 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + The functions names in this header have to be implmented for each microcontroller individually + + Copyright (C) 2008 N. Michael Mayer, nm...@gm... + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +//! HMDP Compatibility Layer: + +#ifndef ___COMPATIBLE_RR___ +#define ___COMPATIBLE_RR___ + +//! This is the set of functions and constants used by the hmdp_c.c and base.c functions. They have to be implemented for each robot individually + +//! Interrupt related functions + +// #1 +void disableIRQ(); +// #2 +void enableIRQ(); + +// !Communication over with the the client +// #3 +int sendByte(int data); +// #4 +int readByte(); +// #5 +void clearBuffer(); + +//! possibly useful to allow direct communication between client and servos using the >$ command +// #6 +int sendBytetoMo(int); + +//! These commands have to be implemented to control the servos +//! For all servos it is assummed that 0 corresponds to the minimal value and 4096 corresponds to the maximal value + +// #7 +void send_servo_off(int ID); // ! turn servo off +// #8 +void send_servo_on(int ID); // ! turn servo on +// #9 +void send_servo_to_pos(int ID, int pos); // ! commands +// #10 +void send_servo_to_gain(int ID, int gain); + +// #11 +int read_back_pos(int ID); // ! read current servo pos from poti value +// #12 +int read_back_pos_set(int ID); // ! read targert position from servo +// #13 +int read_back_id(int ID); // ! check if a servo with the particular ID is present + + +/*! for all things mentioned below this point: + HMDP internally counts the servo from lower numbers to higher numbers thus a robot with servo + IDs 1,3,8,15 internally has the IDs 0,1,2,3 + the arrays: jointnames[][8]; and zer_pos_inits_feed */ + +// #14 +extern char jointnames[][8]; // ! names of the joints +// ! can be read out by: <Nxx and used by tools e.g. for transferring motion patterns from one robot to another +/*! Naming Conventions: NNXYPD[D] NN: Limb name that is: HE: Head, RA: right arm RL: Right leg, etc. + X number of the major joint position counted from the body center: hip, shoulder, neck = 1; + knee, elbow = 2; + foot, wrist = 3; + Y number of the hingjoint within the joint -- differs in dependence of the design + P parity -- if the robot executes the same motion according to reflection symmetry, i.e. all R become L if the motion stays + the same with parity + + is inverted in the case of parity - + D direction in Pitch (P), Roll (R), Yaw (Y), diagonal joints may use double letters e.g. PY + numbering convention: IF THE ROBOT HAS GAPS BETWEEN SERVO NUMBERS: + */ + +// #15 +extern int zero_pos_inits_feed[]; +/*! Zero positions i.e. the values that should be send to the servos of the robot to set it into an initial posture, + a posture from which the motions deviate. In some robots it is necessary */ + +#endif // ___COMPATIBLE_RR___ Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/compatible.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c (rev 0) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c 2009-07-31 20:40:14 UTC (rev 82) @@ -0,0 +1,977 @@ +#include "hmdp_c.h" +#include "sine_fixed.h" + +Hmdl *hmdl; // hook for a pointer to all data + + +/*! Util routines to convert integers to hex strings and vice versa */ + +int hex2data(short size_v, const char res[]) +{ + + int k; + int data; + data = 0; + + for (k = 0; k < size_v; k++) + { + + data *= 16; + switch (res[k]) + + { + case '0': + break; + case '1': + data += 1; + break; + case '2': + data += 2; + break; + case '3': + data += 3; + break; + case '4': + data += 4; + break; + case '5': + data += 5; + break; + case '6': + data += 6; + break; + case '7': + data += 7; + break; + case '8': + data += 8; + break; + case '9': + data += 9; + break; + case 'a': + data += 10; + break; + case 'b': + data += 11; + break; + case 'c': + data += 12; + break; + case 'd': + data += 13; + break; + case 'e': + data += 14; + break; + case 'f': + data += 15; + break; + + } + + }; + return data; +} +; + +void data2hex(short size_v, const int dat, char res[]) +{ + + int k; + int data = dat; + for (k = size_v - 1; k >= 0; k--) + { + + switch (data % 16) + + { + case 0: + res[k] = '0'; + break; + case 1: + res[k] = '1'; + break; + case 2: + res[k] = '2'; + break; + case 3: + res[k] = '3'; + break; + case 4: + res[k] = '4'; + break; + case 5: + res[k] = '5'; + break; + case 6: + res[k] = '6'; + break; + case 7: + res[k] = '7'; + break; + case 8: + res[k] = '8'; + break; + case 9: + res[k] = '9'; + break; + case 10: + res[k] = 'a'; + break; + case 11: + res[k] = 'b'; + break; + case 12: + res[k] = 'c'; + break; + case 13: + res[k] = 'd'; + break; + case 14: + res[k] = 'e'; + break; + case 15: + res[k] = 'f'; + break; + + } + data /= 16; + }; + +} +; + +void set_hmdl_time(long time) +{ + hmdl->time = time; +} +; + +long get_hmdl_time() +{ + return hmdl->time; +} +; + +long get_hmdl_time_inc() +{ + return hmdl->time_inc; +} +; + +short get_hmdl_servo_out(int i) +{ + return cfloat2int(hmdl->positions_to_set[i]); +} +; + +void write_cfloat(struct c_float *in) +{ + + struct c_f_hex in_hex = c_float2hex(*in); + sendMesg(in_hex.stri); + +} + +#define INTERVAL 50 /* num of ms for the timer to go off */ + +/* function prototype */ +void motion_control(int); + +/* + * global variables + */ + +/* struct Hmdl hmdl;*/ + +struct c_f_hex c_float2hex(struct c_float in) +{ + short sign, esign, i; + struct c_f_hex ret; + for (i = 0; i < 15; ++i) + ret.stri[i] = 0; + + if (in.mantisse < 0) + { + ret.stri[0] = '-'; + sign = -1; + } + else + { + sign = 1; + ret.stri[0] = '+'; + }; + + if (in.exponent < 0) + { + ret.stri[9] = '-'; + esign = -1; + } + else + { + esign = 1; + ret.stri[9] = '+'; + }; + + data2hex(8, sign * in.mantisse, &ret.stri[1]); + /*ret.stri[9]='^';*/ + + data2hex(2, esign * in.exponent, &ret.stri[10]); + + return ret; +} +; + +struct c_float mult_cc(struct c_float a, struct c_float b) +{ + struct c_float c; + int sign_c = 1; + + if (a.mantisse < 0) + { + sign_c = -1; + a.mantisse = -a.mantisse; + } + + if (b.mantisse < 0) + { + sign_c = -sign_c; + b.mantisse = -b.mantisse; + } + + a.mantisse = a.mantisse >> (INT_MAXE / 2); + b.mantisse = b.mantisse >> (INT_MAXE / 2); + + c.exponent = a.exponent + b.exponent; + c.mantisse = a.mantisse * b.mantisse * sign_c; + + if (c_abs(c.mantisse) < INT_MAXX) + { + c.exponent--; + c.mantisse = c.mantisse << 1; + }; + + return c; +} +; + +int cfloat2int(struct c_float a) +{ + int r; + if (a.mantisse > 0) + r = a.mantisse >> (INT_MAXE - a.exponent); + else + { + r = -1* ( (-a.mantisse)>>(INT_MAXE-a.exponent)); + }; + return r; +}; + +struct c_float hex2c_float(const char in[]) +{ + struct c_float ret; + short sign, esign; + if (in[0] == '-') + sign = -1; + else if (in[0] == '+') + sign = +1; + + if (in[9] == '-') + esign = -1; + else if (in[9] == '+') + esign = +1; + + ret.mantisse = sign * hex2data(8, &in[1]); + ret.exponent = esign * hex2data(2, &in[10]); + return ret; +} + +int lo2(int in) +//! returns rough integer logarithm of in +{ + if (in >= 2048) + return 11; + if (in >= 1024) + return 10; + if (in >= 512) + return 9; + if (in >= 256) + return 8; + if (in >= 128) + return 7; + if (in >= 64) + return 6; + if (in >= 32) + return 5; + if (in >= 16) + return 4; + if (in >= 8) + return 3; + if (in >= 4) + return 2; + if (in >= 2) + return 1; + if (in < 2) + return 0; +} +; + +struct c_float c_f_sum(struct c_float a[], int size) +//! sum of size c_floats +{ + int i, max, lsize; + lsize = lo2(size); + struct c_float result; + max = 0; + result.mantisse = 0; + + for (i = 0; i < size; ++i) + if (a[i].exponent > max) + max = a[i].exponent; + + for (i = 0; i < size; ++i) + { + result.mantisse += (a[i].mantisse >> (max - a[i].exponent + lsize)); + }; + + result.exponent = max + lsize; + return result; +} +; + +int c_abs(int in) +//! absolut value of integer +{ + if (in > 0) + return in; + else + return -in; +} +; + +struct c_float c_f_add(struct c_float s1, struct c_float s2) +//! add 2 c_floats +{ + int i, max, lsize; + struct c_float result; + max = 0; + result.mantisse = 0; + + max = s1.exponent; + if (s2.exponent > max) + max = s2.exponent; + + if (s1.mantisse < 0) + result.mantisse -= ((-s1.mantisse) >> (max - s1.exponent + 1)); + else + result.mantisse += ((s1.mantisse) >> (max - s1.exponent + 1)); + + if (s2.mantisse < 0) + result.mantisse -= (-s2.mantisse >> (max - s2.exponent + 1)); + else + result.mantisse += (s2.mantisse >> (max - s2.exponent + 1)); + + result.exponent = max + 1; + if (c_abs(result.mantisse) < INT_MAXX) + { + result.exponent--; + if (result.mantisse > 0) + result.mantisse = result.mantisse << 1; + else + result.mantisse = -1* ( (-result.mantisse) <<1); + }; + + return result; + }; + +struct c_float mult_c_sinus(struct c_float a, int d) +//! multiply routine for sinus input c_float * sinus +{ + struct c_float c; + + int sign_c = 1; + + if (a.mantisse < 0) + { + sign_c = -1; + a.mantisse = -a.mantisse; + } + + if (d < 0) + { + sign_c = -sign_c; + d = -d; + } + + a.mantisse = a.mantisse >> (INT_MAXE / 2); + d = d >> (INT_MAXE / 2); + + c.exponent = a.exponent; + c.mantisse = a.mantisse * d * sign_c; + + return c; +} +; + +struct c_float mult_cc_sinus(struct c_float a, struct c_float b, int d) +//! multiply 2 c_floats with one sinus +{ + struct c_float c; + int sign_c = 1; + + if (a.mantisse < 0) + { + sign_c = -1; + a.mantisse = -a.mantisse; + } + + if (d < 0) + { + sign_c = -sign_c; + d = -d; + } + + if (b.mantisse < 0) + { + sign_c = -sign_c; + b.mantisse = -b.mantisse; + } + + a.mantisse = a.mantisse >> (2*INT_MAXE / 3); + b.mantisse = b.mantisse >> (2*INT_MAXE / 3); + d = d >> (2*INT_MAXE / 3); + + c.exponent = a.exponent + b.exponent; + c.mantisse = a.mantisse * b.mantisse * d * sign_c; + + if (c_abs(c.mantisse) < INT_MAXX) + { + c.exponent--; + if (c.mantisse > 0) + c.mantisse = c.mantisse << 1; + else + c.mantisse = -1* ( (-c.mantisse) <<1); + }; + + return c; + }; + +struct c_float set_c_float_zero() +// returns a c_float = 0 +{ + struct c_float a; + a.mantisse = 0; + a.exponent = 0; + return a; +} + +struct c_float fade_in(struct c_float a, struct c_float b, long t_a, long t_b, + long t) +//! provides fading in for motion patterns (in a linear -- ramp like manner) +{ + + int max_man; + struct c_float c; + max_man = a.exponent; + int sign_a, sign_b; + if (a.mantisse >= 0) + { + sign_a = 1; + } + else + { + sign_a = -1; + a.mantisse = -a.mantisse; + }; + + if (b.mantisse >= 0) + { + sign_b = 1; + } + else + { + sign_b = -1; + b.mantisse = -b.mantisse; + }; + + if (max_man < b.exponent) + max_man = b.exponent; + + long long diff = sign_b * (b.mantisse >> (max_man - b.exponent)) - sign_a + * (a.mantisse >> (max_man - a.exponent)); + diff *= (t - t_a); + diff /= (t_b - t_a); + + c.exponent = max_man; + c.mantisse = sign_a * a.mantisse + diff; + + return c; +} +; + +void motion_machine(unsigned int time) +/*! interpolation using direct access to the hmdl structure */ +{ + + int i, k, l; + struct c_float y, sine_amp, cos_amp; + struct c_float amp; + struct c_float *coeffs; + + /*! iterate over the servos and sum all values for the active motion patterns + -> superposition */ + for (i = 0; i < MAX_SERVOS; ++i) + { + hmdl->positions_to_set[i] = set_c_float_zero(); // init servo_list + + /*! loop over all motion patterns, see which ones should be active */ + for (k = 0; k < MAX_MPS; ++k) + { + /*! skip pattern if amplitude is 0 or not active */ + if (!(hmdl->mp[k].active)) + + { + continue; + } + + coeffs = hmdl->mp[k].pp->sv[i].s_position; + + if (time < hmdl->mp[k].start_0) + amp = hmdl->mp[k].A_old; + else if (time >= hmdl->mp[k].start_1) + amp = hmdl->mp[k].A_new; + else + amp = fade_in(hmdl->mp[k].A_old, hmdl->mp[k].A_new, + hmdl->mp[k].start_0, hmdl->mp[k].start_1, time); + + /*if (hmdl->mp[k].end_0!=0) + { + if (time > hmdl->mp[k].start_1) + { + hmdl->mp[k].start_0=hmdl->mp[k].end_0; + hmdl->mp[k].start_1=hmdl->mp[k].end_1; + + hmdl->mp[k].end_0=0; + hmdl->mp[k].end_1=0; + hmdl->mp[k].A_old=hmdl->mp[k].A_new; + hmdl->mp[k].A_new=set_c_float_zero(); + }; + };*/ + + if (hmdl->mp[k].end_0 != 0) + { + if (time > hmdl->mp[k].end_0) + { + if (time > hmdl->mp[k].end_1) + { + // + amp = set_c_float_zero(); + // hmdl->mp[k].active=0; + } + + else + { + amp = fade_in(hmdl->mp[k].A_new, set_c_float_zero(), + hmdl->mp[k].end_0, hmdl->mp[k].end_1, time); + + }; + + }; + }; + + //amp = hmdl->mp[k].A_curr; + //if (i==20) + // {write_int(cfloat2int(amp)); DMESG(" : ");} + + y = mult_cc(amp, coeffs[0]); + //y = coeffs[0]; + //if (i==20) { + // write_int(cfloat2int(y)); DMESG(" : ");} + + + for (l = 0; l < (MAX_COEFFS - 1) / 2; ++l) + { + y = c_f_add(y, mult_cc_sinus(amp, coeffs[2* l + 1], sin_fixed( + ((time - hmdl->mp[k].offset) * hmdl->mp[k].pp->wlqs_top[l]) + / hmdl->mp[k].pp->wlqs_bot[l]))); + + y = c_f_add(y, mult_cc_sinus(amp, coeffs[2* l + 2], cos_fixed( + ((time - hmdl->mp[k].offset) * hmdl->mp[k].pp->wlqs_top[l]) + / hmdl->mp[k].pp->wlqs_bot[l]))); + }; + + hmdl->positions_to_set[i] = c_f_add(y, hmdl->positions_to_set[i]); + + }; + }; +} +; + +int calc_next_timer_value() +//! wrapper for time +{ + hmdl->time += hmdl->time_inc; + return hmdl->time; +} + +void eval_set_time_message(const char in[]) +// TS HMDP command similar to >T command but also increment can be set +{ + hmdl->time = hex2data(MAX_TIME_DIGITS, in); + hmdl->time_max = hex2data(MAX_TIME_DIGITS, &in[MAX_TIME_DIGITS]); + hmdl->time_inc = hex2data(MAX_TIME_DIGITS, &in[2*MAX_TIME_DIGITS]); + //timer_running=0; + write_int(hmdl->time); + sendMesg("\r\n"); + +} +; + +void eval_set_alarm_point(const char in[]) +// not implelemented so far +{ + +} +; + +void eval_use_pattern_message(const char in[]) +//! PU command +{ + int patternid, curr; + patternid = hex2data(MAX_ID_DIGITS, in); + + hmdl->mp[patternid].start_0 = hex2data(MAX_TIME_DIGITS, &in[MAX_ID_DIGITS]); + hmdl->mp[patternid].start_1 = hex2data(MAX_TIME_DIGITS, &in[MAX_ID_DIGITS + + MAX_TIME_DIGITS]); + hmdl->mp[patternid].offset = hex2data(MAX_TIME_DIGITS, + &in[MAX_ID_DIGITS + 2*MAX_TIME_DIGITS]); + + hmdl->mp[patternid].end_0 = 0; + hmdl->mp[patternid].end_1 = 0; + + curr = MAX_ID_DIGITS + 3*MAX_TIME_DIGITS; + + hmdl->mp[patternid].A_old = hmdl->mp[patternid].A_new; + hmdl->mp[patternid].A_new = hex2c_float(&in[curr]); + + hmdl->mp[patternid].active = 1; + +} +; + +void eval_use_short_pattern_message(const char in[]) +//! PP command - shorter PU message +// +{ + int patternid, curr; + patternid = hex2data(MAX_ID_DIGITS, in); + + hmdl->mp[patternid].start_0 = 0; + hmdl->mp[patternid].start_1 = 0; + hmdl->mp[patternid].end_0 = 0; + hmdl->mp[patternid].end_1 = 0; + hmdl->mp[patternid].offset = 0; + + hmdl->mp[patternid].A_old = hmdl->mp[patternid].A_new; + hmdl->mp[patternid].A_new.mantisse = 0x40000000; + hmdl->mp[patternid].A_new.exponent = 0; + hmdl->mp[patternid].active = 1; + +} +; + +void eval_use_pattern_message_with_end(const char in[]) +//! PY sending a pattern with the ramp end +{ + int patternid, curr; + patternid = hex2data(MAX_ID_DIGITS, in); + + hmdl->mp[patternid].A_old = set_c_float_zero(); + hmdl->mp[patternid].A_new = set_c_float_zero(); + + hmdl->mp[patternid].start_0 = hex2data(MAX_TIME_DIGITS, &in[MAX_ID_DIGITS]); + hmdl->mp[patternid].start_1 = hex2data(MAX_TIME_DIGITS, &in[MAX_ID_DIGITS + + MAX_TIME_DIGITS]); + hmdl->mp[patternid].end_0 = hex2data(MAX_TIME_DIGITS, + &in[MAX_ID_DIGITS + 2*MAX_TIME_DIGITS]); + hmdl->mp[patternid].end_1 = hex2data(MAX_TIME_DIGITS, + &in[MAX_ID_DIGITS + 3*MAX_TIME_DIGITS]); + hmdl->mp[patternid].offset = hex2data(MAX_TIME_DIGITS, + &in[MAX_ID_DIGITS + 4*MAX_TIME_DIGITS]); + /*printf (" on sh 2 :%d %d\n", hmdl->mp[patternid].start_0, + hmdl->mp[patternid].start_1);*/ + + curr = MAX_ID_DIGITS + 5*MAX_TIME_DIGITS; + + hmdl->mp[patternid].A_old = hmdl->mp[patternid].A_new; + hmdl->mp[patternid].A_new = hex2c_float(&in[curr]); + + hmdl->mp[patternid].active = 1; + +} +; + +void eval_set_servo_coeff_message(const char in[]) +{ + int patternid, servoid, curr; + patternid = hex2data(MAX_ID_DIGITS, in); + servoid = hex2data(MAX_ID_DIGITS, &in[MAX_ID_DIGITS]); + curr = 2*MAX_ID_DIGITS; + int i = 0; + while ((in[curr] != 'X') && (in[curr] != 0) && (i < MAX_COEFFS)) + { + hmdl->mp[patternid].pp->sv[servoid].s_position[i] = hex2c_float( + &in[curr]); + write_cfloat(&hmdl->mp[patternid].pp->sv[servoid].s_position[i]); + sendMesg("\r\n"); + write_int(i); + sendMesg("\r\n"); + + i++; + curr += C_FLOAT_LENGTH; + }; + +} +; + +void eval_set_servo_small_coeff_message(const char in[]) +{ + int patternid, servoid, coeffid, curr; + patternid = hex2data(MAX_ID_DIGITS, in); + servoid = hex2data(MAX_ID_DIGITS, &in[MAX_ID_DIGITS]); + coeffid = hex2data(MAX_ID_DIGITS, &in[2*MAX_ID_DIGITS]); + hmdl->mp[patternid].pp->sv[servoid].s_position[coeffid] + = hex2c_float(&in[3*MAX_ID_DIGITS]); +} +; + +//long long i; + +void eval_new_pattern_message(const char in[]) +{ + int id, wp_number, counter, i, j; + + /* get number */ + id = hex2data(MAX_ID_DIGITS, in); + wp_number = hex2data(MAX_COE_DIGITS, &in[MAX_ID_DIGITS]); + + counter = MAX_ID_DIGITS + MAX_COE_DIGITS; + for (i = 0; i < MAX_COEFFS; ++i) + for (j = 0; j < MAX_SERVOS; ++j) + { + hmdl->mp[id].pp->sv[j].s_position[i].mantisse = 0; + hmdl->mp[id].pp->sv[j].s_position[i].exponent = 0; + }; + + for (i = 0; i < (MAX_COEFFS - 1) / 2; ++i) + { + hmdl->mp[id].pp->wlqs_top[i] = 0; + hmdl->mp[id].pp->wlqs_bot[i] = 1; + + }; + + for (i = 0; i < (wp_number - 1) / 2; ++i) + { + hmdl->mp[id].pp->wlqs_top[i] = hex2data(MAX_WLQ_DIGITS, &in[counter]); + counter += MAX_WLQ_DIGITS; + hmdl->mp[id].pp->wlqs_bot[i] = hex2data(MAX_WLQ_DIGITS, &in[counter]); + counter += MAX_WLQ_DIGITS; + + /* DEBUG */ + // printf ("MC: coeffs top %d bot %d \n", hmdl->mp[id].pp->wlqs_top[i], + // hmdl->mp[id].pp->wlqs_bot[i]); + + }; + + /* DEBUG */ + //intf("MC: Setting new pattern for number %d\n", id); +} +; + +void init_hmdl() +{ + int i, j, k, l, p; + + /* + * inititialize HDML structure + */ + + /* motion patterns */ + + for (i = 0; i < MAX_MPS_IN_RAM; ++i) + { + hmdl->mp[i].pp = &(hmdl->mpp_in_ram[i]); + hmdl->mp[i].pp->ID_prop = 8888 + i; + + for (j = 0; j < (MAX_COEFFS - 1) / 2; ++j) + { + hmdl->mp[i].pp->wlqs_top[j] = 0; + hmdl->mp[i].pp->wlqs_bot[j] = 1; + }; + + for (j = 0; j < MAX_SERVOS; j++) + { + for (k = 0; k < MAX_COEFFS; k++) + { + hmdl->mp[i].pp->sv[j].s_position[k].mantisse = 0; + hmdl->mp[i].pp->sv[j].s_position[k].exponent = 0; + }; + + }; + + }; + + /*for (i=MAX_MPS_IN_RAM;i<MAX_MPS;i++) // meant for motion patterns in flash + hmdl->mp[i].pp = 0x00058000 + 0x00000800*(i-MAX_MPS_IN_RAM); + + for (i=0;i<MAX_MPS;++i) + { + + hmdl->mp[i].A_old.mantisse=0; + hmdl->mp[i].A_old.exponent=0; + hmdl->mp[i].A_new.mantisse=0; + hmdl->mp[i].A_new.exponent=0; + + hmdl->mp[i].start_0 = 0; + hmdl->mp[i].start_1 = 0; + hmdl->mp[i].updated = 0; + hmdl->mp[i].active = 0; + };*/// until here + + + hmdl->time = 0; + hmdl->time_max = 0; + hmdl->time_inc = 1; + + /* positions to set */ + for (p = 0; p < MAX_SERVOS; ++p) + { + hmdl->positions_to_set[p].exponent = 0; + hmdl->positions_to_set[p].mantisse = 0; + } + +} + +void eval_get_current_sine_val(const char in[]) +{ + int patternid, freqid; + unsigned int retval; + patternid = hex2data(MAX_ID_DIGITS, in); + freqid = hex2data(MAX_ID_DIGITS, in); + + retval = sin_fixed((hmdl->time) * hmdl->mp[patternid].pp->wlqs_top[freqid] + / hmdl->mp[patternid].pp->wlqs_bot[freqid]); + retval /= 100000; + + sendMesg("current value:\r\n"); + write_int(retval); + sendMesg("\r\n"); + sendMesg("wlqs_top:\r\n"); + write_int(hmdl->mp[patternid].pp->wlqs_top[freqid]); + sendMesg("\r\n"); + +} +; + +void eval_seq(const char in[]) +{ + + switch (in[0]) + { + case 'P': + switch (in[1]) + { + case 'N': + eval_new_pattern_message(&in[2]); // PN command + break; + case 'S': + eval_set_servo_coeff_message(&in[2]); // PS command + break; + case 'I': + eval_set_servo_small_coeff_message(&in[2]); + // PS command + break; + case 'U': + eval_use_pattern_message(&in[2]); // PU command + break; + case 'P': + eval_use_short_pattern_message(&in[2]); // PU command + break; + case 'Y': + eval_use_pattern_message_with_end(&in[2]); // PY command + + break; + } + break; + case 'T': + switch (in[1]) + { + case 'S': + eval_set_time_message(&in[2]); // TS command + break; + } + + break; + case '?': + switch (in[1]) + { + case 'S': + eval_get_current_sine_val(&in[2]); + break; + + } + break; + + } +} +; + +struct c_float interpolate_rational_c_float( /*Real amplitude interpolation*/ +int size_c, struct c_float amp, int time, struct c_float coeffs[], + unsigned int frequencies_up[], + unsigned int frequencies_bottom[]) +{ + int l; + struct c_float y; + y = mult_cc(amp, coeffs[0]); + + for (l = 0; l < (size_c - 1) / 2; ++l) + { + y = c_f_add(y, mult_cc_sinus(amp, coeffs[2* l + 1], sin_fixed((time + * frequencies_up[l]) / frequencies_bottom[l]))); + + y = c_f_add(y, mult_cc_sinus(amp, coeffs[2* l + 2], cos_fixed((time + * frequencies_up[l]) / frequencies_bottom[l]))); + }; + + return y; + +} +; + +struct c_float interpolate_c_float_phase( +/*Amplitude is rotational matrix (complex) */ +int size_c, struct c_float amp[], int time, struct c_float coeffs[], + unsigned int frequencies[]) +{ + int i; + struct c_float y, sine_amp, cos_amp; + y = mult_cc(amp[0], coeffs[0]); + for (i = 0; i < size_c / 2; i++) + { + sine_amp = c_f_add(mult_cc(amp[2], coeffs[2* i + 2]), mult_cc(amp[3], + coeffs[2* i + 1])); + cos_amp = c_f_add(mult_cc(amp[0], coeffs[2* i + 2]), mult_cc(amp[1], + coeffs[2* i + 1])); + + y + = c_f_add(y, mult_c_sinus(sine_amp, sin_fixed(time + * frequencies[i]))); + y = c_f_add(y, mult_c_sinus(cos_amp, cos_fixed(time * frequencies[i]))); + }; + + return y; +} +; + Property changes on: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h (rev 0) +++ trunk/rcssserver3d/plugin/soccer/hmdp_effector/hmdp_c/hmdp_c.h 2009-07-31 20:40:14 UTC (rev 82) @@ -0,0 +1,196 @@ +/*************************************************************************** + * Header for the Harmonic Motion Description Protocol (HMDP) * + * N. Michael Mayer, 2007 email: nm...@gm... * + * This part of the program is intended to be used in the micro-controller * + ***************************************************************************/ + +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + Copyright (C) 2008 N. Michael Mayer, email: nm...@gm... + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ___HMDP_C___ +#define ___HMDP_C___ + +struct c_float /* Float Wrapper */ +{ + int mantisse; + short exponent; +}; + +struct c_f_hex +{ + char stri[15]; +}; + +#define C_FLOAT_LENGTH (1+8+1+2) // SMMMMMMMMSEEY Sign, Exponent, Mantisse, Y=Y +#define HMDL_MESSAGE_START ""; +/*! Header for all HMDL Messages when they are sent over the serial bus */ + +#define MAX_WLQ_DIGITS 6 +/*! Number of hex digits reserved for the Frequencies = wavelengthquarters: WLQs */ + +#define MAX_TIME_DIGITS 8 + +#define MAX_COE_DIGITS 2 +/*! Hex Digits reverved for the number of coeffieicnets */ + +#define MAX_ID_DIGITS 2 +/*! Maximal Number of Digits of the ID; Since the ID can be up to 127 this + means it is 2 */ + +#define MAX_MPS 67 +#define MAX_MPS_IN_RAM 67 +/*! Maximal numbers of Motion patterns that can be present + at one time in the SH2*/ +#define MAX_SERVOS 22 +/*! Maximal number of servos */ +#define MAX_COEFFS 11 +/*!maximal number of coefficients*/ +#define MAX_ALARM_POINTS 1 +/*! maximal number of points were the status can be readout */ + +#define TM_BUFFER_SIZE 1024 +/*! Size of the List of timer tasks, see @... commands */ + +struct motion_pattern_servo +/* Structure that contains data about the motion of one servo */ +{ + struct c_float s_position[MAX_COEFFS]; + /*struct c_float s_gain [MAX_COEFFS];*/ +}; + +struct motion_pattern_props +{ + int wlqs_top[((MAX_COEFFS - 1) / 2)]; + int wlqs_bot[((MAX_COEFFS - 1) / 2)]; + struct motion_pattern_servo sv[MAX_SERVOS]; + int ID_prop; +}; + +struct motion_pattern +/* Structure that contains all data necessary for a specific motion pattern */ +{ + struct motion_pattern_props *pp; //[1]; + struct c_float A_new; + struct c_float A_old; + // struct c_float A_curr; + unsigned long start_0, start_1, end_0, end_1,// interpolate amplitude from start_0 to start_1 + offset, // used to offset the pattern when started + offsetoverflow; // used to save the offset after the time wraps around + unsigned short updated, // pattern was changed + active; // pattern is active + +}; + +struct message_alarm_clock +{ + unsigned long alarm_time; + void (*callf)(); +}; + +typedef struct +/* all data necessary for the complete harmonic motion description + language */ +{ + unsigned long time, time_max, time_inc; + struct motion_pattern mp[MAX_MPS]; /* -> sv -> s_position */ + struct message_alarm_clock alarm[MAX_ALARM_POINTS]; + struct c_float positions_to_set[MAX_SERVOS]; + struct motion_pattern_props mpp_in_ram[MAX_MPS_IN_RAM]; + +} Hmdl; + +struct c_f_hex c_float2hex(struct c_float in); +struct c_float float2cfloat(float a); +struct c_float mult_cc(struct c_float a, struct c_float b); +// multiply 2 c_floats +struct c_float mult_ccc(struct c_float a, struct c_float b, struct c_float d); +// multiply 3 c-fs +struct c_float mult_cc_sinus(struct c_float a, struct c_float b, int d); +// multiply 2 c-fs and the output of the sine_fixed routine (d parameter) +struct c_float mult_c_sinus(struct c_float a, int d); +// multiply c-f and the output of the sine_fixed routine (d parameter) + + +struct c_float c_f_sum(struct c_float a[], int size); +// sum a list of c_floats +struct c_float hex2c_float(const char in[]); +// read a cfloat from ascii with special format +int cfloat2int(struct c_float a); +// make a cloat to int (cut behind the point = floor) +/*struct c_float cfloat2int (int a);*/ +// interpolation function +/* 1. parameter size, 2. Amplitude over all, 3. time, 4. Coeffs array of c_float, + 5. frequencies (frequency * time -> parameter to sine_fixed routines*/ + +struct c_float interpolate_rational_c_float( /*Real amplitude interpolation*/ +int size_c, struct c_float amp, int time, struct c_float coeffs[], + unsigned int frequencies_up[], + unsigned int frequencies_bottom[]); + +struct c_float interpolate_c_float(int, struct c_float, int, + struct c_float coeffs[], + unsigned int frequencies[]); + +struct c_float interpolate_c_float_phase(int, struct c_float amps[], int, + struct c_float coeffs[], + unsigned int frequencies[]); + +void eval_seq(const char in[]); +/*! input interpreter of HMDP*/ + +/* Inititalize variables, start timer, etc */ +void init_hmdl(); + +/* Clean up */ +void end_hmdl(); + +/*! Handle situtations when the time needs to wrap around since time_max has + been reached. Offset values have to be saved for the motion patterns, and + the update flag needs to be set */ +void handle_overflow(void); + +void motion_machine(unsigned int time); + +/*! motion control - time management+* + + This function is triggered by an interrupt and call the motion m... [truncated message content] |
From: <he...@us...> - 2009-07-31 20:27:58
|
Revision: 81 http://simspark.svn.sourceforge.net/simspark/?rev=81&view=rev Author: hedayat Date: 2009-07-31 20:27:41 +0000 (Fri, 31 Jul 2009) Log Message: ----------- small code cleanup NetControl: reverting to the old behaviour; the intended logic of the new changes is already implemented. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/ChangeLog 2009-07-31 20:27:41 UTC (rev 81) @@ -1,3 +1,11 @@ +2009-07-31 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/agentcontrol.cpp: + - a small cleanup + + * lib/oxygen/simulationserver/netcontrol.cpp (NetControl::ReadTCPMessages): + - reverting to the old behaviour; the intended logic is already implemented. + 2009-07-30 Hedayat Vatankhah <he...@gr...> * lib/oxygen/physicsserver/space.h (Space): Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -183,12 +183,10 @@ ++iter, idx++ ) { - if (sensesArray[idx].empty()) + if (!sensesArray[idx].empty()) { - continue; + SendClientMessage(iter->second, sensesArray[idx]); } - SendClientMessage(iter->second,sensesArray[idx]); } } - Modified: trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -64,7 +64,7 @@ string header = mMonitorServer->GetMonitorHeaderInfo(); mNetMessage->PrepareToSend(header); SendClientMessage(client->addr,header); - + shared_ptr<Scene> scene = GetActiveScene(); if (scene.get() != 0) { @@ -83,7 +83,7 @@ { return; } - + // send updates to all connected monitors if ( !mClients.empty() ) { @@ -99,7 +99,7 @@ { info = mMonitorServer->GetMonitorData(); } - + mNetMessage->PrepareToSend(info); for ( @@ -148,5 +148,3 @@ } } } - - Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -627,30 +627,14 @@ // read a fragment shared_ptr<Client>& client = (*iter).second; - - const unsigned int preSz = sizeof(unsigned int); - int nRead = 0; - int retval = 1; - while (nRead < preSz && retval > 0) - { - retval = client->socket->recv(mBuffer.get() + nRead, preSz - nRead); - nRead += retval; - } - - unsigned int len = ntohl(reinterpret_cast<unsigned int*>(mBuffer.get())[0]); + int rval = client->socket->recv(mBuffer.get(), mBufferSize); - while (nRead < preSz + len && retval > 0) - { - retval = client->socket->recv(mBuffer.get() + nRead, preSz + len - nRead); - nRead += retval; - } - - if (retval > 0) + if (rval > 0) { - StoreFragment(client->addr,nRead); + StoreFragment(client->addr,rval); } else { - if (retval <= 0) + if (rval <= 0) { GetLog()->Error() << "(NetControl) ERROR: '" << GetName() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-30 17:25:57
|
Revision: 80 http://simspark.svn.sourceforge.net/simspark/?rev=80&view=rev Author: hedayat Date: 2009-07-30 17:25:42 +0000 (Thu, 30 Jul 2009) Log Message: ----------- performance improvement: do not call dSpaceCollide() for spaces with disabled internal collision. do not output too small skipped times move PrePhysicsUpdate() call just before PhysicsUpdate() call in RunMultiThreaded() function => 1 less wait() call with no speed loss. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/physicsserver/space.cpp trunk/spark/lib/oxygen/physicsserver/space.h trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/ChangeLog 2009-07-30 17:25:42 UTC (rev 80) @@ -1,3 +1,15 @@ +2009-07-30 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/physicsserver/space.h (Space): + * lib/oxygen/physicsserver/space.cpp (Space::Collide): + - performance improvement: do not call dSpaceCollide() for spaces with + disabled internal collision. + + * lib/oxygen/simulationserver/simulationserver.cpp: + - do not output too small skipped times + - move PrePhysicsUpdate() call just before PhysicsUpdate() call in + RunMultiThreaded() function => 1 less wait() call with no speed loss. + 2009-07-29 Hedayat Vatankhah <he...@gr...> * lib/oxygen/simulationserver/simulationserver.h: Modified: trunk/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.cpp 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/physicsserver/space.cpp 2009-07-30 17:25:42 UTC (rev 80) @@ -58,9 +58,17 @@ void Space::Collide() { // bind collision callback function to this object - dSpaceCollide(mODESpace, this, collisionNearCallback); + Collide(mODESpace); } +void Space::Collide(dSpaceID space) +{ + if (gDisabledInnerCollisionSet.find(space) == gDisabledInnerCollisionSet.end()) + { + dSpaceCollide(space, this, collisionNearCallback); + } +} + void Space::HandleSpaceCollide(dGeomID obj1, dGeomID obj2) { // collide all geoms internal to the space(s) @@ -68,12 +76,12 @@ if (dGeomIsSpace (obj1)) { - dSpaceCollide ((dSpaceID)(obj1),this,&collisionNearCallback); + Collide((dSpaceID)obj1); } if (dGeomIsSpace (obj2)) { - dSpaceCollide ((dSpaceID)(obj2),this,&collisionNearCallback); + Collide((dSpaceID)obj2); } } @@ -107,16 +115,17 @@ const dSpaceID s1 = dGeomGetSpace(obj1); const dSpaceID s2 = dGeomGetSpace(obj2); - if ( - (s1 == s2) && - (gDisabledInnerCollisionSet.find(s1) != gDisabledInnerCollisionSet.end()) - ) - { - return; - } + // NOTICE: this should not happen since it is checked in Collide(dSpaceID) +// if ( +// (s1 == s2) && +// (gDisabledInnerCollisionSet.find(s1) != gDisabledInnerCollisionSet.end()) +// ) +// { +// return; +// } - - // if obj1 and obj2 are in the same space, and + + // if obj1 and obj2 are in the same space, and // obj1 is in obj2's "mNotCollideWithSet" or ojb2 is in obj1's // reject the collision Modified: trunk/spark/lib/oxygen/physicsserver/space.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.h 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/physicsserver/space.h 2009-07-30 17:25:42 UTC (rev 80) @@ -84,6 +84,11 @@ /** registers the managed space to the containing parent space */ virtual void OnLink(); + /** calls ODE's collision detection for this space if internal collision + * detection is enabled for this space. + */ + void Collide(dSpaceID space); + /** callback to handle a potential collision between two contained geoms. It will look up and notify the corresponding colliders for a potential collision. Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-30 17:25:42 UTC (rev 80) @@ -426,14 +426,13 @@ { ++mCycle; mThreadBarrier->wait(); - mSceneServer->PrePhysicsUpdate(mSimStep); mThreadBarrier->wait(); - mThreadBarrier->wait(); if (mExit) // this check should be here so that all threads will quit break; finalDelta = initDelta = mSumDeltaTime; + mSceneServer->PrePhysicsUpdate(mSimStep); mSceneServer->PhysicsUpdate(mSimStep); if (mAutoTime) AdvanceTime(mSimStep); @@ -477,8 +476,6 @@ while ( true ) { mThreadBarrier->wait(); - // wait for PrePhysicsUpdate() - mThreadBarrier->wait(); newCycle = false; if ( controlNode->GetTime() - mSimTime <= 0.005f ) { @@ -524,12 +521,16 @@ { if (mAdjustSpeed && deltaTime > mMaxStepsPerCycle * mSimStep) + { + float diff = deltaTime - mSimStep; + if (diff > 0.0001) { GetLog()->Debug() << "(SimulationServer) Warning: Skipping remaining time: " - << deltaTime - mSimStep << '\n'; - deltaTime = 0; + << diff << '\n'; } + deltaTime = 0; + } else deltaTime -= mSimStep; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-30 17:21:39
|
Revision: 79 http://simspark.svn.sourceforge.net/simspark/?rev=79&view=rev Author: hedayat Date: 2009-07-30 17:21:13 +0000 (Thu, 30 Jul 2009) Log Message: ----------- do not link plugins with spark libraries. prevents segfault for rcssmonitor3d on exit. do not setup materials when internal monitor doesn't run disable internal monitor by default Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/CMakeLists.txt trunk/rcssserver3d/plugin/soccer/CMakeLists.txt trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt trunk/rcssserver3d/simspark/naosoccersim.rb trunk/rcssserver3d/simspark/simspark.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/ChangeLog 2009-07-30 17:21:13 UTC (rev 79) @@ -1,3 +1,17 @@ +2009-07-30 Hedayat Vatankhah <he...@gr...> + + * plugin/CMakeLists.txt: + * plugin/soccer/CMakeLists.txt: + * plugin/soccermonitor/CMakeLists.txt: + - do not link plugins with spark libraries. prevents segfault for + rcssmonitor3d on exit. + + * simspark/naosoccersim.rb: + - do not setup materials when internal monitor doesn't run + + * simspark/simspark.rb: + - disable internal monitor by default + 2009-07-27 Hedayat Vatankhah <he...@gr...> * CMakeLists.txt: Modified: trunk/rcssserver3d/plugin/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/CMakeLists.txt 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/plugin/CMakeLists.txt 2009-07-30 17:21:13 UTC (rev 79) @@ -1,2 +1,7 @@ +if (WIN32 OR APPLE) + set(spark_libs ${SALT_LIBRARIES} ${OXYGEN_LIBRARIES} ${ZEITGEIST_LIBRARIES} + ${KEROSIN_LIBRARIES} ${RCSSNET3D_LIBRARY}) +endif (WIN32 OR APPLE) + add_subdirectory(soccer) add_subdirectory(soccermonitor) Modified: trunk/rcssserver3d/plugin/soccer/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/plugin/soccer/CMakeLists.txt 2009-07-30 17:21:13 UTC (rev 79) @@ -115,9 +115,7 @@ add_library(soccer MODULE ${soccer_LIB_SRCS} ${soccer_LIB_HDRS}) -target_link_libraries(soccer ${SALT_LIBRARIES} ${OXYGEN_LIBRARIES} - ${ZEITGEIST_LIBRARIES} ${KEROSIN_LIBRARIES} - ${OPENGL_gl_LIBRARY} ${RCSSNET3D_LIBRARY}) +target_link_libraries(soccer ${spark_libs} ${OPENGL_gl_LIBRARY}) if (NOT APPLE) set_target_properties(soccer PROPERTIES VERSION 1.0.0 SOVERSION 1) Modified: trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/plugin/soccermonitor/CMakeLists.txt 2009-07-30 17:21:13 UTC (rev 79) @@ -25,9 +25,7 @@ add_library(soccermonitor MODULE ${soccermonitor_LIB_SRCS} ${soccermonitor_LIB_HDRS}) -target_link_libraries(soccermonitor ${SALT_LIBRARIES} ${OXYGEN_LIBRARIES} - ${ZEITGEIST_LIBRARIES} ${KEROSIN_LIBRARIES} - ${RCSSNET3D_LIBRARY}) +target_link_libraries(soccermonitor ${spark_libs}) if (NOT APPLE) set_target_properties(soccermonitor PROPERTIES VERSION 1.0.0 SOVERSION 1) Modified: trunk/rcssserver3d/simspark/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/simspark/naosoccersim.rb 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/simspark/naosoccersim.rb 2009-07-30 17:21:13 UTC (rev 79) @@ -4,13 +4,15 @@ # setup soccer specific materials # run "scripts/rcs-materials.rb" -run "scripts/rcs-materials-textures.rb" +if ($enableInternalMonitor) + run "scripts/rcs-materials-textures.rb" + + material = sparkCreate('kerosin/Material2DTexture', $serverPath+'material/matGrass'); + material.setDiffuse(1.0,1.0,1.0,1.0) + material.setAmbient(0.5,0.5,0.5,1.0) + material.setDiffuseTexture('textures/rcs-naofield.png') +end -material = sparkCreate('kerosin/Material2DTexture', $serverPath+'material/matGrass'); -material.setDiffuse(1.0,1.0,1.0,1.0) -material.setAmbient(0.5,0.5,0.5,1.0) -material.setDiffuseTexture('textures/rcs-naofield.png') - importBundle "soccer" # soccer namespace Modified: trunk/rcssserver3d/simspark/simspark.rb =================================================================== --- trunk/rcssserver3d/simspark/simspark.rb 2009-07-29 12:18:34 UTC (rev 78) +++ trunk/rcssserver3d/simspark/simspark.rb 2009-07-30 17:21:13 UTC (rev 79) @@ -6,7 +6,7 @@ $recordLogfile = false # toggle the internal monitor -$enableInternalMonitor = true +$enableInternalMonitor = false sparkSetupServer() if ($enableInternalMonitor) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-29 12:18:49
|
Revision: 78 http://simspark.svn.sourceforge.net/simspark/?rev=78&view=rev Author: hedayat Date: 2009-07-29 12:18:34 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Server will run in multi-threaded mode by default some fixes related to multi-threaded running. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp trunk/spark/lib/oxygen/simulationserver/simulationserver.h trunk/spark/spark/spark.rb Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/ChangeLog 2009-07-29 12:18:34 UTC (rev 78) @@ -1,3 +1,12 @@ +2009-07-29 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - fixed some issues in multi-threaded code + + * spark/spark.rb: + - making multi-threaded mode the default mode for running server + 2009-07-27 Hedayat Vatankhah <he...@gr...> * lib/zeitgeist/scriptserver/scriptserver.cpp: Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-29 12:18:34 UTC (rev 78) @@ -221,7 +221,7 @@ { mSceneServer->PrePhysicsUpdate(mSimStep); mSceneServer->PhysicsUpdate(mSimStep); - UpdateDeltaTimeAfterStep(); + UpdateDeltaTimeAfterStep(mSumDeltaTime); finalStep += mSimStep; } mSceneServer->PostPhysicsUpdate(); @@ -421,28 +421,30 @@ shared_ptr<SimControlNode> renderControl = GetControlNode("RenderControl"); + float initDelta, finalDelta; while (true) { ++mCycle; mThreadBarrier->wait(); mSceneServer->PrePhysicsUpdate(mSimStep); mThreadBarrier->wait(); - mSceneServer->PhysicsUpdate(mSimStep); - if (mAutoTime) - AdvanceTime(mSimStep); - mThreadBarrier->wait(); if (mExit) // this check should be here so that all threads will quit break; + finalDelta = initDelta = mSumDeltaTime; - UpdateDeltaTimeAfterStep(); + mSceneServer->PhysicsUpdate(mSimStep); + if (mAutoTime) + AdvanceTime(mSimStep); + UpdateDeltaTimeAfterStep(finalDelta); + float finalStep = mSimStep; - while (int(mSumDeltaTime*100) >= int(mSimStep*100)) + while (int(finalDelta*100) >= int(mSimStep*100)) { mSceneServer->PhysicsUpdate(mSimStep); - UpdateDeltaTimeAfterStep(); + UpdateDeltaTimeAfterStep(finalDelta); finalStep += mSimStep; } mSceneServer->PostPhysicsUpdate(); @@ -452,6 +454,7 @@ && renderControl->GetTime() - mSimTime < 0.005f ) renderControl->EndCycle(); mThreadBarrier->wait(); + mSumDeltaTime -= initDelta - finalDelta; } // wait for threads @@ -485,14 +488,16 @@ controlNode->ActAgent(); controlNode->SetSimTime(mSimTime); } + mThreadBarrier->wait(); + if (mExit) + break; + if (isInputControl) { while (int(mSumDeltaTime*100) < int(mSimStep*100)) controlNode->StartCycle(); // advance the time } - mThreadBarrier->wait(); - if (mExit) - break; + // wait for physics update mThreadBarrier->wait(); if (!isRenderControl && newCycle) @@ -515,16 +520,16 @@ mMaxStepsPerCycle = max; } -inline void SimulationServer::UpdateDeltaTimeAfterStep() +inline void SimulationServer::UpdateDeltaTimeAfterStep(float &deltaTime) { - if (mAdjustSpeed && mSumDeltaTime > mMaxStepsPerCycle + if (mAdjustSpeed && deltaTime > mMaxStepsPerCycle * mSimStep) { GetLog()->Debug() << "(SimulationServer) Warning: Skipping remaining time: " - << mSumDeltaTime - mSimStep << '\n'; - mSumDeltaTime = 0; + << deltaTime - mSimStep << '\n'; + deltaTime = 0; } else - mSumDeltaTime -= mSimStep; + deltaTime -= mSimStep; } Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-07-29 12:18:34 UTC (rev 78) @@ -174,7 +174,7 @@ void SimControlThread(boost::shared_ptr<SimControlNode> controlNode); /** updates mSumDeltaTime after a step in descreet simulations */ - void UpdateDeltaTimeAfterStep(); + void UpdateDeltaTimeAfterStep(float &deltaTime); protected: /** the argc parameter passed to Run() */ Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/spark/spark.rb 2009-07-29 12:18:34 UTC (rev 78) @@ -279,7 +279,7 @@ simulationServer = sparkGetSimulationServer() if (simulationServer != nil) - simulationServer.setMultiThreads(false); + simulationServer.setMultiThreads(true); simulationServer.initControlNode('oxygen/AgentControl','AgentControl') # set auto speed adjust mode. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-27 09:37:14
|
Revision: 77 http://simspark.svn.sourceforge.net/simspark/?rev=77&view=rev Author: hedayat Date: 2009-07-27 09:36:56 +0000 (Mon, 27 Jul 2009) Log Message: ----------- Improved ruby 1.9.x compatibility Add command line parameters to rcssserver3d binaries. Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-07-27 07:02:56 UTC (rev 76) +++ trunk/rcssserver3d/CMakeLists.txt 2009-07-27 09:36:56 UTC (rev 77) @@ -134,9 +134,9 @@ set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") -set(CREATE_SIMSPARK_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\simspark.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe'\nFileClose \$0") -set(CREATE_MONITOR_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssmonitor3d.exe'\nFileClose \$0") -set(CREATE_AGENT_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssagent3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssagent3d.exe'\nFileClose \$0") +set(CREATE_SIMSPARK_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\simspark.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe %1 %2 %3 %4'\nFileClose \$0") +set(CREATE_MONITOR_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssmonitor3d.exe %1 %2 %3 %4'\nFileClose \$0") +set(CREATE_AGENT_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssagent3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssagent3d.exe %1 %2 %3 %4'\nFileClose \$0") set(CREATE_BATCH_FILES "${CREATE_SIMSPARK_BAT}\n${CREATE_MONITOR_BAT}\n${CREATE_AGENT_BAT}") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR' '\$INSTDIR'\n${CREATE_BATCH_FILES}") set(DELETE_BATCH_FILES "Delete '\$INSTDIR\\\\bin\\\\simspark.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssagent3d.cmd'") Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-27 07:02:56 UTC (rev 76) +++ trunk/spark/ChangeLog 2009-07-27 09:36:56 UTC (rev 77) @@ -1,5 +1,8 @@ 2009-07-27 Hedayat Vatankhah <he...@gr...> + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - improve ruby 1.9.x compatibility (using RARRAY_LEN() instead of RARRAY()->len) + * lib/salt/fileclasses.cpp (RFile::BundlePath): - use SPARK_DIR environment variable for BundlePath if available Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2009-07-27 07:02:56 UTC (rev 76) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2009-07-27 09:36:56 UTC (rev 77) @@ -44,7 +44,7 @@ void getParameterList(VALUE args, ParameterList& params) { - int argc = RARRAY(args)->len; + int argc = RARRAY_LEN(args); for (int i = 0; i<argc; ++i) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-27 07:03:05
|
Revision: 76 http://simspark.svn.sourceforge.net/simspark/?rev=76&view=rev Author: hedayat Date: 2009-07-27 07:02:56 +0000 (Mon, 27 Jul 2009) Log Message: ----------- rcssserver3d: creating .cmd batch files for running executables spark: using SPARK_DIR environment variable for detecting BundlePath if available Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/spark/ChangeLog trunk/spark/lib/salt/fileclasses.cpp Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-07-26 08:35:30 UTC (rev 75) +++ trunk/rcssserver3d/CMakeLists.txt 2009-07-27 07:02:56 UTC (rev 76) @@ -134,11 +134,13 @@ set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") -set(CREATE_BATCH_FILES "ClearErrors\nFileOpen \$0 -\$INSTDIR\\\\bin\\\\simspark.bat w\nFileWrite \$0 -'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe'\nFileClose \$0") +set(CREATE_SIMSPARK_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\simspark.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe'\nFileClose \$0") +set(CREATE_MONITOR_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssmonitor3d.exe'\nFileClose \$0") +set(CREATE_AGENT_BAT "ClearErrors\nFileOpen \$0 \$INSTDIR\\\\bin\\\\rcssagent3d.cmd w\nFileWrite \$0 'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nrcssagent3d.exe'\nFileClose \$0") +set(CREATE_BATCH_FILES "${CREATE_SIMSPARK_BAT}\n${CREATE_MONITOR_BAT}\n${CREATE_AGENT_BAT}") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR' '\$INSTDIR'\n${CREATE_BATCH_FILES}") -set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Delete '\$INSTDIR\\\\bin\\\\simspark.bat'\nDeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR'") +set(DELETE_BATCH_FILES "Delete '\$INSTDIR\\\\bin\\\\simspark.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssmonitor3d.cmd'\nDelete '\$INSTDIR\\\\bin\\\\rcssagent3d.cmd'") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${DELETE_BATCH_FILES}\nDeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR'") include(CPack) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-07-26 08:35:30 UTC (rev 75) +++ trunk/rcssserver3d/ChangeLog 2009-07-27 07:02:56 UTC (rev 76) @@ -1,3 +1,9 @@ +2009-07-27 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - create .cmd files for executables in Windows, and remove them on + uninstallation + 2009-07-26 Hedayat Vatankhah <he...@gr...> * CMakeLists.txt: Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-26 08:35:30 UTC (rev 75) +++ trunk/spark/ChangeLog 2009-07-27 07:02:56 UTC (rev 76) @@ -1,3 +1,8 @@ +2009-07-27 Hedayat Vatankhah <he...@gr...> + + * lib/salt/fileclasses.cpp (RFile::BundlePath): + - use SPARK_DIR environment variable for BundlePath if available + 2009-07-26 Hedayat Vatankhah <he...@gr...> * CMakeLists.txt: Modified: trunk/spark/lib/salt/fileclasses.cpp =================================================================== --- trunk/spark/lib/salt/fileclasses.cpp 2009-07-26 08:35:30 UTC (rev 75) +++ trunk/spark/lib/salt/fileclasses.cpp 2009-07-27 07:02:56 UTC (rev 76) @@ -21,6 +21,7 @@ #include "fileclasses.h" #include <cstring> +#include <cstdlib> #if HAVE_CONFIG_H #include <sparkconfig.h> @@ -82,6 +83,11 @@ return std::string(path) + Sep(); #endif #else + const char *envPrefix = getenv("SPARK_DIR"); + if (envPrefix) + { + return envPrefix + Sep() + "share" + Sep() + PACKAGE_NAME + Sep(); + } # ifdef PREFIX return PREFIX + Sep() + "share" + Sep() + PACKAGE_NAME + Sep(); # else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-26 08:35:38
|
Revision: 75 http://simspark.svn.sourceforge.net/simspark/?rev=75&view=rev Author: hedayat Date: 2009-07-26 08:35:30 +0000 (Sun, 26 Jul 2009) Log Message: ----------- Try to detect correct ODE flag in Windows Try to copy all required .dll files to rcssserver3d's bin/ directory Add environment variables for installation directory in NSIS installer (Windows) Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-07-24 16:59:55 UTC (rev 74) +++ trunk/rcssserver3d/CMakeLists.txt 2009-07-26 08:35:30 UTC (rev 75) @@ -85,6 +85,28 @@ install(FILES ${CMAKE_BINARY_DIR}/rcssserver3d_config.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) +if (WIN32) + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" ODEDLL "${ODE_LIBRARY}") + if (EXISTS ${ODEDLL}) + install(PROGRAMS ${ODEDLL} DESTINATION ${BINDIR}) + endif (EXISTS ${ODEDLL}) + + install(DIRECTORY "${Boost_LIBRARY_DIRS}/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") + + string(REGEX REPLACE "(.*)\\.lib" "\\1.dll" DevIL_DLL "${DevIL_LIBRARY_IL}") + if (EXISTS ${DevIL_DLL}) + install(PROGRAMS ${DevIL_DLL} DESTINATION ${BINDIR}) + endif (EXISTS ${DevIL_DLL}) + + install(DIRECTORY "${FREETYPE_INCLUDE_DIR_ft2build}/../bin/" DESTINATION ${BINDIR} + FILES_MATCHING PATTERN "*.dll") + + set(SDL_DLL "${SDL_INCLUDE_DIR}/../lib/sdl.dll") + if (EXISTS ${SDL_DLL}) + install(PROGRAMS ${SDL_DLL} DESTINATION ${BINDIR}) + endif (EXISTS ${SDL_DLL}) +endif (WIN32) ########### uninstall support ############ CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" @@ -112,6 +134,11 @@ set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") +set(CREATE_BATCH_FILES "ClearErrors\nFileOpen \$0 +\$INSTDIR\\\\bin\\\\simspark.bat w\nFileWrite \$0 +'PATH=%PATH%;%SPARK_DIR%\\\\lib\\\\simspark;%RCSSSERVER3D_DIR%\\\\lib\\\\rcssserver3d\$\\\\nsimspark.exe'\nFileClose \$0") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR' '\$INSTDIR'\n${CREATE_BATCH_FILES}") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Delete '\$INSTDIR\\\\bin\\\\simspark.bat'\nDeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'RCSSSERVER3D_DIR'") include(CPack) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-07-24 16:59:55 UTC (rev 74) +++ trunk/rcssserver3d/ChangeLog 2009-07-26 08:35:30 UTC (rev 75) @@ -1,3 +1,11 @@ +2009-07-26 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - try to find and copy all thirdparty dlls in the binary package's bin/ + directory. + - set RCSSSERVER3D_DIR environment variable when using NSIS installer + - creating simspark.bat file in windows (by the installer) + 2009-07-24 Marian Buchta <mar...@gm...> * cmake/FindBoost.cmake Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-07-24 16:59:55 UTC (rev 74) +++ trunk/spark/CMakeLists.txt 2009-07-26 08:35:30 UTC (rev 75) @@ -208,6 +208,10 @@ set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") set(CPACK_NSIS_CONTACT "sim...@li...") +#set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "Push \$INSTDIR\\\\lib\\\\${CMAKE_PROJECT_NAME}\nCall AddToPath") +#set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "Push \$INSTDIR\\\\lib\\\\${CMAKE_PROJECT_NAME}\nCall un.RemoveFromPath") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "WriteRegExpandStr HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'SPARK_DIR' '\$INSTDIR'") +set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "DeleteRegValue HKLM 'SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\\' 'SPARK_DIR'") include(CPack) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-24 16:59:55 UTC (rev 74) +++ trunk/spark/ChangeLog 2009-07-26 08:35:30 UTC (rev 75) @@ -1,3 +1,11 @@ +2009-07-26 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - set SPARK_DIR environment flag when installed using NSIS installer + + * cmake/FindODE.cmake: + - try to detect correct ODE preprocessor flag on Windows + 2009-07-24 Marian Buchta <mar...@gm...> * cmake/FindRuby.cmake Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-07-24 16:59:55 UTC (rev 74) +++ trunk/spark/cmake/FindODE.cmake 2009-07-26 08:35:30 UTC (rev 75) @@ -43,13 +43,6 @@ ENDIF("${ODE_CONFIG_RESULT}" MATCHES "^0$") ENDIF(ODE_CONFIG) - IF (ODE_EXTRA_CFLAGS) - SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") - MESSAGE(STATUS "Found additional flags for ODE: ${ODE_CFLAGS}") - ELSE (ODE_EXTRA_CFLAGS) - SET(ODE_CFLAGS CACHE STRING "Additional ODE flags") - ENDIF (ODE_EXTRA_CFLAGS) - FIND_PATH(ODE_INCLUDE_DIR ode/ode.h /usr/include /usr/local/include @@ -69,12 +62,25 @@ C:/library/ode/lib/ "C:/Program Files/ode/lib/" C:/ode/lib/ - PATH_SUFFIXES - releaselib - ReleaseDoubleDLL ReleaseDoubleLib - ReleaseSingleDLL ReleaseSingleLib + PATH_SUFFIXES + releaselib + ReleaseDoubleDLL ReleaseDoubleLib + ReleaseSingleDLL ReleaseSingleLib ) + IF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") + ELSE(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdSINGLE") + ENDIF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") + + IF (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") + MESSAGE(STATUS "Found additional flags for ODE: ${ODE_CFLAGS}") + ELSE (ODE_EXTRA_CFLAGS) + SET(ODE_CFLAGS CACHE STRING "Additional ODE flags") + ENDIF (ODE_EXTRA_CFLAGS) + IF(ODE_INCLUDE_DIR) MESSAGE(STATUS "Found ODE include dir: ${ODE_INCLUDE_DIR}") ELSE(ODE_INCLUDE_DIR) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-07-24 17:00:09
|
Revision: 74 http://simspark.svn.sourceforge.net/simspark/?rev=74&view=rev Author: marianbuchta Date: 2009-07-24 16:59:55 +0000 (Fri, 24 Jul 2009) Log Message: ----------- spark: Add include and library path for Ruby 1.8 and 1.9 (for Windows) rcssserver3d: add missing macros (Windows needed) Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/spark/ChangeLog trunk/spark/cmake/FindRuby.cmake Added Paths: ----------- trunk/rcssserver3d/cmake/FindBoost.cmake trunk/rcssserver3d/cmake/FindFreetype.cmake Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-06-25 22:34:45 UTC (rev 73) +++ trunk/rcssserver3d/ChangeLog 2009-07-24 16:59:55 UTC (rev 74) @@ -1,3 +1,9 @@ +2009-07-24 Marian Buchta <mar...@gm...> + + * cmake/FindBoost.cmake + * cmake/FindFreetype.cmake + - add missing macros (Windows needed) + 2009-06-24 Hedayat Vatankhah <he...@gr...> * NEWS: Added: trunk/rcssserver3d/cmake/FindBoost.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindBoost.cmake (rev 0) +++ trunk/rcssserver3d/cmake/FindBoost.cmake 2009-07-24 16:59:55 UTC (rev 74) @@ -0,0 +1,858 @@ +# - Try to find Boost include dirs and libraries +# Usage of this module as follows: +# +# == Using Header-Only libraries from within Boost: == +# +# find_package( Boost 1.36.0 ) +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# endif() +# +# +# == Using actual libraries from within Boost: == +# +# set(Boost_USE_STATIC_LIBS ON) +# set(Boost_USE_MULTITHREADED ON) +# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) +# +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# target_link_libraries(foo ${Boost_LIBRARIES}) +# endif() +# +# +# The components list needs to contain actual names of boost libraries only, +# such as "date_time" for "libboost_date_time". If you're using parts of +# Boost that contain header files only (e.g. foreach) you do not need to +# specify COMPONENTS. +# +# You should provide a minimum version number that should be used. If you provide this +# version number and specify the REQUIRED attribute, this module will fail if it +# can't find the specified or a later version. If you specify a version number this is +# automatically put into the considered list of version numbers and thus doesn't need +# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). +# +# NOTE for Visual Studio Users: +# Automatic linking is used on MSVC & Borland compilers by default when +# #including things in Boost. It's important to note that setting +# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, +# should you need this feature. Automatic linking typically uses static +# libraries with a few exceptions (Boost.Python is one). +# +# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for +# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example +# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS +# gets set to OFF. It is suggested you avoid automatic linking since it +# will make your application less portable. +# +# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ +# +# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for Boost. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this variable will certainly be needed +# in the future when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, +# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0 +# +# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should +# add both 1.x and 1.x.0 as shown above. Official Boost include directories +# omit the 3rd version number from include paths if it is 0 although not all +# binary Boost releases do so. +# +# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0") +# +# ============================================================================ +# +# Variables used by this module, they can change the default behaviour and need to be set +# before calling find_package: +# +# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded +# boost libraries. If not specified, defaults +# to ON. +# +# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static +# boost libraries. Defaults to OFF. +# +# Other Variables used by this module which you may want to set. +# +# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching +# the boost include directory. Please see +# the documentation above regarding this +# annoying, but necessary variable :( +# +# Boost_DEBUG Set this to TRUE to enable debugging output +# of FindBoost.cmake if you are having problems. +# Please enable this before filing any bug +# reports. +# +# Boost_COMPILER Set this to the compiler suffix used by Boost +# (e.g. "-gcc43") if FindBoods has problems finding +# the proper Boost installation +# +# These last three variables are available also as environment variables: +# +# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for +# Boost. Set this if the module has problems finding +# the proper Boost installation. +# +# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the +# module has problems finding the proper Boost installation +# +# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the +# module has problems finding the proper Boost installation +# +# Variables defined by this module: +# +# Boost_FOUND System has Boost, this means the include dir was +# found, as well as all the libraries specified in +# the COMPONENTS list. +# +# Boost_INCLUDE_DIRS Boost include directories: not cached +# +# Boost_INCLUDE_DIR This is almost the same as above, but this one is +# cached and may be modified by advanced users +# +# Boost_LIBRARIES Link these to use the Boost libraries that you +# specified: not cached +# +# Boost_LIBRARY_DIRS The path to where the Boost library files are. +# +# Boost_VERSION The version number of the boost libraries that +# have been found, same as in version.hpp from Boost +# +# Boost_LIB_VERSION The version number in filename form as +# it's appended to the library filenames +# +# Boost_MAJOR_VERSION major version number of boost +# Boost_MINOR_VERSION minor version number of boost +# Boost_SUBMINOR_VERSION subminor version number of boost +# +# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call +# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS}) +# to have diagnostic information about Boost's +# automatic linking outputted during compilation time. +# +# For each component you list the following variables are set. +# ATTENTION: The component names need to be in lower case, just as the boost +# library names however the CMake variables use upper case for the component +# part. So you'd get Boost_SERIALIZATION_FOUND for example. +# +# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. +# Boost_${COMPONENT}_LIBRARY The absolute path of the Boost library "component". +# Boost_${COMPONENT}_LIBRARY_DEBUG The absolute path of the debug version of the +# Boost library "component". +# Boost_${COMPONENT}_LIBRARY_RELEASE The absolute path of the release version of the +# Boost library "component" +# +# Copyright (c) 2006-2008 Andreas Schneider <ma...@cy...> +# Copyright (c) 2007 Wengo +# Copyright (c) 2007 Mike Jackson +# Copyright (c) 2008 Andreas Pakulat <ap...@gm...> +# +# Redistribution AND use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +IF(NOT DEFINED Boost_USE_MULTITHREADED) + SET(Boost_USE_MULTITHREADED TRUE) +ENDIF() + +if(Boost_FIND_VERSION_EXACT) + # The version may appear in a directory with or without the patch + # level, even when the patch level is non-zero. + set(_boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") +else(Boost_FIND_VERSION_EXACT) + # The user has not requested an exact version. Among known + # versions, find those that are acceptable to the user request. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.38.0" "1.38" "1.37.0" "1.37" + "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" + "1.34" "1.33.1" "1.33.0" "1.33") + set(_boost_TEST_VERSIONS) + if(Boost_FIND_VERSION) + set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + # Select acceptable versions. + foreach(version ${_Boost_KNOWN_VERSIONS}) + if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") + # This version is high enough. + list(APPEND _boost_TEST_VERSIONS "${version}") + elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") + # This version is a short-form for the requested version with + # the patch level dropped. + list(APPEND _boost_TEST_VERSIONS "${version}") + endif() + endforeach(version) + else(Boost_FIND_VERSION) + # Any version is acceptable. + set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") + endif(Boost_FIND_VERSION) +endif(Boost_FIND_VERSION_EXACT) + +# The reason that we failed to find Boost. This will be set to a +# user-friendly message when we fail to find some necessary piece of +# Boost. +set(Boost_ERROR_REASON) + +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +######################################################################### + +MACRO (_Boost_ADJUST_LIB_VARS basename) + IF (Boost_INCLUDE_DIR ) + IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + + # if only the release version was found, set the debug variable also to the release version + IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) + ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + + IF (Boost_${basename}_LIBRARY) + set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + + # Remove superfluous "debug" / "optimized" keywords from + # Boost_LIBRARY_DIRS + FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) + GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) + LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) + ENDFOREACH() + LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) + + set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") + ENDIF (Boost_${basename}_LIBRARY) + + ENDIF (Boost_INCLUDE_DIR ) + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( + Boost_${basename}_LIBRARY + Boost_${basename}_LIBRARY_RELEASE + Boost_${basename}_LIBRARY_DEBUG + ) +ENDMACRO (_Boost_ADJUST_LIB_VARS) + +# +# Runs compiler with "-dumpversion" and parses major/minor +# version with a regex. +# +FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) + + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + + SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) +ENDFUNCTION() + + +#------------------------------------------------------------------------------- + + +SET( _boost_IN_CACHE TRUE) +IF(Boost_INCLUDE_DIR) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( _boost_IN_CACHE FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) +ELSE(Boost_INCLUDE_DIR) + SET( _boost_IN_CACHE FALSE) +ENDIF(Boost_INCLUDE_DIR) + +IF (_boost_IN_CACHE) + # in cache already + SET(Boost_FOUND TRUE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) + ENDFOREACH(COMPONENT) + SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) + IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " + "is already in the cache. For debugging messages, please clear the cache.") + endif() +ELSE (_boost_IN_CACHE) + # Need to search for boost + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost not in cache") + # Output some of their choices + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") + endif() + + IF(WIN32) + # In windows, automatic linking is performed, so you do not have + # to specify the libraries. If you are linking to a dynamic + # runtime, then you can choose to link to either a static or a + # dynamic Boost library, the default is to do a static link. You + # can alter this for a specific library "whatever" by defining + # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be + # linked dynamically. Alternatively you can force all Boost + # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. + + # This feature can be disabled for Boost library "whatever" by + # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining + # BOOST_ALL_NO_LIB. + + # If you want to observe which libraries are being linked against + # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking + # code to emit a #pragma message each time a library is selected + # for linking. + SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS + "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") + ENDIF(WIN32) + + SET(_boost_INCLUDE_SEARCH_DIRS + C:/boost/include + C:/boost + "$ENV{ProgramFiles}/boost" + C:/library/boost + "C:/Program Files/boost" + /sw/local/include + ) + + # If BOOST_ROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOST_ROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + + # If BOOSTROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOSTROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + + # If BOOST_INCLUDEDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) + ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + + # If BOOST_LIBRARYDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) + ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) + ENDIF( BOOST_ROOT ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Declared as CMake or Environmental Variables:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_ROOT = ${BOOST_ROOT}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + endif() + + IF( BOOST_ROOT ) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_ROOT}/include + ${BOOST_ROOT} + ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_INCLUDEDIR ) + file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_INCLUDEDIR ) + + # ------------------------------------------------------------------------ + # Search for Boost include DIR + # ------------------------------------------------------------------------ + # Try to find Boost by stepping backwards through the Boost versions + # we know about. + IF( NOT Boost_INCLUDE_DIR ) + # Build a list of path suffixes for each version. + SET(_boost_PATH_SUFFIXES) + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + # Add in a path suffix, based on the required version, ideally + # we could read this from version.hpp, but for that to work we'd + # need to know the include dir already + set(_boost_BOOSTIFIED_VERSION) + + # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 + IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ENDIF() + + list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") + if(WIN32) + # For BoostPro's underscores (and others?) + list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") + endif() + + ENDFOREACH(_boost_VER) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Include debugging info:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") + endif() + + # Look for a standard boost header file. + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + HINTS ${_boost_INCLUDE_SEARCH_DIRS} + PATH_SUFFIXES ${_boost_PATH_SUFFIXES} + ) + ENDIF( NOT Boost_INCLUDE_DIR ) + + # ------------------------------------------------------------------------ + # Extract version information from version.hpp + # ------------------------------------------------------------------------ + + IF(Boost_INCLUDE_DIR) + # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp + # Read the whole file: + # + SET(BOOST_VERSION 0) + SET(BOOST_LIB_VERSION "") + FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") + endif() + + STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + + SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") + SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") + + IF(NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") + ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "version.hpp reveals boost " + "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + endif() + ELSE(Boost_INCLUDE_DIR) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") + ENDIF(Boost_INCLUDE_DIR) + + # ------------------------------------------------------------------------ + # Suffix initialization and compiler suffix detection. + # ------------------------------------------------------------------------ + + # Setting some more suffixes for the library + SET (Boost_LIB_PREFIX "") + if ( MSVC AND Boost_USE_STATIC_LIBS ) + SET (Boost_LIB_PREFIX "lib") + endif() + + if (Boost_COMPILER) + set(_boost_COMPILER ${Boost_COMPILER}) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "using user-specified Boost_COMPILER = ${_boost_COMPILER}") + endif() + else(Boost_COMPILER) + # Attempt to guess the compiler suffix + # NOTE: this is not perfect yet, if you experience any issues + # please report them and use the Boost_COMPILER variable + # to work around the problems. + if (MSVC90) + SET (_boost_COMPILER "-vc90") + elseif (MSVC80) + SET (_boost_COMPILER "-vc80") + elseif (MSVC71) + SET (_boost_COMPILER "-vc71") + elseif (MSVC70) # Good luck! + SET (_boost_COMPILER "-vc7") # yes, this is correct + elseif (MSVC60) # Good luck! + SET (_boost_COMPILER "-vc6") # yes, this is correct + elseif (BORLAND) + SET (_boost_COMPILER "-bcb") + elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + if(WIN32) + set (_boost_COMPILER "-iw") + else() + set (_boost_COMPILER "-il") + endif() + elseif (MINGW) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + endif() + elseif (UNIX) + if (CMAKE_COMPILER_IS_GNUCXX) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + # Determine which version of GCC we have. + IF(APPLE) + IF(Boost_MINOR_VERSION) + IF(${Boost_MINOR_VERSION} GREATER 35) + # In Boost 1.36.0 and newer, the mangled compiler name used + # on Mac OS X/Darwin is "xgcc". + SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") + ELSE(${Boost_MINOR_VERSION} GREATER 35) + # In Boost <= 1.35.0, there is no mangled compiler name for + # the Mac OS X/Darwin version of GCC. + SET(_boost_COMPILER "") + ENDIF(${Boost_MINOR_VERSION} GREATER 35) + ELSE(Boost_MINOR_VERSION) + # We don't know the Boost version, so assume it's + # pre-1.36.0. + SET(_boost_COMPILER "") + ENDIF(Boost_MINOR_VERSION) + ELSE() + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF() + endif() + endif (CMAKE_COMPILER_IS_GNUCXX) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "guessed _boost_COMPILER = ${_boost_COMPILER}") + endif() + endif(Boost_COMPILER) + + SET (_boost_MULTITHREADED "-mt") + if( NOT Boost_USE_MULTITHREADED ) + set (_boost_MULTITHREADED "") + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") + endif() + + SET( _boost_STATIC_TAG "") + set( _boost_ABI_TAG "") + IF (WIN32) + IF(MSVC) + SET (_boost_ABI_TAG "g") + ENDIF(MSVC) + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_STATIC_TAG "-s") + ENDIF( Boost_USE_STATIC_LIBS ) + ENDIF(WIN32) + SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_STATIC_TAG = ${_boost_STATIC_TAG}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_ABI_TAG = ${_boost_ABI_TAG}") + endif() + + # ------------------------------------------------------------------------ + # Begin finding boost libraries + # ------------------------------------------------------------------------ + + SET(_boost_LIBRARIES_SEARCH_DIRS + C:/boost/lib + C:/boost + "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" + "$ENV{ProgramFiles}/boost" + C:/library/boost/stage/lib + "C:/Program Files/boost/stage/lib" + C:/boost/lib + /sw/local/lib + ) + IF( BOOST_ROOT ) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_ROOT}/lib + ${BOOST_ROOT}/stage/lib + ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_LIBRARYDIR ) + file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_LIBRARYDIR ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}") + endif() + + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) + SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") + + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + IF(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ELSE(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF(WIN32) + ENDIF( Boost_USE_STATIC_LIBS ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) + IF( Boost_USE_STATIC_LIBS ) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF( Boost_USE_STATIC_LIBS ) + ENDFOREACH(COMPONENT) + # ------------------------------------------------------------------------ + # End finding boost libraries + # ------------------------------------------------------------------------ + + SET(Boost_INCLUDE_DIRS + ${Boost_INCLUDE_DIR} + ) + + SET(Boost_FOUND FALSE) + IF(Boost_INCLUDE_DIR) + SET( Boost_FOUND TRUE ) + + # Check the version of Boost against the requested version. + if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") + endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + + if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + # If the user requested an exact version of Boost, check + # that. We already know that the Boost version we have is >= the + # requested version. + set(_Boost_VERSION_AGE "new") + + # If the user didn't specify a patchlevel, it's 0. + if (NOT Boost_FIND_VERSION_PATCH) + set(Boost_FIND_VERSION_PATCH 0) + endif (NOT Boost_FIND_VERSION_PATCH) + + # We'll set Boost_FOUND true again if we have an exact version match. + set(Boost_FOUND FALSE) + if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND TRUE ) + endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + + if(NOT Boost_FOUND) + # State that we found a version of Boost that is too new or too old. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + if (Boost_FIND_VERSION_PATCH) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") + endif (Boost_FIND_VERSION_PATCH) + if (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") + endif (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") + endif (NOT Boost_FOUND) + + if (Boost_FOUND) + set(_boost_CHECKED_COMPONENT FALSE) + set(_Boost_MISSING_COMPONENTS) + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} COMPONENT) + set(_boost_CHECKED_COMPONENT TRUE) + if(NOT Boost_${COMPONENT}_FOUND) + string(TOLOWER ${COMPONENT} COMPONENT) + list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) + set( Boost_FOUND FALSE) + endif(NOT Boost_${COMPONENT}_FOUND) + endforeach(COMPONENT) + endif (Boost_FOUND) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") + endif() + + if (_Boost_MISSING_COMPONENTS) + # We were unable to find some libraries, so generate a sensible + # error message that lists the libraries we were unable to find. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") + foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON} boost_${COMPONENT}\n") + endforeach(COMPONENT) + + list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) + list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) + if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + endif (_Boost_MISSING_COMPONENTS) + + IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + # Compatibility Code for backwards compatibility with CMake + # 2.4's FindBoost module. + + # Look for the boost library path. + # Note that the user may not have installed any libraries + # so it is quite possible the Boost_LIBRARY_PATH may not exist. + SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) + + IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + + IF("${_boost_LIB_DIR}" MATCHES "/include$") + # Strip off the trailing "/include" in the path. + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") + + IF(EXISTS "${_boost_LIB_DIR}/lib") + SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/lib") + IF(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR "") + ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") + ENDIF(EXISTS "${_boost_LIB_DIR}/lib") + + IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") + ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + + ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + + ELSE(Boost_INCLUDE_DIR) + SET( Boost_FOUND FALSE) + ENDIF(Boost_INCLUDE_DIR) + + IF (Boost_FOUND) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + ENDIF(NOT Boost_FIND_QUIETLY) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Found the following Boost libraries:") + ENDIF(NOT Boost_FIND_QUIETLY) + FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) + STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) + IF ( Boost_${UPPERCOMPONENT}_FOUND ) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE (STATUS " ${COMPONENT}") + ENDIF(NOT Boost_FIND_QUIETLY) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) + ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) + ENDFOREACH(COMPONENT) + ELSE (Boost_FOUND) + IF (Boost_FIND_REQUIRED) + message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") + ENDIF(Boost_FIND_REQUIRED) + ENDIF(Boost_FOUND) + + # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view + MARK_AS_ADVANCED(Boost_INCLUDE_DIR + Boost_INCLUDE_DIRS + Boost_LIBRARY_DIRS + ) +ENDIF(_boost_IN_CACHE) + Added: trunk/rcssserver3d/cmake/FindFreetype.cmake =================================================================== --- trunk/rcssserver3d/cmake/FindFreetype.cmake (rev 0) +++ trunk/rcssserver3d/cmake/FindFreetype.cmake 2009-07-24 16:59:55 UTC (rev 74) @@ -0,0 +1,91 @@ +# - Locate FreeType library +# This module defines +# FREETYPE_LIBRARIES, the library to link against +# FREETYPE_FOUND, if false, do not try to link to FREETYPE +# FREETYPE_INCLUDE_DIRS, where to find headers. +# This is the concatenation of the paths: +# FREETYPE_INCLUDE_DIR_ft2build +# FREETYPE_INCLUDE_DIR_freetype2 +# +# $FREETYPE_DIR is an environment variable that would +# correspond to the ./configure --prefix=$FREETYPE_DIR +# used in building FREETYPE. + +# Created by Eric Wing. +# Modifications by Alexander Neundorf. +# This file has been renamed to "FindFreetype.cmake" instead of the correct +# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. + +# Ugh, FreeType seems to use some #include trickery which +# makes this harder than it should be. It looks like they +# put ft2build.h in a common/easier-to-find location which +# then contains a #include to a more specific header in a +# more specific location (#include <freetype/config/ftheader.h>). +# Then from there, they need to set a bunch of #define's +# so you can do something like: +# #include FT_FREETYPE_H +# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES() +# wants explicit full paths and this trickery doesn't work too well. +# I'm going to attempt to cut out the middleman and hope +# everything still works. +FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + HINTS + $ENV{FREETYPE_DIR} + PATH_SUFFIXES include + PATHS + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include + C:/library/GnuWin32/include + "C:/Program Files/GnuWin32/include" + C:/GnuWin32/include +) + +FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + HINTS + $ENV{FREETYPE_DIR}/include/freetype2 + PATHS + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include + C:/library/GnuWin32/include/freetype2 + "C:/Program Files/GnuWin32/include/freetype2" + C:/GnuWin32/include/freetype2 + PATH_SUFFIXES freetype2 +) + +FIND_LIBRARY(FREETYPE_LIBRARY + NAMES freetype libfreetype freetype219 + HINTS + $ENV{FREETYPE_DIR} + PATH_SUFFIXES lib64 lib + PATHS + /usr/local/X11R6 + /usr/local/X11 + /usr/X11 + /sw + /usr/freeware + C:/library/GnuWin32/lib + "C:/Program Files/GnuWin32/lib" + C:/GnuWin32/lib +) + +# set the user variables +IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) + SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") +ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) +SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) + + +MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) \ No newline at end of file Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-06-25 22:34:45 UTC (rev 73) +++ trunk/spark/ChangeLog 2009-07-24 16:59:55 UTC (rev 74) @@ -1,3 +1,8 @@ +2009-07-24 Marian Buchta <mar...@gm...> + + * cmake/FindRuby.cmake + - Add include and library path for Ruby 1.8 and 1.9 (for Windows) + 2009-06-24 Hedayat Vatankhah <he...@gr...> * NEWS: Modified: trunk/spark/cmake/FindRuby.cmake =================================================================== --- trunk/spark/cmake/FindRuby.cmake 2009-06-25 22:34:45 UTC (rev 73) +++ trunk/spark/cmake/FindRuby.cmake 2009-07-24 16:59:55 UTC (rev 74) @@ -75,13 +75,17 @@ PATHS ${RUBY_ARCH_DIR} ${RUBY_HDR_DIR} - /usr/lib/ruby/1.8/i586-linux-gnu/ ) + /usr/lib/ruby/1.8/i586-linux-gnu/ + C:/library/ruby/lib/ruby/1.8/i386-mswin32/ + C:/library/ruby/include/ruby-1.9.1/ + ) # search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix FIND_LIBRARY(RUBY_LIBRARY NAMES ruby ruby1.8 ruby1.9 - msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby18-static msvcrt-ruby19-static + msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby191 msvcrt-ruby18-static msvcrt-ruby19-static msvcrt-ruby191-static PATHS ${RUBY_POSSIBLE_LIB_DIR} + C:/library/ruby/lib/ ) set(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_PATH} ${RUBY_ARCH_DIR} "${RUBY_INCLUDE_PATH}/i386-mswin32") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-06-25 22:34:47
|
Revision: 73 http://simspark.svn.sourceforge.net/simspark/?rev=73&view=rev Author: hedayat Date: 2009-06-25 22:34:45 +0000 (Thu, 25 Jun 2009) Log Message: ----------- rcssserver3d-0.6.2 release Added Paths: ----------- tags/RCSSSERVER3D_0.6.2_RELEASE/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-06-25 22:31:22
|
Revision: 72 http://simspark.svn.sourceforge.net/simspark/?rev=72&view=rev Author: hedayat Date: 2009-06-25 22:31:15 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Tagging simspark-0.1.1 release Added Paths: ----------- tags/SIMSPARK_0.1.1_RELEASE/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-06-24 19:25:39
|
Revision: 71 http://simspark.svn.sourceforge.net/simspark/?rev=71&view=rev Author: hedayat Date: 2009-06-24 19:25:36 +0000 (Wed, 24 Jun 2009) Log Message: ----------- Preparing for simspark 0.1.1 and rcssserver3d 0.6.2 release. Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/NEWS trunk/rcssserver3d/RELEASE trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/NEWS trunk/spark/RELEASE Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/rcssserver3d/CMakeLists.txt 2009-06-24 19:25:36 UTC (rev 71) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(rcssserver3d CXX C) -set(PACKAGE_VERSION "0.6.1") +set(PACKAGE_VERSION "0.6.2") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/rcssserver3d/ChangeLog 2009-06-24 19:25:36 UTC (rev 71) @@ -1,5 +1,9 @@ 2009-06-24 Hedayat Vatankhah <he...@gr...> + * NEWS: + * RELEASE: + - prepared for 0.6.2 release + * simspark/main.cpp: - simspark.rb path should be given using "--script-path" option. - add the new option to --help output Modified: trunk/rcssserver3d/NEWS =================================================================== --- trunk/rcssserver3d/NEWS 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/rcssserver3d/NEWS 2009-06-24 19:25:36 UTC (rev 71) @@ -1,3 +1,15 @@ +[0.6.2] +This release is mainly a bug-fix release, and is the last release before +RoboCup 2009 competitions. + +* Some improvements: + - improved Windows and MacOSX support + - improved external monitor + - fixed a bug in rcssserver3d's goal counting + - added right kick-off key to the monitor (Simon Raffeiner) + - simspark can take command line argument specifying the rb script to run + (using --script-path command line option) + [0.6.1] This is the first release of the simulator after RoboCup 2008 competitions, and the first release of rcssserver3d package as a separate package which Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/rcssserver3d/RELEASE 2009-06-24 19:25:36 UTC (rev 71) @@ -1,31 +1,15 @@ -RELEASE News of rcssserver3d-0.6.1 +RELEASE News of rcssserver3d-0.6.2 -This is the first release of the simulator after RoboCup 2008 competitions, -and the first release of rcssserver3d package as a separate package which -uses simspark package to implement a hunamoid soccer simulation environment. -In this version of the simulator, restricted vision perceptor is enabled again, -and is going to be used in 2009 competitions. You can read more about this -perceptor in 0.5.9 NEWS section. -Finally, we do not use autotools for our build system anymore. You should use -CMake (version 2.6) to build the package. See INSTALL for further installation -instructions. +This release is mainly a bug-fix release, and is the last release before +RoboCup 2009 competitions. -* Restricted Vision: - - restricted vision perceptor is installed on Nao. +* Some improvements: + - improved Windows and MacOSX support + - improved external monitor + - fixed a bug in rcssserver3d's goal counting + - added right kick-off key to the monitor (Simon Raffeiner) + - simspark can take command line argument specifying the rb script to run + (using --script-path command line option) -* New requirements for building the pacakge: - - You'll need CMake 2.6 to configure and build the package - - this package depends on simspark package, so you should install it first - -* New program names: - - agentspark is now called rcssagent3d - - monitorspark is now called rcssmonitor3d - -* Some small enhancements and bug fixes - -For details have a look into the ChangeLog coming with the package. (But some -changes are not documented in the new ChangeLog file, you can investigate the -old ChangeLog file in sserver CVS repository for more information). - You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/spark/CMakeLists.txt 2009-06-24 19:25:36 UTC (rev 71) @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) -set(PACKAGE_VERSION "0.1") +set(PACKAGE_VERSION "0.1.1") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/spark/ChangeLog 2009-06-24 19:25:36 UTC (rev 71) @@ -1,8 +1,12 @@ 2009-06-24 Hedayat Vatankhah <he...@gr...> + * NEWS: + * RELEASE: + - prepared for 0.1.1 release + * lib/oxygen/simulationserver/agentcontrol.cpp: - Sending senses to agents after generating all senses, to be (hopefully!) a - bit more fare to agents. + bit more fare to agents. 2009-06-15 Sander van Dijk <sgv...@gm...> Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/spark/NEWS 2009-06-24 19:25:36 UTC (rev 71) @@ -1,3 +1,11 @@ +[0.1.1] +This release is mainly a bug-fix release, and is the last release before +RoboCup 2009 competitions. It is not much different from version 0.1. +Main changes are: + - improved MacOSX and Windows support + - compilation fixes for latest library versions + - more reliable and a bit more fair network communication with the agents + [0.1] This is the first release of the simulator after RoboCup 2008 competitions, and the first release of simspark core simulation package as a separate Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2009-06-23 20:54:09 UTC (rev 70) +++ trunk/spark/RELEASE 2009-06-24 19:25:36 UTC (rev 71) @@ -1,18 +1,11 @@ -RELEASE News of simspark-0.1 +RELEASE News of simspark-0.1.1 -This is the first release of the simulator after RoboCup 2008 competitions, -and the first release of simspark core simulation package as a separate -package. -In this release, MaxStepsPerCycle have been reduced to 1, so the simulation -time spent in each cycle is fixed. As a result, the performance of the agents -should not depend on the simulator speed, and they should be able to sense/act -in fixed simulation time steps. -This package provides a generic simulation framework and does not contain any -soccer features. To use the soccer simulator, you should install rcssserver3d -package which depends on this package. -Also, we do not use autotools for our build system anymore. You should use -CMake (version 2.6) to build the package. See INSTALL for further installation -instructions. +This release is mainly a bugfix release, and is the last release before +RoboCup 2009 competitions. +Main changes are: + - improved MacOSX and Windows support + - compilation fixes for latest library versions + - more reliable and a bit more fair network communication with the agents You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-06-23 20:54:11
|
Revision: 70 http://simspark.svn.sourceforge.net/simspark/?rev=70&view=rev Author: hedayat Date: 2009-06-23 20:54:09 +0000 (Tue, 23 Jun 2009) Log Message: ----------- Sending all senses after generating all of them. Added --script-path option to specifying the startup script Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/simspark/main.cpp trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-06-16 09:53:55 UTC (rev 69) +++ trunk/rcssserver3d/ChangeLog 2009-06-23 20:54:09 UTC (rev 70) @@ -1,3 +1,9 @@ +2009-06-24 Hedayat Vatankhah <he...@gr...> + + * simspark/main.cpp: + - simspark.rb path should be given using "--script-path" option. + - add the new option to --help output + 2009-06-16 Sander van Dijk <sgv...@gm...> * simspark/main.cpp Modified: trunk/rcssserver3d/simspark/main.cpp =================================================================== --- trunk/rcssserver3d/simspark/main.cpp 2009-06-16 09:53:55 UTC (rev 69) +++ trunk/rcssserver3d/simspark/main.cpp 2009-06-23 20:54:09 UTC (rev 70) @@ -82,23 +82,33 @@ GetLog()->Normal() << "\nusage: simspark [options] [script]\n" << "\noptions:\n" - << " --help\t print this message.\n" + << " --help\t\t\t print this message.\n" + << " --script-path PATH\t set the script path (simspark.rb path).\n" << "\n"; } bool SimSpark::ProcessCmdLine(int argc, char* argv[]) { - if(argc == 1) - return true; + for( int i = 1; i < argc; i++) + { + if(strcmp( argv[1], "--help" ) == 0) + { + PrintHelp(); + return false; + } + else if(strcmp(argv[i], "--script-path") == 0) + { + i++; + if (i < argc) + mScriptPath = argv[i]; + else + { + PrintHelp(); + return false; + } + } + } - if(argc > 2 || strcmp( argv[0], "--help" ) == 0) - { - PrintHelp(); - return false; - } - - mScriptPath = argv[1]; - return true; } Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-06-16 09:53:55 UTC (rev 69) +++ trunk/spark/ChangeLog 2009-06-23 20:54:09 UTC (rev 70) @@ -1,3 +1,9 @@ +2009-06-24 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/agentcontrol.cpp: + - Sending senses to agents after generating all senses, to be (hopefully!) a + bit more fare to agents. + 2009-06-15 Sander van Dijk <sgv...@gm...> * lib/oxygen/simulationserver/netcontrol.cpp Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-06-16 09:53:55 UTC (rev 69) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-06-23 20:54:09 UTC (rev 70) @@ -148,10 +148,12 @@ // generate senses for all agents and send them to the // corresponding net clients + int idx = 0; + vector<string> sensesArray(mClients.size()); for ( TAddrMap::iterator iter = mClients.begin(); iter != mClients.end(); - ++iter + ++iter, idx++ ) { shared_ptr<Client>& client = (*iter).second; @@ -164,14 +166,29 @@ } shared_ptr<PredicateList> senseList = agent->QueryPerceptors(); - string senses = parser->Generate(senseList); - if (senses.empty()) + sensesArray[idx] = parser->Generate(senseList); + if (sensesArray[idx].empty()) { continue; } - mNetMessage->PrepareToSend(senses); - SendClientMessage(client,senses); + mNetMessage->PrepareToSend(sensesArray[idx]); } + + // sending the senses + idx = 0; + for ( + TAddrMap::iterator iter = mClients.begin(); + iter != mClients.end(); + ++iter, idx++ + ) + { + if (sensesArray[idx].empty()) + { + continue; + } + + SendClientMessage(iter->second,sensesArray[idx]); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-06-16 09:54:57
|
Revision: 69 http://simspark.svn.sourceforge.net/simspark/?rev=69&view=rev Author: sgvandijk Date: 2009-06-16 09:53:55 +0000 (Tue, 16 Jun 2009) Log Message: ----------- - simspark can take command line argument specifying the rb script to run (Simon Raffeiner) - new soccer input command to give kick-off to the team on the right (bound to 'j') (Simon Raffeiner) Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/plugin/soccermonitor/soccerinput.cpp trunk/rcssserver3d/plugin/soccermonitor/soccerinput.h trunk/rcssserver3d/rcssmonitor3d/soccerbindings.rb trunk/rcssserver3d/simspark/main.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-06-15 15:08:14 UTC (rev 68) +++ trunk/rcssserver3d/ChangeLog 2009-06-16 09:53:55 UTC (rev 69) @@ -1,3 +1,15 @@ +2009-06-16 Sander van Dijk <sgv...@gm...> + + * simspark/main.cpp + - simspark can take command line argument specifying the rb script to run + (Simon Raffeiner) + + * plugin/soccermonitor/soccerinput.cpp + * plugin/soccermonitor/soccerinput.h + * rcssmonitor3d/soccerbindings.rb + - new soccer input command to give kick-off to the team on the right (bound + to 'j') (Simon Raffeiner) + 2009-06-15 Sander van Dijk <sgv...@gm...> * plugin/soccer/ballstateaspect/ballstateaspect.h Modified: trunk/rcssserver3d/plugin/soccermonitor/soccerinput.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccermonitor/soccerinput.cpp 2009-06-15 15:08:14 UTC (rev 68) +++ trunk/rcssserver3d/plugin/soccermonitor/soccerinput.cpp 2009-06-16 09:53:55 UTC (rev 69) @@ -42,6 +42,7 @@ { shared_ptr<ScriptServer> scriptServer = GetCore()->GetScriptServer(); scriptServer->CreateVariable("Command.KickOff", CmdKickOff); + scriptServer->CreateVariable("Command.KickOffRight", CmdKickOffRight); scriptServer->CreateVariable("Command.MoveAgent", CmdMoveAgent); scriptServer->CreateVariable("Command.DropBall", CmdDropBall); scriptServer->CreateVariable("Command.ShootBall", CmdShootBall); @@ -131,6 +132,13 @@ SendCommand("(kickOff Left)"); } break; + case CmdKickOffRight: + if (input.GetKeyPress()) + { + SendCommand("(kickOff Right)"); + } + break; + case CmdMoveAgent: if (input.GetKeyPress()) { Modified: trunk/rcssserver3d/plugin/soccermonitor/soccerinput.h =================================================================== --- trunk/rcssserver3d/plugin/soccermonitor/soccerinput.h 2009-06-15 15:08:14 UTC (rev 68) +++ trunk/rcssserver3d/plugin/soccermonitor/soccerinput.h 2009-06-16 09:53:55 UTC (rev 69) @@ -37,7 +37,8 @@ { CmdUser = kerosin::InputControl::CmdUser, CmdKickOff = CmdUser + 1, - CmdMoveAgent = CmdKickOff + 1, + CmdKickOffRight = CmdKickOff + 1, + CmdMoveAgent = CmdKickOffRight + 1, CmdDropBall = CmdMoveAgent + 1, CmdShootBall = CmdDropBall + 1, CmdMoveBall = CmdShootBall + 1, Modified: trunk/rcssserver3d/rcssmonitor3d/soccerbindings.rb =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/soccerbindings.rb 2009-06-15 15:08:14 UTC (rev 68) +++ trunk/rcssserver3d/rcssmonitor3d/soccerbindings.rb 2009-06-16 09:53:55 UTC (rev 69) @@ -25,6 +25,7 @@ else print "setting bindings for online monitor\n\n"; inputServer.bindCommand('k', Command.KickOff); + inputServer.bindCommand('j', Command.KickOffRight); inputServer.bindCommand('b', Command.DropBall); inputServer.bindCommand('m', Command.MoveAgent); inputServer.bindCommand('n', Command.ShootBall); Modified: trunk/rcssserver3d/simspark/main.cpp =================================================================== --- trunk/rcssserver3d/simspark/main.cpp 2009-06-15 15:08:14 UTC (rev 68) +++ trunk/rcssserver3d/simspark/main.cpp 2009-06-16 09:53:55 UTC (rev 69) @@ -46,7 +46,8 @@ { public: SimSpark(const std::string& relPathPrefix) : - Spark(relPathPrefix) + Spark(relPathPrefix), + mScriptPath("simspark.rb") {}; /** called once after Spark finished it's init */ @@ -60,15 +61,18 @@ /** process command line options */ bool ProcessCmdLine(int argc, char* argv[]); + +private: + std::string mScriptPath; }; void SimSpark::PrintGreeting() { GetLog()->Normal() - << "simspark, a monolithic simulator 0.1\n" + << "simspark, a monolithic simulator 0.6.1\n" << "Copyright (C) 2004 Markus Rollmann, \n" - << "Universit�t Koblenz.\n" - << "Copyright (C) 2004, " + << "Universität Koblenz.\n" + << "Copyright (C) 2004-2009, " << "The RoboCup Soccer Server Maintenance Group.\n" << "\nType '--help' for further information\n\n"; } @@ -76,24 +80,26 @@ void SimSpark::PrintHelp() { GetLog()->Normal() - << "\nusage: simspark [options]\n" - << "\noptions:\n" - << " --help\t print this message.\n" - << "\n"; + << "\nusage: simspark [options] [script]\n" + << "\noptions:\n" + << " --help\t print this message.\n" + << "\n"; } bool SimSpark::ProcessCmdLine(int argc, char* argv[]) { - for( int i = 0; i < argc; i++) + if(argc == 1) + return true; + + if(argc > 2 || strcmp( argv[0], "--help" ) == 0) { - if( strcmp( argv[i], "--help" ) == 0 ) - { - PrintHelp(); - return false; - } + PrintHelp(); + return false; } - return true; + mScriptPath = argv[1]; + + return true; } bool SimSpark::InitApp(int argc, char** argv) @@ -104,19 +110,19 @@ // process command line if (! ProcessCmdLine(argc, argv)) - { - return false; - } + { + return false; + } // run initialization scripts - GetScriptServer()->Run("simspark.rb"); + GetScriptServer()->Run(mScriptPath); // tell the inputControl node the loaction of our camera shared_ptr<InputControl> inputCtr = GetInputControl(); if (inputCtr.get() != 0) - { - inputCtr->SetFPSController("/usr/scene/camera/physics/controller"); - } + { + inputCtr->SetFPSController("/usr/scene/camera/physics/controller"); + } return true; } @@ -127,21 +133,21 @@ SimSpark spark("../../"); if (! spark.Init(argc, argv)) - { - return 1; - } + { + return 1; + } spark.GetSimulationServer()->Run(argc,argv); shared_ptr<RenderControl> renderCtr = spark.GetRenderControl(); if (renderCtr.get() != 0) - { - spark.GetLog()->Normal() - << "Average FPS: " - << renderCtr->GetFramesRendered() / - spark.GetSimulationServer()->GetTime() - << "\n"; - } + { + spark.GetLog()->Normal() + << "Average FPS: " + << renderCtr->GetFramesRendered() / + spark.GetSimulationServer()->GetTime() + << "\n"; + } return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-06-15 15:08:27
|
Revision: 68 http://simspark.svn.sourceforge.net/simspark/?rev=68&view=rev Author: sgvandijk Date: 2009-06-15 15:08:14 +0000 (Mon, 15 Jun 2009) Log Message: ----------- - change goal and out-of-field checks to only accept when ball is completely over the line Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.h Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-06-15 13:33:46 UTC (rev 67) +++ trunk/rcssserver3d/ChangeLog 2009-06-15 15:08:14 UTC (rev 68) @@ -1,3 +1,11 @@ +2009-06-15 Sander van Dijk <sgv...@gm...> + + * plugin/soccer/ballstateaspect/ballstateaspect.h + * plugin/soccer/ballstateaspect/ballstateaspect.cpp + * data/rsg/agent/nao/goal.rsg + - change goal and out-of-field checks to only accept when ball is + completely over the line + 2009-04-30 Sander van Dijk <sgv...@gm...> * rcssmonitor3d/rcssmonitor3d.rb Modified: trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-06-15 13:33:46 UTC (rev 67) +++ trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-06-15 15:08:14 UTC (rev 68) @@ -9,11 +9,18 @@ (def $GoalWidth (eval Soccer.GoalWidth)) (def $GoalDepth (eval Soccer.GoalDepth)) (def $GoalHeight (eval Soccer.GoalHeight)) - + (def $BallRadius (eval Soccer.BallRadius)) + (def $GoalHalfWidth (eval $GoalWidth / 2.0)) (def $GoalHalfHeight (eval $GoalHeight / 2.0)) (def $GoalHalfDepth (eval $GoalDepth / 2.0)) + (def $BallDiameter (eval $BallRadius * 2.0)) + + (def $GoalColliderWidth (eval $GoalWidth - $BallDiameter)) + (def $GoalColliderDepth (eval $GoalDepth - $BallDiameter)) + (def $GoalColliderHeight (eval $GoalHeight)) + (def $BarDiameter 0.04) (def $BarRadius (eval $BarDiameter / 2.0)) @@ -29,7 +36,7 @@ (setLocalRotation 0 0 $theta) (nd BoxCollider (setName BoxCollider) - (setBoxLengths $GoalDepth $GoalWidth $GoalHeight) + (setBoxLengths $GoalColliderDepth $GoalColliderWidth $GoalColliderHeight) (nd RecorderHandler (setName recorder) ) Modified: trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2009-06-15 13:33:46 UTC (rev 67) +++ trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.cpp 2009-06-15 15:08:14 UTC (rev 68) @@ -101,8 +101,8 @@ void BallStateAspect::UpdateBallOnField() { const Vector3f& posBall = mBall->GetWorldTransform().Pos(); - mBallOnField = ( gAbs(posBall.x()) < mHalfFieldLength ) - && ( gAbs(posBall.y()) < mHalfFieldWidth ); + mBallOnField = ( gAbs(posBall.x()) < mHalfFieldLength + mBallRadius + 0.001 ) + && ( gAbs(posBall.y()) < mHalfFieldWidth + mBallRadius + 0.001 ); } void BallStateAspect::UpdateLastValidBallPos() @@ -182,6 +182,8 @@ float fieldLength = 100.0f; SoccerBase::GetSoccerVar(*this,"FieldLength",fieldLength); mHalfFieldLength = fieldLength * 0.5f; + + SoccerBase::GetSoccerVar(*this,"BallRadius",mBallRadius); } void BallStateAspect::OnUnlink() Modified: trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.h =================================================================== --- trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.h 2009-06-15 13:33:46 UTC (rev 67) +++ trunk/rcssserver3d/plugin/soccer/ballstateaspect/ballstateaspect.h 2009-06-15 15:08:14 UTC (rev 68) @@ -141,6 +141,9 @@ /** indicates in which goal the ball is, TI_NONE otherwise */ TTeamIndex mGoalState; + /** the cached ball radius */ + float mBallRadius; + /** the cached field length */ float mHalfFieldLength; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-06-15 14:22:15
|
Revision: 67 http://simspark.svn.sourceforge.net/simspark/?rev=67&view=rev Author: sgvandijk Date: 2009-06-15 13:33:46 +0000 (Mon, 15 Jun 2009) Log Message: ----------- - Make reading client messages a bit more fail-safe by making sure the full message is read Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-05-27 15:31:10 UTC (rev 66) +++ trunk/spark/ChangeLog 2009-06-15 13:33:46 UTC (rev 67) @@ -1,3 +1,8 @@ +2009-06-15 Sander van Dijk <sgv...@gm...> + + * lib/oxygen/simulationserver/netcontrol.cpp + - Make reading client messages a bit more fail-safe by making sure the full message is read + 2009-04-15 Hedayat Vatankhah <he...@gr...> * plugin/CMakeLists.txt: @@ -242,4 +247,4 @@ * configure.ac: - fixed an issue with out of source builds, now it is possible to build - simspark in a separate directory. \ No newline at end of file + simspark in a separate directory. Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-05-27 15:31:10 UTC (rev 66) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-06-15 13:33:46 UTC (rev 67) @@ -627,14 +627,30 @@ // read a fragment shared_ptr<Client>& client = (*iter).second; - int rval = client->socket->recv(mBuffer.get(),mBufferSize); + + const unsigned int preSz = sizeof(unsigned int); + int nRead = 0; + int retval = 1; + while (nRead < preSz && retval > 0) + { + retval = client->socket->recv(mBuffer.get() + nRead, preSz - nRead); + nRead += retval; + } + + unsigned int len = ntohl(reinterpret_cast<unsigned int*>(mBuffer.get())[0]); - if (rval > 0) + while (nRead < preSz + len && retval > 0) + { + retval = client->socket->recv(mBuffer.get() + nRead, preSz + len - nRead); + nRead += retval; + } + + if (retval > 0) { - StoreFragment(client->addr,rval); + StoreFragment(client->addr,nRead); } else { - if (rval <= 0) + if (retval <= 0) { GetLog()->Error() << "(NetControl) ERROR: '" << GetName() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |