[Orxonox-commit 3386] r8073 - in code/branches/kicklib: . cmake cmake/tools src src/external src/external/bullet/BulletCollision/NarrowPhaseCollision src/external/ois src/external/ois/linux src/external/ois/mac src/external/ois/win32 src/libraries/core src/orxonox src/orxonox/sound

rgrieder at orxonox.net rgrieder at orxonox.net
Mon Mar 14 04:08:07 CET 2011


Author: rgrieder
Date: 2011-03-14 04:08:06 +0100 (Mon, 14 Mar 2011)
New Revision: 8073

Removed:
   code/branches/kicklib/cmake/LibraryConfigOSX.cmake
   code/branches/kicklib/src/external/openal/
Modified:
   code/branches/kicklib/
   code/branches/kicklib/cmake/CompilerConfigGCC.cmake
   code/branches/kicklib/cmake/LibraryConfig.cmake
   code/branches/kicklib/cmake/PackageConfigMSVC.cmake
   code/branches/kicklib/cmake/PackageConfigMinGW.cmake
   code/branches/kicklib/cmake/PackageConfigOSX.cmake
   code/branches/kicklib/cmake/tools/FindALUT.cmake
   code/branches/kicklib/src/OrxonoxConfig.cmake
   code/branches/kicklib/src/OrxonoxConfig.h.in
   code/branches/kicklib/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
   code/branches/kicklib/src/external/ois/CMakeLists.txt
   code/branches/kicklib/src/external/ois/OISPrereqs.h
   code/branches/kicklib/src/external/ois/VERSION
   code/branches/kicklib/src/external/ois/changes_orxonox.diff
   code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp
   code/branches/kicklib/src/external/ois/mac/CMakeLists.txt
   code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp
   code/branches/kicklib/src/libraries/core/DynLib.h
   code/branches/kicklib/src/libraries/core/GUIManager.cc
   code/branches/kicklib/src/libraries/core/GraphicsManager.cc
   code/branches/kicklib/src/libraries/core/PathConfig.cc
   code/branches/kicklib/src/orxonox/MoodManager.cc
   code/branches/kicklib/src/orxonox/sound/BaseSound.cc
   code/branches/kicklib/src/orxonox/sound/SoundBuffer.cc
   code/branches/kicklib/src/orxonox/sound/SoundManager.cc
   code/branches/kicklib/src/orxonox/sound/SoundStreamer.cc
   code/branches/kicklib/src/orxonox/sound/WorldSound.cc
Log:
Merged mac_osx branch (after renaming it from ois_update) into kicklib branch.


Property changes on: code/branches/kicklib
___________________________________________________________________
Modified: svn:mergeinfo
   - /code/branches/ai:6592-7033
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/lastmanstanding:7479-7644
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051
/code/branches/weaponsystem:2742-2890
   + /code/branches/ai:6592-7033
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/lastmanstanding:7479-7644
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8072
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/steering:5949-6091
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051
/code/branches/weaponsystem:2742-2890

Modified: code/branches/kicklib/cmake/CompilerConfigGCC.cmake
===================================================================
--- code/branches/kicklib/cmake/CompilerConfigGCC.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/CompilerConfigGCC.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -64,8 +64,7 @@
 ADD_COMPILER_FLAGS("-Os"                   MinSizeRel     CACHE)
 
 # CMake doesn't seem to set the PIC flags right on certain 64 bit systems
