Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8285


Ignore:
Timestamp:
Apr 21, 2011, 7:43:10 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 8098 - 8277 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
1 deleted
45 edited
17 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/CMakeLists.txt

    r8284 r8285  
    5757SET(DEFAULT_CONFIG_PATH  config)
    5858SET(DEFAULT_LOG_PATH     log)
     59SET(DEFAULT_BUNDLE_PATH  bundle)
    5960
    6061# Set output directories
     
    138139ADD_SUBDIRECTORY(bin)
    139140
     141# System specific files (mostly for installation)
     142ADD_SUBDIRECTORY(contrib)
     143
    140144# Last but not least: Try to make a doc target with Doxygen
    141145ADD_SUBDIRECTORY(doc)
     146
     147########### CPack Packaging ###########
     148
     149# Currently only testing on Apple
     150#IF(APPLE)
     151#  INCLUDE(BundleConfig)
     152#ENDIF(APPLE)
  • code/branches/kicklib2/bin/client1.bat.in

    r5781 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client1
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --client --writingPathSuffix client1
    44pause
  • code/branches/kicklib2/bin/client2.bat.in

    r5781 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client2
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --client --writingPathSuffix client2
    44pause
  • code/branches/kicklib2/bin/dedicated.bat.in

    r5781 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --dedicated --writingPathSuffix dedicated
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --dedicated --writingPathSuffix dedicated
    44pause
  • code/branches/kicklib2/bin/dedicatedClient.bat.in

    r6417 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --dedicatedClient --writingPathSuffix dedicatedClient
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --dedicatedClient --writingPathSuffix dedicatedClient
    44pause
  • code/branches/kicklib2/bin/masterserver.bat.in

    r7801 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --masterserver --writingPathSuffix masterserver
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --masterserver --writingPathSuffix masterserver
    44pause
  • code/branches/kicklib2/bin/run.bat.in

    r5695 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@"
    44pause
  • code/branches/kicklib2/bin/server.bat.in

    r5781 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --server --writingPathSuffix server
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --server --writingPathSuffix server
    44pause
  • code/branches/kicklib2/bin/standalone.bat.in

    r5781 r8285  
    11title @PROJECT_NAME@
    22path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
    3 @CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --standalone --writingPathSuffix standalone
     3"@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@" --standalone --writingPathSuffix standalone
    44pause
  • code/branches/kicklib2/cmake/CompilerConfigMSVC.cmake

    r8284 r8285  
    6868# Note: It hasn't been checked yet whether we have code that might break
    6969#ADD_COMPILER_FLAGS("-fp:fast" CACHE)
    70 
    71 # No iterator checking for release builds (MSVC 8 dosn't understand this though)
    72 ADD_COMPILER_FLAGS("-D_SECURE_SCL=0" ReleaseAll CACHE)
    7370
    7471# Newer MSVC versions come with std::shared_ptr which conflicts with
  • code/branches/kicklib2/cmake/LibraryConfig.cmake

    r8284 r8285  
    5858  ELSEIF(MSVC90)
    5959    SET(_compiler_prefix msvc9)
    60   ELSEIF(MSVC100)
     60  ELSEIF(MSVC10)
    6161    SET(_compiler_prefix msvc10)
    6262  ENDIF()
     
    9898# Performs the search and sets the variables    #
    9999
    100 FIND_PACKAGE(OGRE     1.6    REQUIRED)
    101 #FIND_PACKAGE(ENet     1.1    REQUIRED)
     100#FIND_PACKAGE(ENet     1.2    REQUIRED)
     101FIND_PACKAGE(CEGUI    0.6    REQUIRED)
    102102FIND_PACKAGE(Lua5.1          REQUIRED)
    103103FIND_PACKAGE(Ogg             REQUIRED)
     
    105105FIND_PACKAGE(ALUT            REQUIRED)
    106106FIND_PACKAGE(ZLIB            REQUIRED)
    107 IF(POCO_REQUIRED)
    108   FIND_PACKAGE(POCO          REQUIRED)
    109   # Always link against POCO too because of threading
    110   SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
    111 ENDIF()
     107
    112108IF(WIN32)
    113109  FIND_PACKAGE(DbgHelp)
     
    115111ENDIF()
    116112
    117 ##### CEGUI #####
    118 # We make use of the CEGUI script module called CEGUILua.
    119 # However there is a small issue with that: Both CEGUILua and Orxonox use
    120 # Lua library functions on the same objects. And it turns out that in this case
    121 # the linked library must be EXACTLY the same.
    122 # Since Lua v5.1 has been out for a long while, this does not seem to be a
    123 # problem anymore, at least as long as Lua 5.2 is not released.
    124 FIND_PACKAGE(CEGUI 0.6 REQUIRED)
    125113
    126114##### OpenAL #####
     
    147135##### Boost #####
    148136# Expand the next statement if newer boost versions are released
    149 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0 1.40 1.40.0
    150                               1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0
    151                               1.45 1.45.0 1.46 1.46.0 1.46.1)
    152 IF( NOT TARDIS )
    153   FIND_PACKAGE(Boost 1.35 REQUIRED thread filesystem system date_time)
     137SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0
     138                              1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1)
     139IF(NOT TARDIS)
     140  FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time)
    154141ENDIF()
    155142# No auto linking, so this option is useless anyway
    156143MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
    157 # Complain about incompatibilities
    158 IF(GCC_VERSION)
    159   COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.4.0" _compare_result)
    160   IF(NOT _compare_result LESS 0)
    161     IF(${Boost_VERSION} LESS 103700)
    162       MESSAGE(STATUS "Warning: Boost versions earlier than 1.37 may not compile with GCC 4.4 or later!")
    163     ENDIF()
    164   ENDIF()
     144
     145##### OGRE #####
     146FIND_PACKAGE(OGRE 1.6 REQUIRED)
     147# For Ogre >= 1.7, we might need a threading library
     148# Variables are either defined by dependency package config or by FindOGRE
     149IF(OGRE_NEEDS_POCO)
     150  FIND_PACKAGE(POCO REQUIRED)
     151  # Always link against POCO too because of threading
     152  SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
     153ELSEIF(OGRE_NEEDS_BOOST)
     154  # Always link against boost too because of threading
     155  SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${Boost_THREAD_LIBRARY})
    165156ENDIF()
    166157
  • code/branches/kicklib2/cmake/PackageConfig.cmake

    r8284 r8285  
    3333COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
    3434IF(NOT _result EQUAL -1 AND NOT APPLE)
    35   SET(POCO_REQUIRED TRUE)
     35  SET(OGRE_NEEDS_POCO TRUE)
    3636ENDIF()
    3737
     
    7575
    7676  ## RELEASE
    77   # Try to filter out all the debug libraries. If the regex doesn't do the
    78   # job anymore, simply adjust it.
    79   INSTALL(
    80     DIRECTORY ${DEP_BINARY_DIR}/
    81     DESTINATION bin
    82     CONFIGURATIONS Release RelWithDebInfo MinSizeRel
    83     REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
    84   )
     77  IF(EXISTS ${DEP_BINARY_DIR}/install_manifest.txt)
     78    FILE(STRINGS ${DEP_BINARY_DIR}/install_manifest.txt _files)
     79    FOREACH(_file ${_files})
     80      INSTALL(
     81        FILES ${DEP_BINARY_DIR}/${_file}
     82        DESTINATION bin
     83        CONFIGURATIONS Release RelWithDebInfo MinSizeRel
     84      )
     85    ENDFOREACH(_file)
     86  ELSE()
     87    # Try to filter out all the debug libraries. If the regex doesn't do the
     88    # job anymore, simply adjust it.
     89    INSTALL(
     90      DIRECTORY ${DEP_BINARY_DIR}/
     91      DESTINATION bin
     92      CONFIGURATIONS Release RelWithDebInfo MinSizeRel
     93      REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
     94    )
     95  ENDIF()
    8596ENDIF()
  • code/branches/kicklib2/cmake/PackageConfigMSVC.cmake

    r8284 r8285  
    5757  # Certain find scripts don't behave as ecpected to we have
    5858  # to specify the libraries ourselves.
    59   SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    60   SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     59  IF(MSVC10)
     60    SET(TCL_LIBRARY
     61      optimized ${DEP_LIBRARY_DIR}/tcl85t.lib
     62      debug     ${DEP_LIBRARY_DIR}/tcl85tg.lib
     63      CACHE FILEPATH ""
     64    )
     65    SET(ZLIB_LIBRARY
     66      optimized ${DEP_LIBRARY_DIR}/zlib-vc100.lib
     67      debug     ${DEP_LIBRARY_DIR}/zlib-vc100_d.lib
     68      CACHE FILEPATH ""
     69    )
     70  ELSE()
     71    SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
     72    SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     73  ENDIF()
    6174  # Part of Platform SDK and usually gets linked automatically
    6275  SET(WMI_LIBRARY  wbemuuid.lib)
  • code/branches/kicklib2/cmake/PackageConfigOSX.cmake

    r8284 r8285  
    3030IF(NOT _INTERNAL_PACKAGE_MESSAGE)
    3131  MESSAGE(STATUS "Using library package for the dependencies.")
     32 
     33  # The following shell script sets the appropriate install_names for our libraries
     34  # and therefore it must be run before anything else is set, dep-package-wise.
     35  EXECUTE_PROCESS(
     36    COMMAND ${DEPENDENCY_PACKAGE_DIR}/install_dependencies.sh
     37    WORKING_DIRECTORY ${DEPENDENCY_PACKAGE_DIR}
     38    OUTPUT_FILE ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me
     39  )
    3240  SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
    3341ENDIF()
    3442
    35 SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include)
    36 SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib)
    37 SET(DEP_BINARY_DIR  ${DEPENDENCY_PACKAGE_DIR}/bin)
     43SET(DEP_INCLUDE_DIR   ${DEPENDENCY_PACKAGE_DIR}/include)
     44SET(DEP_LIBRARY_DIR   ${DEPENDENCY_PACKAGE_DIR}/lib)
     45SET(DEP_BINARY_DIR    ${DEPENDENCY_PACKAGE_DIR}/bin)
    3846SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
    3947
    40 # Sets the library path for the FIND_LIBRARY
    41 SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
     48# Sets the library and framwork paths for the FIND_LIBRARY commands
     49SET(CMAKE_LIBRARY_PATH   ${DEP_LIBRARY_DIR})
     50SET(CMAKE_FRAMEWORK_PATH ${DEP_FRAMEWORK_DIR})
    4251
    4352# Include paths and other special treatments
    44 SET(ENV{ALUTDIR}               ${DEP_FRAMEWORK_DIR})
    45 SET(ENV{BOOST_ROOT}            ${DEPENDENCY_PACKAGE_DIR})
    46 SET(ENV{CEGUIDIR}              ${DEP_FRAMEWORK_DIR})
    47 SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
    48 SET(ENV{LUA5.1_DIR}            ${DEP_INCLUDE_DIR}/lua)
    49 SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR})
    50 SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR})
    51 SET(ENV{OGRE_HOME}             ${DEP_FRAMEWORK_DIR})
    52 SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
     53SET(ENV{BOOST_ROOT}      ${DEPENDENCY_PACKAGE_DIR})
     54SET(ENV{OGGDIR}          ${DEP_INCLUDE_DIR})
     55SET(ENV{VORBISDIR}       ${DEP_INCLUDE_DIR})
     56SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})
     57
     58# Linking to OGRE requires linking to the boost threading library
     59SET(OGRE_NEEDS_BOOST TRUE)
    5360
    5461# For OS X 10.5 we have to ship modified headers to make it compile
     
    5966ENDIF()
    6067
    61 # Xcode won't be able to run the toluabind code generation if we're using the dependency package
    62 #IF(DEPENDENCY_PACKAGE_ENABLE)
    63 #  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    64 #    SET(ENV{DYLD_LIBRARY_PATH}               ${DEPENDENCY_PACKAGE_DIR}/lib)
    65 #    SET(ENV{DYLD_FRAMEWORK_PATH}             ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
    66 #  ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    67 #ENDIF(DEPENDENCY_PACKAGE_ENABLE)
    68 
    6968### INSTALL ###
    7069
    7170# Tcl script library
    7271# TODO: How does this work on OS X?
     72# Concerning all OS X install procedures: use CPACK
    7373#INSTALL(
    7474#  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
  • code/branches/kicklib2/cmake/tools/FindALUT.cmake

    r8284 r8285  
    3232FIND_PATH(ALUT_INCLUDE_DIR alut.h
    3333  PATHS $ENV{ALUTDIR}
    34   PATH_SUFFIXES include include/AL Headers Headers/AL
     34  PATH_SUFFIXES include include/AL
    3535)
    3636FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
  • code/branches/kicklib2/cmake/tools/FindCEGUI.cmake

    r8284 r8285  
    3434FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3535  PATHS $ENV{CEGUIDIR}
    36   PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
     36  PATH_SUFFIXES include include/CEGUI
    3737)
    3838
     
    4444  NAMES CEGUIBase CEGUI
    4545  PATHS $ENV{CEGUIDIR}
    46   PATH_SUFFIXES lib bin CEGUIBase.framework CEGUI.framework
     46  PATH_SUFFIXES lib bin
    4747)
    4848FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
     
    5656# Find CEGUILua headers
    5757FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
    58   PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
    59   PATH_SUFFIXES include include/CEGUI CEGUILuaScriptModule.framework/Headers
     58  PATHS
     59    $ENV{CEGUIDIR}
     60    $ENV{CEGUILUADIR}
     61    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     62  PATH_SUFFIXES include include/CEGUI
    6063)
    6164# Find CEGUILua libraries
    6265FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    6366  NAMES CEGUILua CEGUILuaScriptModule
    64   PATHS $ENV{CEGUIDIR}
    65   PATH_SUFFIXES lib bin CEGUILuaScriptModule.framework
     67  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
     68  PATH_SUFFIXES lib bin
    6669)
    6770FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
    6871  NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
    69   PATHS $ENV{CEGUIDIR}
     72  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
    7073  PATH_SUFFIXES lib bin
    7174)
     
    7982    # For newer CEGUI versions >= 0.7
    8083    ${CEGUILUA_INCLUDE_DIR}/support/tolua++
    81     # For Apples
    82     $ENV{CEGUIDIR}
    83   PATH_SUFFIXES ceguitolua++.framework/Headers
    84   NO_DEFAULT_PATH # MUST be in CEGUILUA_INCLUDE_DIR somewhere
     84    # For Mac OS X, tolua++ is a separate framework in the dependency package
     85    ${DEP_FRAMEWORK_DIR}
     86  NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
    8587)
    8688# Find CEGUI Tolua++ libraries
    8789FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
    8890  NAMES CEGUItoluapp tolua++ ceguitolua++
    89   PATHS $ENV{CEGUIDIR}
    90   PATH_SUFFIXES lib bin ceguitolua++.framework
     91  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
     92  PATH_SUFFIXES lib bin
    9193)
    9294FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
    9395  NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
    94   PATHS $ENV{CEGUIDIR}
     96  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
    9597  PATH_SUFFIXES lib bin
    9698)
     
    101103  # Find CEGUI OGRE Renderer headers
    102104  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
    103     PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
    104     PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
     105    PATHS
     106      $ENV{CEGUIDIR}
     107      $ENV{CEGUIOGRERENDERERDIR}
     108      ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
     109    PATH_SUFFIXES include include/CEGUI
    105110  )
    106111  # Find CEGUI OGRE Renderer libraries
    107112  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
    108113    NAMES CEGUIOgreRenderer
    109     PATHS $ENV{CEGUIDIR}
     114    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    110115    PATH_SUFFIXES lib bin
    111116  )
    112117  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
    113118    NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d
    114     PATHS $ENV{CEGUIDIR}
     119    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    115120    PATH_SUFFIXES lib bin
    116121  )
  • code/branches/kicklib2/cmake/tools/FindLua5.1.cmake

    r8283 r8285  
    5656# Find include path
    5757FIND_PATH(LUA5.1_INCLUDE_DIR lua.h
    58   PATHS $ENV{LUA5.1_DIR}
     58  PATHS $ENV{LUA5.1_DIR} $ENV{LUA_DIR}
    5959  PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
    6060)
  • code/branches/kicklib2/cmake/tools/FindOGRE.cmake

    r7163 r8285  
    2323FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
    2424  PATHS $ENV{OGRE_HOME}
    25   PATH_SUFFIXES include include/OGRE Ogre.framework/Headers
     25  PATH_SUFFIXES include include/OGRE
    2626)
    2727FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
     
    3333  NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d
    3434  PATHS $ENV{OGRE_HOME}
    35   PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A
     35  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug
    3636)
    3737
  • code/branches/kicklib2/cmake/tools/FindOgg.cmake

    r8284 r8285  
    2222)
    2323FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
    24   NAMES ogg ogg-0
     24  NAMES ogg ogg-0 libogg
    2525  PATHS $ENV{OGGDIR}
    2626  PATH_SUFFIXES lib
    2727)
    2828FIND_LIBRARY(OGG_LIBRARY_DEBUG
    29   NAMES oggd ogg_d oggD ogg_D
     29  NAMES oggd ogg_d oggD ogg_D libogg_d
    3030  PATHS $ENV{OGGDIR}
    3131  PATH_SUFFIXES lib
  • code/branches/kicklib2/cmake/tools/FindVorbis.cmake

    r8284 r8285  
    2222)
    2323FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
    24   NAMES vorbis vorbis-0
     24  NAMES vorbis vorbis-0 libvorbis
    2525  PATHS $ENV{VORBISDIR}
    2626  PATH_SUFFIXES lib
    2727)
    2828FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
    29   NAMES vorbisd vorbis_d vorbisD vorbis_D
     29  NAMES vorbisd vorbis_d vorbisD vorbis_D libvorbis_d
    3030  PATHS $ENV{VORBISDIR}
    3131  PATH_SUFFIXES lib
    3232)
    3333FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
    34   NAMES vorbisfile vorbisfile-3
     34  NAMES vorbisfile vorbisfile-3 libvorbisfile
    3535  PATHS $ENV{VORBISDIR}
    3636  PATH_SUFFIXES lib
    3737)
    3838FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
    39   NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D
     39  NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D libvorbisfile_d
    4040  PATHS $ENV{VORBISDIR}
    4141  PATH_SUFFIXES lib
  • code/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8284 r8285  
    5353 #    This function also installs the target!
    5454 #  Prerequisistes:
    55  #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES, ORXONOX_CONFIG_FILES_GENERATED
     55 #    ORXONOX_DEFAULT_LINK
    5656 #  Parameters:
    5757 #    _target_name, ARGN for the macro arguments
     
    206206        SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
    207207      ENDIF()
    208       # Also include all config files
    209       LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES} ${ORXONOX_CONFIG_FILES_GENERATED})
    210       # Add unprocessed config files to the 'Config' section
    211       SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
    212       # Add generated config files to the 'Generated' section
    213       SOURCE_GROUP("Generated" FILES ${ORXONOX_CONFIG_FILES_GENERATED})
    214208    ENDIF()
    215209  ENDIF()
     
    291285  IF(_arg_LINK_LIBRARIES)
    292286    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})
     287  ENDIF()
     288
     289  # RPATH settings for the installation
     290  IF(UNIX)
     291    SET(_rpath ${LIBRARY_INSTALL_DIRECTORY})
     292    IF(_arg_MODULE)
     293      LIST(APPEND _rpath ${MODULE_INSTALL_DIRECTORY})
     294    ENDIF()
     295    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
    293296  ENDIF()
    294297
  • code/branches/kicklib2/contrib/orxonox.desktop

    r8229 r8285  
    22Name=Orxonox
    33Comment=A spacecraft shooter
    4 Exec=orxonox
     4Exec=/usr/games/orxonox
    55Icon=/usr/share/pixmaps/orxonox.png
    66Type=Application
  • code/branches/kicklib2/data/CMakeLists.txt

    r7163 r8285  
    5959  DIRECTORY ${EXTERNAL_DATA_DIRECTORY}/
    6060  DESTINATION ${DATA_INSTALL_DIRECTORY}
    61   REGEX "\\.svn$|_svn$|resources\\.oxr|AUTHORS|LICENSE" EXCLUDE
     61  REGEX "\\.svn$|_svn$|AUTHORS|LICENSE" EXCLUDE
    6262)
    63 # Configure the install scripts (variables not available during installation)
    64 CONFIGURE_FILE(DataInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake @ONLY)
    65 # Join both resources.oxr files
    66 INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake)
  • code/branches/kicklib2/src/CMakeLists.txt

    r8284 r8285  
    4141#ADD_COMPILER_FLAGS("-DENET_DLL"           WIN32 LINK_ENET_DYNAMIC)
    4242ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   WIN32 LINK_LUA5.1_DYNAMIC)
    43 ADD_COMPILER_FLAGS("-DZLIB_DLL"           WIN32 LINK_ZLIB_DYNAMIC)
    4443# If no defines are specified, these libs get linked dynamically
    4544ADD_COMPILER_FLAGS("-DCEGUI_STATIC -DTOLUA_STATIC" WIN32 NOT LINK_CEGUI_DYNAMIC)
     
    139138ENDIF()
    140139
     140SET(ORXONOX_MAIN_FILES Orxonox.cc)
     141
     142# Add special source file for OS X
     143IF(APPLE)
     144  LIST(APPEND ORXONOX_MAIN_FILES OrxonoxMac.mm)
     145ENDIF()
     146
    141147ORXONOX_ADD_EXECUTABLE(orxonox-main
    142148  # When defined as WIN32 this removes the console window on Windows
     
    145151    orxonox
    146152  SOURCE_FILES
    147     Orxonox.cc
     153    ${ORXONOX_MAIN_FILES}
    148154  OUTPUT_NAME orxonox
    149155)
     
    179185ENDIF(MSVC)
    180186
     187# Apple Mac OS X specific build settings
     188IF(APPLE)
     189  # On Apple we need to link to AppKit and Foundation frameworks
     190  TARGET_LINK_LIBRARIES(orxonox-main
     191    "-framework AppKit"
     192    "-framework Foundation"
     193  )
     194
     195  # Post-build step for the creation of the Dev-App bundle
     196  INCLUDE(PrepareDevBundle)
     197  ADD_CUSTOM_COMMAND(
     198    TARGET orxonox-main
     199    POST_BUILD
     200    # Copy the executable into the Orxonox.app
     201    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${ORXONOX_EXECUTABLE_NAME}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     202    # Copy the dev-build marker file to Orxonox.app
     203    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/orxonox_dev_build.keep_me" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     204    # Create a shortcut of the application to the root of the build tree
     205    COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.app"
     206  )
     207ENDIF(APPLE)
     208
    181209#################### Doxygen ####################
    182210
  • code/branches/kicklib2/src/Orxonox.cc

    r6417 r8285  
    5353#ifdef ORXONOX_USE_WINMAIN
    5454INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
     55#elif defined(ORXONOX_PLATFORM_APPLE)
     56int main_mac(int argc, char** argv)
    5557#else
    5658int main(int argc, char** argv)
     
    6062    {
    6163#ifndef ORXONOX_USE_WINMAIN
     64
     65#ifdef ORXONOX_PLATFORM_APPLE
     66        // On Apples, the kernel supplies a second argument, which we have to circumvent
     67        const int firstArgument = 2;
     68#else
     69        // 0 is the execution path
     70        const int firstArgument = 1;
     71#endif
     72   
    6273        std::string strCmdLine;
    63         for (int i = 1; i < argc; ++i)
     74        for (int i = firstArgument; i < argc; ++i)
    6475            strCmdLine = strCmdLine + argv[i] + ' ';
    6576#endif
  • code/branches/kicklib2/src/OrxonoxConfig.cmake

    r8284 r8285  
    111111  ${CMAKE_CURRENT_BINARY_DIR}/SpecialConfig.h
    112112)
     113
     114# Make special target including the configured header files for Visual Studio
     115IF(MSVC)
     116  ADD_CUSTOM_TARGET(config
     117    SOURCES
     118      ${ORXONOX_CONFIG_FILES}
     119      ${ORXONOX_CONFIG_FILES_GENERATED}
     120  )
     121ENDIF()
  • code/branches/kicklib2/src/OrxonoxConfig.h.in

    r8284 r8285  
    228228}
    229229
     230// Define Boost Filesystem version
     231#include <boost/version.hpp>
     232#ifndef BOOST_FILESYSTEM_VERSION
     233#  if (BOOST_VERSION < 104600)
     234#    define BOOST_FILESYSTEM_VERSION 2
     235#  else
     236#    define BOOST_FILESYSTEM_VERSION 3
     237#  endif
     238#endif
     239
    230240#endif /* _OrxonoxConfig_H__ */
  • code/branches/kicklib2/src/SpecialConfig.h.in

    r8284 r8285  
    9292
    9393    // OGRE PLUGINS
    94     // Apple has trouble finding OGRE plugins because of its install-name convention
    95     // Adopting the executable_path structure for later use in app bundles
    9694#ifdef NDEBUG
    9795    const char ogrePlugins[] = "@OGRE_PLUGINS_RELEASE@";
    98 #  ifdef DEPENDENCY_PACKAGE_ENABLE
    99 #    ifdef ORXONOX_PLATFORM_APPLE
    100        const char ogrePluginsDirectory[] = "@executable_path/../Plugins";
    101 #    else
    102        const char ogrePluginsDirectory[] = ".";
    103 #    endif
    104 #  else
    10596    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
    106 #  endif
    10797#else
    10898    const char ogrePlugins[] = "@OGRE_PLUGINS_DEBUG@";
    109 #  ifdef DEPENDENCY_PACKAGE_ENABLE
    110 #    ifdef ORXONOX_PLATFORM_APPLE
    111        const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
    112 #    else
    113        const char ogrePluginsDirectory[] = ".";
    114 #    endif
    115 #  else
    11699    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
    117 #  endif
    118100#endif
    119101} }
  • code/branches/kicklib2/src/external/ogreceguirenderer/CMakeLists.txt

    r8284 r8285  
    3535    "OGRE_GUIRENDERER_EXPORTS"
    3636  LINK_LIBRARIES
    37     ${Boost_SYSTEM_LIBRARY}
    38     ${Boost_THREAD_LIBRARY}
    39     ${Boost_DATE_TIME_LIBRARY}
    4037    ${OGRE_LIBRARY}
    4138    ${CEGUI_LIBRARY}
  • code/branches/kicklib2/src/external/ois/CMakeLists.txt

    r8284 r8285  
    5454
    5555# Some unexplained hackery for Visual Studio 2005
    56 ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
     56ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC80)
    5757
    5858# MinGW doesn't come with some required Windows headers
  • code/branches/kicklib2/src/external/tinyxml/CMakeLists.txt

    r7163 r8285  
    3636  ORXONOX_EXTERNAL
    3737  NO_DLL_INTERFACE
    38   VERSION
    39     2.5.3
    4038  SOURCE_FILES
    4139    ${TINYXML_FILES}
  • code/branches/kicklib2/src/external/tinyxml/VERSION

    r6620 r8285  
    1 TinyXML++ trunk checkout revision 106. Built on top of TinyXML 2.5.3
     1TinyXML++ trunk checkout revision 122 (version 0.04a).
     2Built with TinyXML 2.5.3.
  • code/branches/kicklib2/src/external/tinyxml/changes_orxonox.diff

    r5781 r8285  
    1 --- ticpp.h     Tue Nov  4 21:55:49 2008
    2 +++ ticpp.h     Sat Jan 10 14:48:41 2009
    3 @@ -1229,6 +1229,7 @@
     1--- ticpp.h
     2+++ ticpp.h
     3@@ -38,9 +38,7 @@
     4 @todo add TYPECOUNT support. See ticpp::NodeFactory.
     5 @todo Add a quick reference
     6 */
     7-#ifndef TIXML_USE_TICPP
     8-       #define TIXML_USE_TICPP
     9-#endif
     10+#ifdef TIXML_USE_TICPP
     11 
     12 #ifndef TICPP_INCLUDED
     13 #define TICPP_INCLUDED
     14@@ -1231,6 +1229,7 @@
    415 
    516                T* m_tiXmlPointer;              /**< Internal pointer to the TiXml Class which is being wrapped */
    617 
    7 +    public:
     18+       public:
    819                /**
    920                @internal
    1021                Gets the internal TinyXML pointer.
    11 @@ -1240,6 +1241,7 @@
     22@@ -1242,6 +1241,7 @@
    1223                        ValidatePointer();
    1324                        return m_tiXmlPointer;
    1425                }
    15 +    protected:
     26+       protected:
    1627 
    1728                /**
    1829                @internal
     30@@ -1903,3 +1903,5 @@
     31 }
     32 
     33 #endif // TICPP_INCLUDED
     34+
     35+#endif // TIXML_USE_TICPP
  • code/branches/kicklib2/src/external/tinyxml/ticpp.cpp

    r5781 r8285  
    370370}
    371371
    372 Node* Node::InsertEndChild( Node& addThis )
     372Node* Node::InsertEndChild( const Node& addThis )
    373373{
    374374        if ( addThis.Type() == TiXmlNode::DOCUMENT )
     
    404404}
    405405
    406 Node* Node::InsertBeforeChild( Node* beforeThis, Node& addThis )
     406Node* Node::InsertBeforeChild( Node* beforeThis, const Node& addThis )
    407407{
    408408        if ( addThis.Type() == TiXmlNode::DOCUMENT )
     
    423423}
    424424
    425 Node* Node::InsertAfterChild( Node* afterThis, Node& addThis )
     425Node* Node::InsertAfterChild( Node* afterThis, const Node& addThis )
    426426{
    427427        if ( addThis.Type() == TiXmlNode::DOCUMENT )
     
    442442}
    443443
    444 Node* Node::ReplaceChild( Node* replaceThis, Node& withThis )
     444Node* Node::ReplaceChild( Node* replaceThis, const Node& withThis )
    445445{
    446446        if ( withThis.Type() == TiXmlNode::DOCUMENT )
  • code/branches/kicklib2/src/external/tinyxml/ticpp.h

    r5781 r8285  
    225225                        return ( GetBasePointer() == rhs.GetBasePointer() );
    226226                }
    227                
     227
    228228                /**
    229229                Compare internal TiXml pointers to determine is both are wrappers around the same node
     
    233233                        return ( GetBasePointer() != rhs.GetBasePointer() );
    234234                }
    235                
     235
    236236                /**
    237237                Builds detailed error string using TiXmlDocument::Error() and others
     
    250250                                        {
    251251                                                full_message    << "\nDescription: " << doc->ErrorDesc()
    252                                                                                 << "\nFile: " << (strlen( doc->Value() ) > 0 ? doc->Value() : "<unnamed-file>") 
    253                                                                                 << "\nLine: " << doc->ErrorRow() 
     252                                                                                << "\nFile: " << (strlen( doc->Value() ) > 0 ? doc->Value() : "<unnamed-file>")
     253                                                                                << "\nLine: " << doc->ErrorRow()
    254254                                                                                << "\nColumn: " << doc->ErrorCol();
    255255                                        }
     
    287287                                TICPPTHROW( "Internal TiXml Pointer is NULL" );
    288288                        }
    289                 }               
     289                }
    290290
    291291                /**
     
    617617                @see TiXmlNode::InsertEndChild
    618618                */
    619                 Node* InsertEndChild( Node& addThis );
     619                Node* InsertEndChild( const Node& addThis );
    620620
    621621                /**
     
    642642                @see TiXmlNode::InsertBeforeChild
    643643                */
    644                 Node* InsertBeforeChild( Node* beforeThis, Node& addThis );
     644                Node* InsertBeforeChild( Node* beforeThis, const Node& addThis );
    645645
    646646                /**
     
    655655                @see TiXmlNode::InsertAfterChild
    656656                */
    657                 Node* InsertAfterChild( Node* afterThis, Node& addThis );
     657                Node* InsertAfterChild( Node* afterThis, const Node& addThis );
    658658
    659659                /**
     
    667667                @see TiXmlNode::ReplaceChild
    668668                */
    669                 Node* ReplaceChild( Node* replaceThis, Node& withThis );
     669                Node* ReplaceChild( Node* replaceThis, const Node& withThis );
    670670
    671671                /**
     
    11631163                /** Sets internal pointer to the Previous Sibling, or Iterator::END, if there are no prior siblings */
    11641164                Iterator operator--(int)
    1165                 {                       
     1165                {
    11661166                        Iterator tmp(*this);
    11671167                        --(*this);
     
    12301230                T* m_tiXmlPointer;              /**< Internal pointer to the TiXml Class which is being wrapped */
    12311231
    1232     public:
     1232        public:
    12331233                /**
    12341234                @internal
     
    12421242                        return m_tiXmlPointer;
    12431243                }
    1244     protected:
     1244        protected:
    12451245
    12461246                /**
     
    14001400
    14011401                /**
    1402                 Constructor.
    1403                 Create a document with a name. The name of the document is also the filename of the xml.
    1404 
    1405                 @param documentName Name to set in the Document.
    1406                 */
     1402                 * Constructor.
     1403                 * Create a document with a name. The name of the document is also the filename of the xml.
     1404                 * @param documentName Name to set in the Document.
     1405                 * @note LoadFile() needs to be called to actually load the data from the file specified by documentName
     1406                 *               SaveFile() needs to be called to save data to file specified by documentName.
     1407                 */
    14071408                Document( const std::string& documentName );
    14081409
     
    17491750                                if ( throwIfNotFound )
    17501751                                {
    1751                                         TICPPTHROW( "Attribute does not exist" );
     1752                                        const std::string error( std::string( "Attribute '" ) + name + std::string( "' does not exist" ) );
     1753                                        TICPPTHROW( error );
    17521754                                }
    17531755                        }
     
    17811783                                if ( throwIfNotFound )
    17821784                                {
    1783                                         TICPPTHROW( "Attribute does not exist" );
     1785                                        const std::string error( std::string( "Attribute '" ) + name + std::string( "' does not exist" ) );
     1786                                        TICPPTHROW( error );
    17841787                                }
    17851788                                else
  • code/branches/kicklib2/src/libraries/core/CorePrereqs.h

    r8284 r8285  
    262262namespace boost
    263263{
    264 #if BOOST_VERSION < 104400
     264#if (BOOST_VERSION < 104400)
     265
    265266    namespace filesystem
    266267    {
     
    269270        typedef basic_path<std::string, path_traits> path;
    270271    }
    271 #elif BOOST_VERSION < 104600
     272
     273#elif (BOOST_VERSION < 104800)
     274
     275# if BOOST_FILESYSTEM_VERSION == 2
    272276    namespace filesystem2
    273277    {
     
    282286        using filesystem2::path;
    283287    }
     288# elif BOOST_FILESYSTEM_VERSION == 3
     289    namespace filesystem3
     290    {
     291        class path;
     292    }
     293    namespace filesystem
     294    {
     295        using filesystem3::path;
     296    }
     297# endif
     298
    284299#else
    285     namespace filesystem3
     300
     301    // TODO: Check this once boost 1.48 is released
     302    namespace filesystem
    286303    {
    287304        class path;
    288305    }
    289     namespace filesystem
    290     {
    291         using filesystem3::path;
    292     }
     306
    293307#endif
     308
    294309    class thread;
    295310    class mutex;
  • code/branches/kicklib2/src/libraries/core/GraphicsManager.cc

    r8284 r8285  
    3030#include "GraphicsManager.h"
    3131
     32#include <cstdlib>
    3233#include <fstream>
    3334#include <sstream>
     
    120121        // Only for development runs
    121122        if (PathConfig::isDevelopmentRun())
    122         {
    123123            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem");
    124             extResources_.reset(new XMLFile("resources.oxr"));
    125             extResources_->setLuaSupport(false);
    126             Loader::open(extResources_.get());
    127         }
     124
     125        extResources_.reset(new XMLFile("resources.oxr"));
     126        extResources_->setLuaSupport(false);
     127        Loader::open(extResources_.get());
    128128
    129129        if (bLoadRenderer)
     
    150150        // Undeclare the resources
    151151        Loader::unload(resources_.get());
    152         if (PathConfig::isDevelopmentRun())
    153             Loader::unload(extResources_.get());
     152        Loader::unload(extResources_.get());
    154153    }
    155154
     
    158157        SetConfigValue(ogreConfigFile_,  "ogre.cfg")
    159158            .description("Location of the Ogre config file");
    160         SetConfigValue(ogrePluginsDirectory_, specialConfig::ogrePluginsDirectory)
    161             .description("Folder where the Ogre plugins are located.");
    162159        SetConfigValue(ogrePlugins_, specialConfig::ogrePlugins)
    163160            .description("Comma separated list of all plugins to load.");
     
    251248    void GraphicsManager::loadOgrePlugins()
    252249    {
    253         // just to make sure the next statement doesn't segfault
    254         if (ogrePluginsDirectory_.empty())
    255             ogrePluginsDirectory_ = '.';
    256 
    257         boost::filesystem::path folder(ogrePluginsDirectory_);
     250        // Plugin path can have many different locations...
     251        std::string pluginPath = specialConfig::ogrePluginsDirectory;
     252#ifdef DEPENDENCY_PACKAGE_ENABLE
     253        if (!PathConfig::isDevelopmentRun())
     254        {
     255#  if defined(ORXONOX_PLATFORM_WINDOWS)
     256            pluginPath = PathConfig::getExecutablePathString();
     257#  elif defined(ORXONOX_PLATFORM_APPLE)
     258            // TODO: Where are the plugins being installed to?
     259            pluginPath = PathConfig::getExecutablePathString();
     260#  endif
     261        }
     262#endif
     263
     264#ifdef ORXONOX_PLATFORM_WINDOWS
     265        // Add OGRE plugin path to the environment. That way one plugin could
     266        // also depend on another without problems on Windows
     267        const char* currentPATH = getenv("PATH");
     268        std::string newPATH = pluginPath;
     269        if (currentPATH != NULL)
     270            newPATH = std::string(currentPATH) + ';' + newPATH;
     271        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
     272#endif
     273
    258274        // Do some SubString magic to get the comma separated list of plugins
    259275        SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '{', '}', false, '\0');
    260         // Use backslash paths on Windows! file_string() already does that though.
    261276        for (unsigned int i = 0; i < plugins.size(); ++i)
    262 #if BOOST_FILESYSTEM_VERSION < 3
    263             ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
    264 #else
    265             ogreRoot_->loadPlugin((folder / plugins[i]).string());
    266 #endif
     277            ogreRoot_->loadPlugin(pluginPath + '/' + plugins[i]);
    267278    }
    268279
     
    290301
    291302        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
    292 
    293 // HACK
    294 #ifdef ORXONOX_PLATFORM_APPLE
    295         //INFO: This will give our window focus, and not lock it to the terminal
    296         ProcessSerialNumber psn = {0, kCurrentProcess};
    297         TransformProcessType(&psn, kProcessTransformToForegroundApplication);
    298         SetFrontProcess(&psn);
    299 #endif
    300 // End of HACK
    301303
    302304        // create a full screen default viewport
  • code/branches/kicklib2/src/libraries/core/GraphicsManager.h

    r8283 r8285  
    128128        // config values
    129129        std::string         ogreConfigFile_;           //!< ogre config filename
    130         std::string         ogrePluginsDirectory_;     //!< Directory where the Ogre plugins are located
    131130        std::string         ogrePlugins_;              //!< Comma separated list of all plugins to load
    132131        std::string         ogreLogFile_;              //!< log filename for Ogre log messages
  • code/branches/kicklib2/src/libraries/core/Identifier.h

    r8284 r8285  
    395395    {
    396396        // Get the name of the class
    397         const std::string& name = typeid(T).name();
     397        std::string name = typeid(T).name();
    398398
    399399        // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
  • code/branches/kicklib2/src/libraries/core/PathConfig.cc

    r8284 r8285  
    3333#include <cstdio>
    3434#include <vector>
    35 #include <boost/version.hpp>
    3635#include <boost/filesystem.hpp>
    3736
     
    5655#include "CommandLineParser.h"
    5756
    58 // Boost 1.36 has some issues with deprecated functions that have been omitted
    59 #if (BOOST_VERSION == 103600)
    60 #  define BOOST_LEAF_FUNCTION filename
    61 #elif (BOOST_FILESYSTEM_VERSION < 3)
    62 #  define BOOST_LEAF_FUNCTION leaf
     57// Differentiate Boost Filesystem v2 and v3
     58#if (BOOST_FILESYSTEM_VERSION < 3)
     59#  define BF_LEAF leaf
     60#  define BF_GENERIC_STRING string
     61#  define BF_NATIVE_STRING file_string
    6362#else
    64 #  define BOOST_LEAF_FUNCTION path().filename().string
     63#  define BF_LEAF path().filename().string
     64#  define BF_GENERIC_STRING generic_string
     65#  define BF_NATIVE_STRING string
    6566#endif
    6667
     
    242243            {
    243244                ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
    244                                          Please remove " + it->first.string());
     245                                         Please remove " + it->first.BF_GENERIC_STRING());
    245246            }
    246247            if (bf::create_directories(it->first)) // function may not return true at all (bug?)
     
    259260        size_t moduleextensionlength = moduleextension.size();
    260261
     262#ifdef ORXONOX_PLATFORM_WINDOWS
    261263        // Add that path to the PATH variable in case a module depends on another one
    262         std::string pathVariable(getenv("PATH"));
    263         putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.string()).c_str()));
     264        const char* currentPATH = getenv("PATH");
     265        std::string newPATH = modulePath_.BF_NATIVE_STRING();
     266        if (currentPATH != NULL)
     267            newPATH = std::string(currentPATH) + ';' + newPATH;
     268        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
     269#endif
    264270
    265271        // Make sure the path exists, otherwise don't load modules
     
    273279        while (file != end)
    274280        {
    275             std::string filename = file->BOOST_LEAF_FUNCTION();
     281            std::string filename = file->BF_LEAF();
    276282
    277283            // Check if the file ends with the extension in question
     
    282288                    // We've found a helper file
    283289                    const std::string& library = filename.substr(0, filename.size() - moduleextensionlength);
    284 #if BOOST_FILESYSTEM_VERSION < 3
    285                     modulePaths.push_back((modulePath_ / library).file_string());
    286 #else
    287                     modulePaths.push_back((modulePath_ / library).string());
    288 #endif
     290                    modulePaths.push_back(getModulePathString() + library);
    289291                }
    290292            }
     
    297299    /*static*/ std::string PathConfig::getRootPathString()
    298300    {
    299         return getInstance().rootPath_.string() + '/';
     301        return getInstance().rootPath_.BF_GENERIC_STRING() + '/';
    300302    }
    301303
    302304    /*static*/ std::string PathConfig::getExecutablePathString()
    303305    {
    304         return getInstance().executablePath_.string() + '/';
     306        return getInstance().executablePath_.BF_GENERIC_STRING() + '/';
    305307    }
    306308
    307309    /*static*/ std::string PathConfig::getDataPathString()
    308310    {
    309         return getInstance().dataPath_.string() + '/';
     311        return getInstance().dataPath_.BF_GENERIC_STRING() + '/';
    310312    }
    311313
    312314    /*static*/ std::string PathConfig::getExternalDataPathString()
    313315    {
    314         return getInstance().externalDataPath_.string() + '/';
     316        return getInstance().externalDataPath_.BF_GENERIC_STRING() + '/';
    315317    }
    316318
    317319    /*static*/ std::string PathConfig::getConfigPathString()
    318320    {
    319         return getInstance().configPath_.string() + '/';
     321        return getInstance().configPath_.BF_GENERIC_STRING() + '/';
    320322    }
    321323
    322324    /*static*/ std::string PathConfig::getLogPathString()
    323325    {
    324         return getInstance().logPath_.string() + '/';
     326        return getInstance().logPath_.BF_GENERIC_STRING() + '/';
    325327    }
    326328
    327329    /*static*/ std::string PathConfig::getModulePathString()
    328330    {
    329         return getInstance().modulePath_.string() + '/';
     331        return getInstance().modulePath_.BF_GENERIC_STRING() + '/';
    330332    }
    331333}
  • code/branches/kicklib2/src/libraries/core/PathConfig.h

    r7427 r8285  
    113113            static std::string getModulePathString();
    114114
    115             //! Return trrue for runs in the build directory (not installed)
     115            //! Return true for runs in the build directory (not installed)
    116116            static bool isDevelopmentRun() { return getInstance().bDevRun_; }
    117117
  • code/branches/kicklib2/src/libraries/core/Resource.cc

    r8284 r8285  
    3333#include <OgreFileSystem.h>
    3434#include <OgreResourceGroupManager.h>
     35
     36// Differentiate Boost Filesystem v2 and v3
     37#if (BOOST_FILESYSTEM_VERSION < 3)
     38#  define BF_GENERIC_STRING string
     39#else
     40#  define BF_GENERIC_STRING generic_string
     41#endif
    3542
    3643namespace orxonox
     
    98105                    boost::filesystem::path base(it->archive->getName());
    99106                    base /= it->filename;
    100                     ptr->fileSystemPath = base.string();
     107                    ptr->fileSystemPath = base.BF_GENERIC_STRING();
    101108                }
    102109                return ptr;
  • code/branches/kicklib2/src/libraries/core/command/ArgumentCompletionFunctions.cc

    r8284 r8285  
    3535
    3636#include <map>
    37 #include <boost/version.hpp>
    3837#include <boost/filesystem.hpp>
    3938
     
    4746#include "TclThreadManager.h"
    4847
    49 // Boost 1.36 has some issues with deprecated functions that have been omitted
    50 #if (BOOST_VERSION == 103600)
    51 #  define BOOST_LEAF_FUNCTION filename
    52 #  define BOOST_DICTIONARY_ENTRY_NAME string
    53 #elif (BOOST_FILESYSTEM_VERSION < 3)
    54 #  define BOOST_LEAF_FUNCTION leaf
    55 #  define BOOST_DICTIONARY_ENTRY_NAME string
     48// Differentiate Boost Filesystem v2 and v3
     49#if (BOOST_FILESYSTEM_VERSION < 3)
     50#  define BF_LEAF leaf
     51#  define BF_GENERIC_STRING string
     52#  define BF_DICTIONARY_ENTRY_NAME string
    5653#else
    57 #  define BOOST_LEAF_FUNCTION path().filename().string
    58 #  define BOOST_DICTIONARY_ENTRY_NAME path().string
     54#  define BF_LEAF path().filename().string
     55#  define BF_GENERIC_STRING generic_string
     56#  define BF_DICTIONARY_ENTRY_NAME path().string
    5957#endif
    6058
     
    250248                else
    251249                {
    252                     const std::string& dir = startdirectory.string();
     250                    const std::string& dir = startdirectory.BF_GENERIC_STRING();
    253251                    if (dir.size() > 0 && dir[dir.size() - 1] == ':')
    254252                        startdirectory = dir + '/';
     
    262260                {
    263261                    if (boost::filesystem::is_directory(*file))
    264                         dirlist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
     262                        dirlist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/'));
    265263                    else
    266                         filelist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME(), getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()), file->BOOST_LEAF_FUNCTION()));
     264                        filelist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF()));
    267265                    ++file;
    268266                }
  • code/branches/kicklib2/src/orxonox/sound/SoundManager.cc

    r8284 r8285  
    330330        ALenum error = alGetError();
    331331        if (error == AL_INVALID_VALUE)
     332            // @TODO: Follow this constantly appearing, nerve-racking warning
    332333            COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;
    333334    }
Note: See TracChangeset for help on using the changeset viewer.