Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/environment2/src/OrxonoxConfig.h.in @ 8877

Last change on this file since 8877 was 8351, checked in by rgrieder, 14 years ago

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
  • Property svn:eol-style set to native
File size: 6.7 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 *   Original code: OgrePlatform.h, licensed under the LGPL. The code
28 *   has changed almost completely though.
29 *
30 *   Caution: Do not configure this file CMake configuration (Debug, Release, etc.)
31 *            dependent! XCode and Visual Studio have the same file for all.
32 *
33 */
34
35/**
36@file
37@brief
38    Various constants for compiler, architecture and platform.
39@remarks
40    @GENERATED_FILE_COMMENT@
41*/
42
43#ifndef _OrxonoxConfig_H__
44#define _OrxonoxConfig_H__
45
46/*---------------------------------
47 * Platform and compiler related options
48 *-------------------------------*/
49#cmakedefine ORXONOX_PLATFORM_WINDOWS
50#cmakedefine ORXONOX_PLATFORM_LINUX
51#cmakedefine ORXONOX_PLATFORM_APPLE
52#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
53
54// Determine compiler and set ORXONOX_COMP_VER
55#if defined( _MSC_VER )
56#  define ORXONOX_COMPILER_MSVC
57#  define ORXONOX_COMP_VER _MSC_VER
58
59#elif defined( __GNUC__ )
60#  define ORXONOX_COMPILER_GCC
61#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
62        (__GNUC_MINOR__*10) + \
63        __GNUC_PATCHLEVEL__)
64#  if defined(__MINGW32__)
65#    define ORXONOX_COMPILER_MINGW
66#  endif
67
68#elif defined( __BORLANDC__ )
69#  define ORXONOX_COMPILER_BORLAND
70#  define ORXONOX_COMP_VER __BCPLUSPLUS__
71
72#else
73#  pragma error "No known compiler. Abort!"
74
75#endif
76
77// Endianness
78#cmakedefine ORXONOX_BIG_ENDIAN
79#cmakedefine ORXONOX_LITTLE_ENDIAN
80
81// Architecture
82#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
83#   define ORXONOX_ARCH_64
84#else
85#   define ORXONOX_ARCH_32
86#endif
87
88// See if we can use __forceinline or if we need to use __inline instead
89#cmakedefine HAVE_FORCEINLINE
90#ifndef ORX_FORCEINLINE
91#  ifdef HAVE_FORCEINLINE
92#    define ORX_FORCEINLINE __forceinline
93#  else
94#    define ORX_FORCEINLINE __inline
95#  endif
96#endif
97
98// Try to define function information
99#ifndef __FUNCTIONNAME__
100#  ifdef ORXONOX_COMPILER_BORLAND
101#    define __FUNCTIONNAME__ __FUNC__
102#  elif defined(ORXONOX_COMPILER_GCC)
103#    define __FUNCTIONNAME__ __PRETTY_FUNCTION__
104#  elif defined(ORXONOX_COMPILER_MSVC)
105#    define __FUNCTIONNAME__ __FUNCTION__
106#  else
107#    define __FUNCTIONNAME__
108#  endif
109#endif
110
111
112/*---------------------------------
113 * Version information
114 *-------------------------------*/
115#define ORXONOX_VERSION_MAJOR @ORXONOX_VERSION_MAJOR@
116#define ORXONOX_VERSION_MINOR @ORXONOX_VERSION_MINOR@
117#define ORXONOX_VERSION_PATCH @ORXONOX_VERSION_PATCH@
118#define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
119
120//! Defines version info encoded as 0xMMIIPP (M: Major version, I: Minor version, P: Patch version, all as hex)
121#define ORXONOX_VERSION \
122    ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
123
124
125/*---------------------------------
126 * Unix settings
127 *-------------------------------*/
128#ifdef ORXONOX_PLATFORM_UNIX
129
130// TODO: Check what this actually is and whether we need it or not
131#if 0
132#  ifdef ORXONOX_PLATFORM_APPLE
133#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
134#  else // ORXONOX_PLATFORM_LINUX
135#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
136#  endif
137#endif
138
139#endif /* Patform Unix */
140
141
142/*---------------------------------
143 * Apple Settings
144 *-------------------------------*/
145
146
147/*---------------------------------
148 * Options
149 *-------------------------------*/
150#cmakedefine ORXONOX_RELEASE  ///< Enables expensive (build time) optimisations and disables certain features
151
152
153/*---------------------------------
154 * Includes and Declarations
155 *-------------------------------*/
156// Define the english written operators like and, or, xor
157// This is C++ standard, but the Microsoft compiler doesn't define them.
158#cmakedefine HAVE_ISO646_H
159#ifdef HAVE_ISO646_H
160#  include <iso646.h>
161#endif
162
163// On OS X some headers already define HAVE_STDINT_H and that spits out
164// some warnings. Therefore we use this macro.
165// Note: This requires some extra code in OrxonoxConfig.cmake
166#cmakedefine ORX_HAVE_STDINT_H
167#ifdef ORX_HAVE_STDINT_H
168#  include <stdint.h>
169#elif defined(ORXONOX_COMPILER_MSVC)
170typedef __int8            int8_t;
171typedef __int16           int16_t;
172typedef __int32           int32_t;
173typedef __int64           int64_t;
174typedef unsigned __int8   uint8_t;
175typedef unsigned __int16  uint16_t;
176typedef unsigned __int32  uint32_t;
177typedef unsigned __int64  uint64_t;
178#endif
179
180#cmakedefine HAVE_STDDEF_H
181/* Quite large, do not include unless necessary
182#ifdef HAVE_STDDEF_H
183#  include <stddef.h>
184#endif
185*/
186
187// Include memory leak detector if available and not building actual release
188#cmakedefine HAVE_VLD
189#if defined(HAVE_VLD) && !defined(ORXONOX_RELEASE)
190typedef uint32_t UINT32;
191typedef wchar_t WCHAR;
192struct HINSTANCE__;
193typedef struct HINSTANCE__* HINSTANCE;
194typedef HINSTANCE HMODULE;
195#  ifndef NULL
196#    define NULL 0
197#  endif
198#  include <vld.h>
199#endif
200
201// Forward declare the everywhere used std::string
202namespace std
203{
204    template<class _Elem> struct char_traits;
205    template<class _Ty>   class  allocator;
206    template<class _Elem, class _Traits, class _Ax> class basic_string;
207    typedef basic_string<char, char_traits<char>, allocator<char> > string;
208}
209
210// Import general purpose smart pointers
211namespace boost
212{
213    template<class T> class scoped_ptr;
214    template<class T> class shared_ptr;
215    template<class T> class weak_ptr;
216    template<class T> class intrusive_ptr;
217    template<class T> class shared_array;
218    template<class T> class scoped_array;
219}
220namespace orxonox
221{
222    using boost::scoped_ptr;
223    using boost::shared_ptr;
224    using boost::weak_ptr;
225    using boost::intrusive_ptr;
226    using boost::shared_array;
227    using boost::scoped_array;
228}
229
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
240#endif /* _OrxonoxConfig_H__ */
Note: See TracBrowser for help on using the repository browser.