-# Todo: MinGW too?
-IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+IF(NOT MINGW AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
   ADD_COMPILER_FLAGS("-fPIC" CACHE)
 ENDIF()
 

Modified: code/branches/kicklib/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/kicklib/cmake/LibraryConfig.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/LibraryConfig.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -47,7 +47,6 @@
 
 # Scripts for specific library and CMake config
 INCLUDE(LibraryConfigTardis)
-#INCLUDE(LibraryConfigOSX)
 
 IF(DEPENDENCY_PACKAGE_ENABLE)
   GET_FILENAME_COMPONENT(_dep_dir_1 ${CMAKE_SOURCE_DIR}/../dependencies ABSOLUTE)

Deleted: code/branches/kicklib/cmake/LibraryConfigOSX.cmake
===================================================================
--- code/branches/kicklib/cmake/LibraryConfigOSX.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/LibraryConfigOSX.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -1,29 +0,0 @@
- #
- #             ORXONOX - the hottest 3D action shooter ever to exist
- #                             > www.orxonox.net <
- #
- #        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; either version 2
- #            of the License, or (at your option) any later version.
- #
- #       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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- #
- #
- #  Author:
- #    Kevin Young
- #  Description:
- #    Sets necessary library options and paths on Mac.
- #
-
-IF(APPLE)
-  MESSAGE(STATUS "Running on Apple. Using customized paths and options.")
-  
-ENDIF(APPLE)

Modified: code/branches/kicklib/cmake/PackageConfigMSVC.cmake
===================================================================
--- code/branches/kicklib/cmake/PackageConfigMSVC.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/PackageConfigMSVC.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -58,5 +58,7 @@
   # to specify the libraries ourselves.
   SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
   SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
+  # Part of Platform SDK and usually gets linked automatically
+  SET(WMI_LIBRARY  wbemuuid.lib)
 
 ENDIF(MSVC)

Modified: code/branches/kicklib/cmake/PackageConfigMinGW.cmake
===================================================================
--- code/branches/kicklib/cmake/PackageConfigMinGW.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/PackageConfigMinGW.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -52,4 +52,8 @@
   SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
   SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/libzlib.dll CACHE FILEPATH "")
 
+  # Not included in MinGW, so we need to supply it for OIS
+  SET(WMI_INCLUDE_DIR ${DEP_INCLUDE_DIR}/wmi/include)
+  SET(WMI_LIBRARY     ${DEP_LIBRARY_DIR}/wbemuuid.lib)
+
 ENDIF(MINGW)

Modified: code/branches/kicklib/cmake/PackageConfigOSX.cmake
===================================================================
--- code/branches/kicklib/cmake/PackageConfigOSX.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/PackageConfigOSX.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -50,6 +50,13 @@
 SET(ENV{OGRE_HOME}             ${DEP_FRAMEWORK_DIR})
 SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
 
+# For OS X 10.5 we have to ship modified headers to make it compile
+# on gcc >= 4.2 (binaries stay the same)
+# Sets the library path for the FIND_LIBRARY
+IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5")
+  SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
+ENDIF()
+
 # Xcode won't be able to run the toluabind code generation if we're using the dependency package
 #IF(DEPENDENCY_PACKAGE_ENABLE)
 #  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")

Modified: code/branches/kicklib/cmake/tools/FindALUT.cmake
===================================================================
--- code/branches/kicklib/cmake/tools/FindALUT.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/cmake/tools/FindALUT.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -1,43 +1,51 @@
-# Find ALUT includes and library
-#
-# This module defines
-#  ALUT_INCLUDE_DIR
-#  ALUT_LIBRARY, the library to link against to use ALUT.
-#  ALUT_FOUND, If false, do not try to use ALUT
-#
-# Copyright © 2007, Matt Williams
-# Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture
-# of the ETH Zurich (removed later on)
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Lots of simplifications by Adrian Friedli
-# Version checking by Reto Grieder
-# Adaption of the OGRE find script to ALUT by Kevin Young
-#                 > www.orxonox.net <
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        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; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Kevin Young
+ #  Description:
+ #    Variables defined:
+ #      ALUT_FOUND
+ #      ALUT_INCLUDE_DIR
+ #      ALUT_LIBRARY
+ #
 
-INCLUDE(FindPackageHandleAdvancedArgs)
+INCLUDE(FindPackageHandleStandardArgs)
 INCLUDE(HandleLibraryTypes)
 
 FIND_PATH(ALUT_INCLUDE_DIR alut.h
   PATHS $ENV{ALUTDIR}
-  PATH_SUFFIXES include include/AL ALUT
+  PATH_SUFFIXES include include/AL Headers Headers/AL
 )
 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
-  NAMES ALUT alut
+  NAMES alut ALUT
   PATHS $ENV{ALUTDIR}
   PATH_SUFFIXES lib bin/Release bin/release Release release ALUT
 )
 FIND_LIBRARY(ALUT_LIBRARY_DEBUG
-  NAMES ALUTD alutd alut_d alutD alut_D
+  NAMES alutd alut_d alutD alut_D ALUTd ALUT_d ALUTD ALUT_D
   PATHS $ENV{ALUTDIR}
   PATH_SUFFIXES lib bin/Debug bin/debug Debug debug ALUT
 )
 
 # Handle the REQUIRED argument and set ALUT_FOUND
