Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8073


Ignore:
Timestamp:
Mar 14, 2011, 4:08:06 AM (13 years ago)
Author:
rgrieder
Message:

Merged mac_osx branch (after renaming it from ois_update) into kicklib branch.

Location:
code/branches/kicklib
Files:
2 deleted
27 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib

  • code/branches/kicklib/cmake/CompilerConfigGCC.cmake

    r8071 r8073  
    6565
    6666# CMake doesn't seem to set the PIC flags right on certain 64 bit systems
    67 # Todo: MinGW too?
    68 IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
     67IF(NOT MINGW AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    6968  ADD_COMPILER_FLAGS("-fPIC" CACHE)
    7069ENDIF()
  • code/branches/kicklib/cmake/LibraryConfig.cmake

    r8071 r8073  
    4848# Scripts for specific library and CMake config
    4949INCLUDE(LibraryConfigTardis)
    50 #INCLUDE(LibraryConfigOSX)
    5150
    5251IF(DEPENDENCY_PACKAGE_ENABLE)
  • code/branches/kicklib/cmake/PackageConfigMSVC.cmake

    r8071 r8073  
    5959  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    6060  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     61  # Part of Platform SDK and usually gets linked automatically
     62  SET(WMI_LIBRARY  wbemuuid.lib)
    6163
    6264ENDIF(MSVC)
  • code/branches/kicklib/cmake/PackageConfigMinGW.cmake

    r8071 r8073  
    5353  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/libzlib.dll CACHE FILEPATH "")
    5454
     55  # Not included in MinGW, so we need to supply it for OIS
     56  SET(WMI_INCLUDE_DIR ${DEP_INCLUDE_DIR}/wmi/include)
     57  SET(WMI_LIBRARY     ${DEP_LIBRARY_DIR}/wbemuuid.lib)
     58
    5559ENDIF(MINGW)
  • code/branches/kicklib/cmake/PackageConfigOSX.cmake

    r8071 r8073  
    5151SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
    5252
     53# For OS X 10.5 we have to ship modified headers to make it compile
     54# on gcc >= 4.2 (binaries stay the same)
     55# Sets the library path for the FIND_LIBRARY
     56IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5")
     57  SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
     58ENDIF()
     59
    5360# Xcode won't be able to run the toluabind code generation if we're using the dependency package
    5461#IF(DEPENDENCY_PACKAGE_ENABLE)
  • code/branches/kicklib/cmake/tools/FindALUT.cmake

    r8071 r8073  
    1 # Find ALUT includes and library
    2 #
    3 # This module defines
    4 #  ALUT_INCLUDE_DIR
    5 #  ALUT_LIBRARY, the library to link against to use ALUT.
    6 #  ALUT_FOUND, If false, do not try to use ALUT
    7 #
    8 # Copyright © 2007, Matt Williams
    9 # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture
    10 # of the ETH Zurich (removed later on)
    11 #
    12 # Redistribution and use is allowed according to the terms of the BSD license.
    13 #
    14 # Several changes and additions by Fabian 'x3n' Landau
    15 # Lots of simplifications by Adrian Friedli
    16 # Version checking by Reto Grieder
    17 # Adaption of the OGRE find script to ALUT by Kevin Young
    18 #                 > www.orxonox.net <
     1 #
     2 #             ORXONOX - the hottest 3D action shooter ever to exist
     3 #                             > www.orxonox.net <
     4 #
     5 #        This program is free software; you can redistribute it and/or
     6 #         modify it under the terms of the GNU General Public License
     7 #        as published by the Free Software Foundation; either version 2
     8 #            of the License, or (at your option) any later version.
     9 #
     10 #       This program is distributed in the hope that it will be useful,
     11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 #                 GNU General Public License for more details.
     14 #
     15 #   You should have received a copy of the GNU General Public License along
     16 #      with this program; if not, write to the Free Software Foundation,
     17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     18 #
     19 #
     20 #  Author:
     21 #    Kevin Young
     22 #  Description:
     23 #    Variables defined:
     24 #      ALUT_FOUND
     25 #      ALUT_INCLUDE_DIR
     26 #      ALUT_LIBRARY
     27 #
    1928
    20 INCLUDE(FindPackageHandleAdvancedArgs)
     29INCLUDE(FindPackageHandleStandardArgs)
    2130INCLUDE(HandleLibraryTypes)
    2231
    2332FIND_PATH(ALUT_INCLUDE_DIR alut.h
    2433  PATHS $ENV{ALUTDIR}
    25   PATH_SUFFIXES include include/AL ALUT
     34  PATH_SUFFIXES include include/AL Headers Headers/AL
    2635)
    2736FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
    28   NAMES ALUT alut
     37  NAMES alut ALUT
    2938  PATHS $ENV{ALUTDIR}
    3039  PATH_SUFFIXES lib bin/Release bin/release Release release ALUT
    3140)
    3241FIND_LIBRARY(ALUT_LIBRARY_DEBUG
    33   NAMES ALUTD alutd alut_d alutD alut_D
     42  NAMES alutd alut_d alutD alut_D ALUTd ALUT_d ALUTD ALUT_D
    3443  PATHS $ENV{ALUTDIR}
    3544  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug ALUT
     
    3746
    3847# Handle the REQUIRED argument and set ALUT_FOUND
    39 # Also check the version requirements
    40 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ALUT DEFAULT_MSG
     48FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
    4149  ALUT_LIBRARY_OPTIMIZED
    4250  ALUT_INCLUDE_DIR
  • code/branches/kicklib/src/OrxonoxConfig.cmake

    r8071 r8073  
    6969ENDIF(MSVC)
    7070
    71 # Part of a woraround for OS X warnings. See OrxonoxConfig.h.in
    72 IF(HAVE_STDINT_H)
    73   SET(HAVE_STDINT_H 1)
    74 ELSE()
    75   SET(HAVE_STDINT_H 0)
    76 ENDIF()
    77 
    78 # Check iso646.h include (literal operators)
     71# Check some non standard system includes
    7972INCLUDE(CheckIncludeFileCXX)
    8073CHECK_INCLUDE_FILE_CXX(iso646.h HAVE_ISO646_H)
     74CHECK_INCLUDE_FILE_CXX(stdint.h HAVE_STDINT_H)
     75
     76# Part of a woraround for OS X warnings. See OrxonoxConfig.h.in
     77SET(ORX_HAVE_STDINT_H ${HAVE_STDINT_H})
    8178
    8279IF(MSVC)
  • code/branches/kicklib/src/OrxonoxConfig.h.in

    r8071 r8073  
    162162
    163163// On OS X some headers already define HAVE_STDINT_H and that spits out
    164 // some warnings. Therefore we use this syntax.
     164// some warnings. Therefore we use this macro.
    165165// Note: This requires some extra code in OrxonoxConfig.cmake
    166 #if @HAVE_STDINT_H@
     166#cmakedefine ORX_HAVE_STDINT_H
     167#ifdef ORX_HAVE_STDINT_H
    167168#  include <stdint.h>
    168169#elif defined(ORXONOX_COMPILER_MSVC)
  • code/branches/kicklib/src/external/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp

    r8071 r8073  
    3838int gNumGjkChecks = 0;
    3939
    40 #ifdef check
    41 struct CompilerError
    42 {
    43     void CompilerError() {}
    44 };
    45 #endif
    4640
    4741btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver*  penetrationDepthSolver)
  • code/branches/kicklib/src/external/ois/CMakeLists.txt

    r8071 r8073  
    3535  OISPrereqs.h
    3636
    37   #COMPILATION_BEGIN OISCompilation.cpp
     37#COMPILATION_BEGIN OISCompilation.cpp
    3838  OISEffect.cpp
    3939  OISException.cpp
     
    4343  OISKeyboard.cpp
    4444  OISObject.cpp
    45   #COMPILATION_END
     45#COMPILATION_END
    4646)
    4747IF(WIN32)
     
    5353ENDIF()
    5454
     55# Some unexplained hackery for Visual Studio 2005
     56ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
     57
     58# MinGW doesn't come with some required Windows headers
     59IF(MINGW)
     60  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
     61ENDIF()
     62
    5563ORXONOX_ADD_LIBRARY(ois_orxonox
    5664  ORXONOX_EXTERNAL
     
    5866    "OIS_NONCLIENT_BUILD"
    5967  VERSION
    60     1.2
     68    1.3
    6169  SOURCE_FILES
    6270    ${OIS_FILES}
     
    6472
    6573IF(WIN32)
    66   TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
     74  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES} ${WMI_LIBRARY})
    6775ELSEIF(APPLE)
    6876  TARGET_LINK_LIBRARIES(ois_orxonox "/System/Library/Frameworks/IOKit.framework" "/System/Library/Frameworks/Carbon.framework")
  • code/branches/kicklib/src/external/ois/OISPrereqs.h

    r8071 r8073  
    101101//-------------- Common Classes, Enums, and Typdef's -------------------------//
    102102#define OIS_VERSION_MAJOR 1
    103 #define OIS_VERSION_MINOR 4
     103#define OIS_VERSION_MINOR 3
    104104#define OIS_VERSION_PATCH 0
    105 #define OIS_VERSION_NAME "1.4.0"
     105#define OIS_VERSION_NAME "1.3.0"
    106106
    107107#define OIS_VERSION ((OIS_VERSION_MAJOR << 16) | (OIS_VERSION_MINOR << 8) | OIS_VERSION_PATCH)
  • code/branches/kicklib/src/external/ois/VERSION

    r8071 r8073  
    1 OIS SVN trunk updated on 2010/10/07 (revision 26)
    2 https://wgois.svn.sourceforge.net/svnroot/wgois/ois/trunk/
     1OIS SVN v1.3 branch updated on 2011/02/20 (revision 32)
     2https://wgois.svn.sourceforge.net/svnroot/wgois/ois/branches/v1-3/
  • code/branches/kicklib/src/external/ois/changes_orxonox.diff

    r8071 r8073  
    4949
    5050
     51--- win32/Win32JoyStick.cpp
     52+++ win32/Win32JoyStick.cpp
     53@@ -26,6 +26,14 @@
     54 #include "OISEvents.h"
     55 #include "OISException.h"
     56 
     57+// (Orxonox): Required for MinGW to compile properly
     58+#ifdef __MINGW32__
     59+#  include <oaidl.h>
     60+#  ifndef __MINGW_EXTENSION
     61+#    define __MINGW_EXTENSION __extension__
     62+#  endif
     63+#endif
     64+
     65 #include <cassert>
     66 #include <wbemidl.h>
     67 #include <oleauto.h>
     68@@ -39,6 +47,11 @@
     69    }
     70 #endif
     71 
     72+// (Orxonox): MinGW doesn't have swscanf_s
     73+#ifdef __MINGW32__
     74+#      define swscanf_s swscanf
     75+#endif
     76+
     77 #ifdef OIS_WIN32_XINPUT_SUPPORT
     78 #      pragma comment(lib, "xinput.lib")
     79 #endif
     80@@ -583,7 +596,12 @@
     81     bool bCleanupCOM = SUCCEEDED(hr);
     82 
     83     // Create WMI
     84+    // (Orxonox): Fix for MinGW
     85+#ifdef __MINGW32__
     86+    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
     87+#else
     88     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
     89+#endif
     90     if( FAILED(hr) || pIWbemLocator == NULL )
     91         goto LCleanup;
     92 
     93
    5194--- mac/MacHIDManager.cpp
    5295+++ mac/MacHIDManager.cpp
  • code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp

    r8071 r8073  
    284284        while( XPending(display) > 0 )
    285285        {
    286                 XNextEvent(display, &event);            if(KeyPress == event.type)
     286                XNextEvent(display, &event);
     287
     288                if(KeyPress == event.type)
    287289                {
    288290                        unsigned int character = 0;
  • code/branches/kicklib/src/external/ois/mac/CMakeLists.txt

    r8071 r8073  
    88  MacPrereqs.h
    99
    10   #COMPILATION_BEGIN OISMacCompilation.cpp
     10#COMPILATION_BEGIN OISMacCompilation.cpp
    1111  MacHelpers.cpp
    1212  MacHIDManager.cpp
     
    1515  MacKeyboard.cpp
    1616  MacMouse.cpp
    17   #COMPILATION_END
     17#COMPILATION_END
    1818)
  • code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp

    r8071 r8073  
    2626#include "OISEvents.h"
    2727#include "OISException.h"
     28
     29// (Orxonox): Required for MinGW to compile properly
     30#ifdef __MINGW32__
     31#  include <oaidl.h>
     32#  ifndef __MINGW_EXTENSION
     33#    define __MINGW_EXTENSION __extension__
     34#  endif
     35#endif
    2836
    2937#include <cassert>
     
    3846      x = NULL;         \
    3947   }
     48#endif
     49
     50// (Orxonox): MinGW doesn't have swscanf_s
     51#ifdef __MINGW32__
     52#       define swscanf_s swscanf
    4053#endif
    4154
     
    584597
    585598    // Create WMI
     599    // (Orxonox): Fix for MinGW
     600#ifdef __MINGW32__
     601    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
     602#else
    586603    hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
     604#endif
    587605    if( FAILED(hr) || pIWbemLocator == NULL )
    588606        goto LCleanup;
  • code/branches/kicklib/src/libraries/core/DynLib.h

    r8071 r8073  
    110110
    111111    protected:
     112
    112113        /// Handle to the loaded library.
    113114        DYNLIB_HANDLE m_hInst;
  • code/branches/kicklib/src/libraries/core/GUIManager.cc

    r8071 r8073  
    369369        false                     | False | True  | Dontcare
    370370        */
     371
     372#ifdef ORXONOX_PLATFORM_APPLE
     373        // There is no non exclusive mode on OS X yet
     374        state->setMouseExclusive(TriBool::True);
     375#else
    371376        if (showCursor == TriBool::Dontcare)
    372377            state->setMouseExclusive(TriBool::Dontcare);
     
    375380        else
    376381            state->setMouseExclusive(TriBool::False);
     382#endif
    377383
    378384        if (showCursor == TriBool::True)
     
    436442    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
    437443    {
    438         //guiSystem_->injectMouseButtonDown(convertButton(id));
    439444        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
    440445    }
  • code/branches/kicklib/src/libraries/core/GraphicsManager.cc

    r8071 r8073  
    269269
    270270        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
    271                
     271
    272272// HACK
    273273#ifdef ORXONOX_PLATFORM_APPLE
     
    278278#endif
    279279// End of HACK
    280                
     280
    281281        // create a full screen default viewport
    282282        // Note: This may throw when adding a viewport with an existing z-order!
  • code/branches/kicklib/src/libraries/core/PathConfig.cc

    r8071 r8073  
    208208#ifdef ORXONOX_PLATFORM_UNIX
    209209            char* userDataPathPtr(getenv("HOME"));
    210 #elif ORXONOX_PLATFORM_APPLE
    211             char* userDataPathPtr(getenv("HOME"));
    212210#else
    213211            char* userDataPathPtr(getenv("APPDATA"));
  • code/branches/kicklib/src/orxonox/MoodManager.cc

    r8071 r8073  
    5050
    5151        // Checking for the existence of the folder for the default mood
    52         const std::string& patha = "ambient/" + MoodManager::defaultMood_ + "/.";
    53         if (!Resource::exists(patha))
     52        const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/.";
     53        if (!Resource::exists(path))
    5454        {
    5555            // TODO: Non-fatal error handling (non-critical resource missing)
  • code/branches/kicklib/src/orxonox/sound/BaseSound.cc

    r8071 r8073  
    3131#include <cassert>
    3232#include <vector>
    33 
    34 #ifdef ORXONOX_PLATFORM_APPLE
    35 #include "openal/al.h"
    36 #else
    3733#include <al.h>
    38 #endif
    3934
    4035#include "util/Math.h"
  • code/branches/kicklib/src/orxonox/sound/SoundBuffer.cc

    r8071 r8073  
    3030#include "SoundBuffer.h"
    3131
    32 #if defined(ORXONOX_PLATFORM_APPLE)
    33 #include <ALUT/alut.h>
    34 #else
    35 #include <AL/alut.h>
    36 #endif
     32#include <alut.h>
    3733#include <vorbis/vorbisfile.h>
    3834
  • code/branches/kicklib/src/orxonox/sound/SoundManager.cc

    r8071 r8073  
    3131#include "SoundManager.h"
    3232
    33 #if defined(__APPLE__)
    34 #include <ALUT/alut.h>
    35 #else
    36 #include <AL/alut.h>
    37 #endif
    3833#include <utility>
     34#include <alut.h>
    3935#include <loki/ScopeGuard.h>
    4036
     
    8581        SetConfigValue(bDisableSound_, false);
    8682        if (bDisableSound_)
    87             ThrowException(InitialisationAborted, "Sound: Not loading at all");       
     83            ThrowException(InitialisationAborted, "Sound: Not loading at all");
    8884        if (!alutInitWithoutContext(NULL, NULL))
    8985            ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
     
    133129        GameMode::setPlaysSound(true);
    134130        Loki::ScopeGuard resetPlaysSoundGuard = Loki::MakeGuard(&GameMode::setPlaysSound, false);
    135        
     131
    136132        // Get some information about the sound
    137133        if (const char* version = alGetString(AL_VERSION))
    138             COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;           
     134            COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;
    139135        if (const char* vendor = alGetString(AL_VENDOR))
    140136            COUT(4) << "Sound: --- OpenAL Vendor : " << vendor << std::endl;
  • code/branches/kicklib/src/orxonox/sound/SoundStreamer.cc

    r8071 r8073  
    2727#include "SoundStreamer.h"
    2828
    29 #ifdef ORXONOX_PLATFORM_APPLE
    30 #include "openal/al.h"
    31 #else
    3229#include <al.h>
    33 #endif
    34 
    3530#include <vorbis/vorbisfile.h>
    3631#include "SoundManager.h"
  • code/branches/kicklib/src/orxonox/sound/WorldSound.cc

    r8071 r8073  
    3030#include "WorldSound.h"
    3131
    32 #if defined(__APPLE__)
    33 #include <ALUT/alut.h>
    34 #else
    35 #include <AL/alut.h>
    36 #endif
     32#include <alut.h>
     33
    3734#include "util/Math.h"
    3835#include "core/CoreIncludes.h"
Note: See TracChangeset for help on using the changeset viewer.