-# Also check the version requirements
-FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ALUT DEFAULT_MSG
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
   ALUT_LIBRARY_OPTIMIZED
   ALUT_INCLUDE_DIR
 )

Modified: code/branches/kicklib/src/OrxonoxConfig.cmake
===================================================================
--- code/branches/kicklib/src/OrxonoxConfig.cmake	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/OrxonoxConfig.cmake	2011-03-14 03:08:06 UTC (rev 8073)
@@ -68,17 +68,14 @@
   CHECK_CXX_SOURCE_COMPILES("${_source}" HAVE_FORCEINLINE)
 ENDIF(MSVC)
 
-# Part of a woraround for OS X warnings. See OrxonoxConfig.h.in
-IF(HAVE_STDINT_H)
-  SET(HAVE_STDINT_H 1)
-ELSE()
-  SET(HAVE_STDINT_H 0)
-ENDIF()
-
-# Check iso646.h include (literal operators)
+# Check some non standard system includes
 INCLUDE(CheckIncludeFileCXX)
 CHECK_INCLUDE_FILE_CXX(iso646.h HAVE_ISO646_H)
+CHECK_INCLUDE_FILE_CXX(stdint.h HAVE_STDINT_H)
 
+# Part of a woraround for OS X warnings. See OrxonoxConfig.h.in
+SET(ORX_HAVE_STDINT_H ${HAVE_STDINT_H})
+
 IF(MSVC)
   # Check whether we can use Visual Leak Detector
   FIND_FILE(VLD_DLL vld_x86.dll)

Modified: code/branches/kicklib/src/OrxonoxConfig.h.in
===================================================================
--- code/branches/kicklib/src/OrxonoxConfig.h.in	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/OrxonoxConfig.h.in	2011-03-14 03:08:06 UTC (rev 8073)
@@ -161,9 +161,10 @@
 #endif
 
 // On OS X some headers already define HAVE_STDINT_H and that spits out
-// some warnings. Therefore we use this syntax.
+// some warnings. Therefore we use this macro.
 // Note: This requires some extra code in OrxonoxConfig.cmake
-#if @HAVE_STDINT_H@
+#cmakedefine ORX_HAVE_STDINT_H
+#ifdef ORX_HAVE_STDINT_H
 #  include <stdint.h>
 #elif defined(ORXONOX_COMPILER_MSVC)
 typedef __int8            int8_t;

Modified: code/branches/kicklib/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
===================================================================
--- code/branches/kicklib/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp	2011-03-14 03:08:06 UTC (rev 8073)
@@ -37,12 +37,6 @@
 int gNumDeepPenetrationChecks = 0;
 int gNumGjkChecks = 0;
 
-#ifdef check
-struct CompilerError
-{
-    void CompilerError() {}
-};
-#endif
 
 btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver*	penetrationDepthSolver)
 :m_cachedSeparatingAxis(btScalar(0.),btScalar(1.),btScalar(0.)),

Modified: code/branches/kicklib/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/ois/CMakeLists.txt	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/CMakeLists.txt	2011-03-14 03:08:06 UTC (rev 8073)
@@ -34,7 +34,7 @@
   OISObject.h
   OISPrereqs.h
 
-  #COMPILATION_BEGIN OISCompilation.cpp
+#COMPILATION_BEGIN OISCompilation.cpp
   OISEffect.cpp
   OISException.cpp
   OISForceFeedback.cpp
@@ -42,7 +42,7 @@
   OISJoyStick.cpp
   OISKeyboard.cpp
   OISObject.cpp
-  #COMPILATION_END
+#COMPILATION_END
 )
 IF(WIN32)
   ADD_SUBDIRECTORY(win32)
@@ -52,18 +52,26 @@
   ADD_SUBDIRECTORY(linux)
 ENDIF()
 
+# Some unexplained hackery for Visual Studio 2005
+ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
+
+# MinGW doesn't come with some required Windows headers
+IF(MINGW)
+  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
+ENDIF()
+
 ORXONOX_ADD_LIBRARY(ois_orxonox
   ORXONOX_EXTERNAL
   DEFINE_SYMBOL
     "OIS_NONCLIENT_BUILD"
   VERSION
-    1.2
+    1.3
   SOURCE_FILES
     ${OIS_FILES}
 )
 
 IF(WIN32)
-  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
+  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES} ${WMI_LIBRARY})
 ELSEIF(APPLE)
   TARGET_LINK_LIBRARIES(ois_orxonox "/System/Library/Frameworks/IOKit.framework" "/System/Library/Frameworks/Carbon.framework")
 ENDIF()

Modified: code/branches/kicklib/src/external/ois/OISPrereqs.h
===================================================================
--- code/branches/kicklib/src/external/ois/OISPrereqs.h	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/OISPrereqs.h	2011-03-14 03:08:06 UTC (rev 8073)
@@ -100,9 +100,9 @@
 
 //-------------- Common Classes, Enums, and Typdef's -------------------------//
 #define OIS_VERSION_MAJOR 1
-#define OIS_VERSION_MINOR 4
+#define OIS_VERSION_MINOR 3
 #define OIS_VERSION_PATCH 0
-#define OIS_VERSION_NAME "1.4.0"
+#define OIS_VERSION_NAME "1.3.0"
 
 #define OIS_VERSION ((OIS_VERSION_MAJOR << 16) | (OIS_VERSION_MINOR << 8) | OIS_VERSION_PATCH)
 

Modified: code/branches/kicklib/src/external/ois/VERSION
===================================================================
--- code/branches/kicklib/src/external/ois/VERSION	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/VERSION	2011-03-14 03:08:06 UTC (rev 8073)
@@ -1,2 +1,2 @@
-OIS SVN trunk updated on 2010/10/07 (revision 26)
-https://wgois.svn.sourceforge.net/svnroot/wgois/ois/trunk/
+OIS SVN v1.3 branch updated on 2011/02/20 (revision 32)
+https://wgois.svn.sourceforge.net/svnroot/wgois/ois/branches/v1-3/

Modified: code/branches/kicklib/src/external/ois/changes_orxonox.diff
===================================================================
--- code/branches/kicklib/src/external/ois/changes_orxonox.diff	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/changes_orxonox.diff	2011-03-14 03:08:06 UTC (rev 8073)
@@ -48,6 +48,49 @@
    #include <iostream>
 
 
+--- win32/Win32JoyStick.cpp
++++ win32/Win32JoyStick.cpp
+@@ -26,6 +26,14 @@
+ #include "OISEvents.h"
+ #include "OISException.h"
+ 
++// (Orxonox): Required for MinGW to compile properly
++#ifdef __MINGW32__
++#  include <oaidl.h>
++#  ifndef __MINGW_EXTENSION
++#    define __MINGW_EXTENSION __extension__
++#  endif
++#endif
++
+ #include <cassert>
+ #include <wbemidl.h>
+ #include <oleauto.h>
+@@ -39,6 +47,11 @@
+    }
+ #endif
+ 
++// (Orxonox): MinGW doesn't have swscanf_s
++#ifdef __MINGW32__
++#	define swscanf_s swscanf
++#endif
++
+ #ifdef OIS_WIN32_XINPUT_SUPPORT
+ #	pragma comment(lib, "xinput.lib")
+ #endif
+@@ -583,7 +596,12 @@
+     bool bCleanupCOM = SUCCEEDED(hr);
+ 
+     // Create WMI
++    // (Orxonox): Fix for MinGW
++#ifdef __MINGW32__
++    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
++#else
+     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
++#endif
+     if( FAILED(hr) || pIWbemLocator == NULL )
+         goto LCleanup;
+ 
+
 --- mac/MacHIDManager.cpp
 +++ mac/MacHIDManager.cpp
 @@ -406,6 +406,7 @@

Modified: code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp
===================================================================
--- code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp	2011-03-14 03:08:06 UTC (rev 8073)
@@ -283,7 +283,9 @@
 
 	while( XPending(display) > 0 )
 	{
-		XNextEvent(display, &event); 		if(KeyPress == event.type)
+		XNextEvent(display, &event);
+
+		if(KeyPress == event.type)
 		{
 			unsigned int character = 0;
 

Modified: code/branches/kicklib/src/external/ois/mac/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/ois/mac/CMakeLists.txt	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/mac/CMakeLists.txt	2011-03-14 03:08:06 UTC (rev 8073)
@@ -7,12 +7,12 @@
   MacMouse.h
   MacPrereqs.h
 
-  #COMPILATION_BEGIN OISMacCompilation.cpp
+#COMPILATION_BEGIN OISMacCompilation.cpp
   MacHelpers.cpp
   MacHIDManager.cpp
   MacInputManager.cpp
   MacJoyStick.cpp
   MacKeyboard.cpp
   MacMouse.cpp
-  #COMPILATION_END
+#COMPILATION_END
 )

Modified: code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp
===================================================================
--- code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp	2011-03-14 03:08:06 UTC (rev 8073)
@@ -26,6 +26,14 @@
 #include "OISEvents.h"
 #include "OISException.h"
 
+// (Orxonox): Required for MinGW to compile properly
+#ifdef __MINGW32__
+#  include <oaidl.h>
+#  ifndef __MINGW_EXTENSION
+#    define __MINGW_EXTENSION __extension__
+#  endif
+#endif
+
 #include <cassert>
 #include <wbemidl.h>
 #include <oleauto.h>
@@ -39,6 +47,11 @@
    }
 #endif
 
+// (Orxonox): MinGW doesn't have swscanf_s
+#ifdef __MINGW32__
+#	define swscanf_s swscanf
+#endif
+
 #ifdef OIS_WIN32_XINPUT_SUPPORT
 #	pragma comment(lib, "xinput.lib")
 #endif
@@ -583,7 +596,12 @@
     bool bCleanupCOM = SUCCEEDED(hr);
 
     // Create WMI
+    // (Orxonox): Fix for MinGW
+#ifdef __MINGW32__
+    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
+#else
     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
+#endif
     if( FAILED(hr) || pIWbemLocator == NULL )
         goto LCleanup;
 

Modified: code/branches/kicklib/src/libraries/core/DynLib.h
===================================================================
--- code/branches/kicklib/src/libraries/core/DynLib.h	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/libraries/core/DynLib.h	2011-03-14 03:08:06 UTC (rev 8073)
@@ -109,6 +109,7 @@
         void* getSymbol( const std::string& strName ) const throw();
 
     protected:
+
         /// Handle to the loaded library.
         DYNLIB_HANDLE m_hInst;
     };

Modified: code/branches/kicklib/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/kicklib/src/libraries/core/GUIManager.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/libraries/core/GUIManager.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -368,12 +368,18 @@
         ----------------------------------------------------
         false                     | False | True  | Dontcare
         */
+
+#ifdef ORXONOX_PLATFORM_APPLE
+        // There is no non exclusive mode on OS X yet
+        state->setMouseExclusive(TriBool::True);
+#else
         if (showCursor == TriBool::Dontcare)
             state->setMouseExclusive(TriBool::Dontcare);
         else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False)
             state->setMouseExclusive(TriBool::True);
         else
             state->setMouseExclusive(TriBool::False);
+#endif
 
         if (showCursor == TriBool::True)
             state->setMouseHandler(this);
@@ -435,7 +441,6 @@
     */
     void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
     {
-        //guiSystem_->injectMouseButtonDown(convertButton(id));
         this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
     }
 

Modified: code/branches/kicklib/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/kicklib/src/libraries/core/GraphicsManager.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/libraries/core/GraphicsManager.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -268,7 +268,7 @@
         this->ogreWindowEventListener_->windowResized(renderWindow_);
 
         Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
-		
+
 // HACK
 #ifdef ORXONOX_PLATFORM_APPLE
         //INFO: This will give our window focus, and not lock it to the terminal
@@ -277,7 +277,7 @@
         SetFrontProcess(&psn);
 #endif
 // End of HACK
-		
+
         // create a full screen default viewport
         // Note: This may throw when adding a viewport with an existing z-order!
         //       But in our case we only have one viewport for now anyway, therefore

Modified: code/branches/kicklib/src/libraries/core/PathConfig.cc
===================================================================
--- code/branches/kicklib/src/libraries/core/PathConfig.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/libraries/core/PathConfig.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -207,8 +207,6 @@
             // Get user directory
 #ifdef ORXONOX_PLATFORM_UNIX
             char* userDataPathPtr(getenv("HOME"));
-#elif ORXONOX_PLATFORM_APPLE
-            char* userDataPathPtr(getenv("HOME"));
 #else
             char* userDataPathPtr(getenv("APPDATA"));
 #endif

Modified: code/branches/kicklib/src/orxonox/MoodManager.cc
===================================================================
--- code/branches/kicklib/src/orxonox/MoodManager.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/MoodManager.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -49,8 +49,8 @@
         oldMood_ = MoodManager::defaultMood_;
 
         // Checking for the existence of the folder for the default mood
-        const std::string& patha = "ambient/" + MoodManager::defaultMood_ + "/.";
-        if (!Resource::exists(patha))
+        const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/.";
+        if (!Resource::exists(path))
         {
             // TODO: Non-fatal error handling (non-critical resource missing)
             COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;

Modified: code/branches/kicklib/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/kicklib/src/orxonox/sound/BaseSound.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/sound/BaseSound.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -30,12 +30,7 @@
 
 #include <cassert>
 #include <vector>
-
-#ifdef ORXONOX_PLATFORM_APPLE
-#include "openal/al.h"
-#else
 #include <al.h>
-#endif
 
 #include "util/Math.h"
 #include "core/CoreIncludes.h"

Modified: code/branches/kicklib/src/orxonox/sound/SoundBuffer.cc
===================================================================
--- code/branches/kicklib/src/orxonox/sound/SoundBuffer.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/sound/SoundBuffer.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -29,11 +29,7 @@
 
 #include "SoundBuffer.h"
 
-#if defined(ORXONOX_PLATFORM_APPLE)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
+#include <alut.h>
 #include <vorbis/vorbisfile.h>
 
 #include "util/Exception.h"

Modified: code/branches/kicklib/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/kicklib/src/orxonox/sound/SoundManager.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/sound/SoundManager.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -30,12 +30,8 @@
 
 #include "SoundManager.h"
 
-#if defined(__APPLE__)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
 #include <utility>
+#include <alut.h>
 #include <loki/ScopeGuard.h>
 
 #include "util/Exception.h"
@@ -84,7 +80,7 @@
         bool bDisableSound_ = false;
         SetConfigValue(bDisableSound_, false);
         if (bDisableSound_)
-            ThrowException(InitialisationAborted, "Sound: Not loading at all");        
+            ThrowException(InitialisationAborted, "Sound: Not loading at all");
         if (!alutInitWithoutContext(NULL, NULL))
             ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
         Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
@@ -132,10 +128,10 @@
 
         GameMode::setPlaysSound(true);
         Loki::ScopeGuard resetPlaysSoundGuard = Loki::MakeGuard(&GameMode::setPlaysSound, false);
-        
+
         // Get some information about the sound
         if (const char* version = alGetString(AL_VERSION))
-            COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;            
+            COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;
         if (const char* vendor = alGetString(AL_VENDOR))
             COUT(4) << "Sound: --- OpenAL Vendor : " << vendor << std::endl;
         if (const char* types = alutGetMIMETypes(ALUT_LOADER_BUFFER))

Modified: code/branches/kicklib/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/kicklib/src/orxonox/sound/SoundStreamer.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/sound/SoundStreamer.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -26,12 +26,7 @@
  */
 #include "SoundStreamer.h"
 
-#ifdef ORXONOX_PLATFORM_APPLE
-#include "openal/al.h"
-#else
 #include <al.h>
-#endif
-
 #include <vorbis/vorbisfile.h>
 #include "SoundManager.h"
 

Modified: code/branches/kicklib/src/orxonox/sound/WorldSound.cc
===================================================================
--- code/branches/kicklib/src/orxonox/sound/WorldSound.cc	2011-03-14 03:05:13 UTC (rev 8072)
+++ code/branches/kicklib/src/orxonox/sound/WorldSound.cc	2011-03-14 03:08:06 UTC (rev 8073)
@@ -29,11 +29,8 @@
 
 #include "WorldSound.h"
 
-#if defined(__APPLE__)
-#include <ALUT/alut.h>
-#else
-#include <AL/alut.h>
-#endif
+#include <alut.h>
+
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/EventIncludes.h"




More information about the Orxonox-commit mailing list