Index: code/trunk/src/libraries/core/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/core/CMakeLists.txt	(revision 8329)
+++ code/trunk/src/libraries/core/CMakeLists.txt	(revision 8351)
@@ -58,5 +58,4 @@
   command/ArgumentCompletionFunctions.cc
   ConfigFileManager.cc
-  MemoryArchive.cc
   PathConfig.cc
 COMPILATION_END
@@ -98,11 +97,14 @@
     ${CEGUI_LIBRARY}
     ${CEGUILUA_LIBRARY}
-    ${LUA_LIBRARIES}
+    ${CEGUI_TOLUA_LIBRARY}
+    ${CEGUI_OGRE_RENDERER_LIBRARY}
+    ${LUA5.1_LIBRARY}
     cpptcl_orxonox
-    ogreceguirenderer_orxonox
     ois_orxonox
     tinyxml_orxonox
-    tolua_orxonox
     util
+  LINK_LIBS_UNIX
+    dl
+    pthread
   SOURCE_FILES
     ${CORE_SRC_FILES}
Index: code/trunk/src/libraries/core/ConfigValueContainer.cc
===================================================================
--- code/trunk/src/libraries/core/ConfigValueContainer.cc	(revision 8329)
+++ code/trunk/src/libraries/core/ConfigValueContainer.cc	(revision 8351)
@@ -158,5 +158,4 @@
         {
             return this->callFunctionWithIndex(&ConfigValueContainer::tset, input);
-            return false;
         }
         else
Index: code/trunk/src/libraries/core/Core.cc
===================================================================
--- code/trunk/src/libraries/core/Core.cc	(revision 8329)
+++ code/trunk/src/libraries/core/Core.cc	(revision 8351)
@@ -81,5 +81,7 @@
 
     SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
+#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
     SetCommandLineSwitch(noIOConsole).information("Use this if you don't want to use the IOConsole (for instance for Lua debugging)");
+#endif
 
 #ifdef ORXONOX_PLATFORM_WINDOWS
@@ -156,5 +158,6 @@
         this->setConfigValues();
 
-        // create persistent io console
+#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
+        // Create persistent IO console
         if (CommandLineParser::getValue("noIOConsole").getBool())
         {
@@ -163,4 +166,5 @@
         if (this->bStartIOConsole_)
             this->ioConsole_.reset(new IOConsole());
+#endif
 
         // creates the class hierarchy for all classes with factories
Index: code/trunk/src/libraries/core/CorePrereqs.h
===================================================================
--- code/trunk/src/libraries/core/CorePrereqs.h	(revision 8329)
+++ code/trunk/src/libraries/core/CorePrereqs.h	(revision 8351)
@@ -38,4 +38,5 @@
 #include "OrxonoxConfig.h"
 #include <boost/version.hpp>
+#include <CEGUIVersion.h>
 
 //-----------------------------------------------------------------------
@@ -53,8 +54,11 @@
 #    endif
 #  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _CorePrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
 #  define _CoreExport  __attribute__ ((visibility("default")))
+#  define _CorePrivate __attribute__ ((visibility("hidden")))
 #else
 #  define _CoreExport
+#  define _CorePrivate
 #endif
 
@@ -259,4 +263,5 @@
 {
 #if (BOOST_VERSION < 104400)
+
     namespace filesystem
     {
@@ -265,5 +270,8 @@
         typedef basic_path<std::string, path_traits> path;
     }
-#else
+
+#elif (BOOST_VERSION < 104800)
+
+# if BOOST_FILESYSTEM_VERSION == 2
     namespace filesystem2
     {
@@ -278,5 +286,25 @@
         using filesystem2::path;
     }
+# elif BOOST_FILESYSTEM_VERSION == 3
+    namespace filesystem3
+    {
+        class path;
+    }
+    namespace filesystem
+    {
+        using filesystem3::path;
+    }
+# endif
+
+#else
+
+    // TODO: Check this once boost 1.48 is released
+    namespace filesystem
+    {
+        class path;
+    }
+
 #endif
+
     class thread;
     class mutex;
@@ -306,7 +334,13 @@
     class LuaScriptModule;
 
+#if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     class OgreCEGUIRenderer;
     class OgreCEGUIResourceProvider;
     class OgreCEGUITexture;
+#else
+    class OgreRenderer;
+    class OgreResourceProvider;
+    class OgreImageCodec;
+#endif
 }
 
Index: code/trunk/src/libraries/core/DynLib.cc
===================================================================
--- code/trunk/src/libraries/core/DynLib.cc	(revision 8329)
+++ code/trunk/src/libraries/core/DynLib.cc	(revision 8351)
@@ -42,10 +42,10 @@
 #endif
 
-#ifdef ORXONOX_PLATFORM_LINUX
+#ifdef ORXONOX_PLATFORM_UNIX
 #  include <dlfcn.h>
 #endif
 
 #ifdef ORXONOX_PLATFORM_APPLE
-#  include <macPlugins.h>
+#   include <OSX/macUtils.h> // OGRE include
 #endif
 
@@ -75,4 +75,13 @@
         if (name.substr(name.length() - 3, 3) != ".so")
            name += ".so";
+#elif defined(ORXONOX_PLATFORM_APPLE)
+        // dlopen() does not add .dylib to the filename, like windows does for .dll
+        if (name.substr(name.length() - 6, 6) != ".dylib")
+            name += ".dylib";
+#elif defined(ORXONOX_PLATFORM_WINDOWS)
+        // Although LoadLibraryEx will add .dll itself when you only specify the library name,
+        // if you include a relative path then it does not. So, add it to be sure.
+        if (name.substr(name.length() - 4, 4) != ".dll")
+            name += ".dll";
 #endif
 
@@ -127,12 +136,9 @@
         LocalFree( lpMsgBuf );
         return ret;
-#elif defined(ORXONOX_PLATFORM_LINUX)
+#elif defined(ORXONOX_PLATFORM_UNIX)
         return std::string(dlerror());
-#elif defined(ORXONOX_PLATFORM_APPLE)
-        return std::string(mac_errorBundle());
 #else
         return "";
 #endif
     }
-
 }
Index: code/trunk/src/libraries/core/DynLib.h
===================================================================
--- code/trunk/src/libraries/core/DynLib.h	(revision 8329)
+++ code/trunk/src/libraries/core/DynLib.h	(revision 8351)
@@ -52,15 +52,9 @@
 typedef struct HINSTANCE__* hInstance;
 
-#elif defined(ORXONOX_PLATFORM_LINUX)
+#elif defined(ORXONOX_PLATFORM_UNIX)
 #    define DYNLIB_HANDLE void*
 #    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
 #    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
 #    define DYNLIB_UNLOAD( a ) dlclose( a )
-
-#elif defined(ORXONOX_PLATFORM_APPLE)
-#    define DYNLIB_HANDLE CFBundleRef
-#    define DYNLIB_LOAD( a ) mac_loadExeBundle( a )
-#    define DYNLIB_GETSYM( a, b ) mac_getBundleSym( a, b )
-#    define DYNLIB_UNLOAD( a ) mac_unloadExeBundle( a )
 #endif
 
Index: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc	(revision 8329)
+++ code/trunk/src/libraries/core/GUIManager.cc	(revision 8351)
@@ -30,6 +30,8 @@
 #include "GUIManager.h"
 
+#include <memory>
 #include <boost/bind.hpp>
-#include <memory>
+#include <OgreRenderQueue.h>
+#include <OgreRenderWindow.h>
 
 #include <CEGUIDefaultLogger.h>
@@ -43,11 +45,19 @@
 #include <elements/CEGUIListbox.h>
 #include <elements/CEGUIListboxItem.h>
-#include <ogreceguirenderer/OgreCEGUIRenderer.h>
-
-#include "SpecialConfig.h" // Configures the macro below
-#ifdef CEGUILUA_USE_INTERNAL_LIBRARY
-#   include <ceguilua/CEGUILua.h>
-#else
-#   include <CEGUILua.h>
+
+#ifdef ORXONOX_OLD_CEGUI
+#  include <CEGUILua.h>
+#  include <ogreceguirenderer/OgreCEGUIRenderer.h>
+extern "C" {
+#  include <lauxlib.h>
+}
+#else
+#  include <ScriptingModules/LuaScriptModule/CEGUILua.h>
+#  include <RendererModules/Ogre/CEGUIOgreImageCodec.h>
+#  include <RendererModules/Ogre/CEGUIOgreRenderer.h>
+#  include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
+#  include <OgreCamera.h>
+#  include <OgreRenderQueueListener.h>
+#  include <OgreSceneManager.h>
 #endif
 
@@ -89,5 +99,5 @@
                 case CEGUI::Informative: orxonoxLevel = 5; break;
                 case CEGUI::Insane:      orxonoxLevel = 6; break;
-                default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
+                default: OrxAssert(false, "CEGUI log level out of range, inspect immediately!");
             }
             OutputHandler::getOutStream(orxonoxLevel)
@@ -97,4 +107,38 @@
         }
     };
+
+#ifdef ORXONOX_OLD_CEGUI
+    /** Class with the same memory layout as CEGUI::LuaScriptModule. <br>
+        We need this to fix a problem with an uninitialised member variable
+        in CEGUI < 0.7 <br>
+        Notice the "public" modifier for the otherwise private variables.
+    */
+    class LuaScriptModuleWorkaround : public CEGUI::ScriptModule
+    {
+    public:
+        LuaScriptModuleWorkaround();
+        ~LuaScriptModuleWorkaround();
+
+    public:
+        bool d_ownsState;
+        lua_State* d_state;
+        CEGUI::String d_errFuncName;
+        int d_errFuncIndex;
+        CEGUI::String d_activeErrFuncName;
+        int d_activeErrFuncIndex;
+    };
+#else
+    /// RenderQueueListener based class used to hook into the ogre rendering system
+    class RQListener : public Ogre::RenderQueueListener
+    {
+    public:
+        /// Callback from Ogre invoked before other stuff in our target queue is rendered
+        void renderQueueEnded(Ogre::uint8 id, const Ogre::String& invocation, bool& skipThisQueue)
+        {
+            if (id == Ogre::RENDER_QUEUE_SKIES_LATE)//Ogre::RENDER_QUEUE_OVERLAY)
+                CEGUI::System::getSingleton().renderGUI();
+        }
+    };
+#endif
 
     static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
@@ -118,5 +162,13 @@
     */
     GUIManager::GUIManager(const std::pair<int, int>& mousePosition)
-        : resourceProvider_(NULL)
+        : destroyer_(*this, &GUIManager::cleanup)
+        , guiRenderer_(NULL)
+        , resourceProvider_(NULL)
+#ifndef ORXONOX_OLD_CEGUI
+        , imageCodec_(NULL)
+#endif
+        , luaState_(NULL)
+        , scriptModule_(NULL)
+        , guiSystem_(NULL)
         , camera_(NULL)
     {
@@ -129,14 +181,33 @@
 
         // Note: No SceneManager specified yet
-        guiRenderer_.reset(new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000));
+#ifdef ORXONOX_OLD_CEGUI
+        guiRenderer_ = new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);
         resourceProvider_ = guiRenderer_->createResourceProvider();
+#else
+        guiRenderer_ = &OgreRenderer::create(*GraphicsManager::getInstance().getRenderWindow());
+        // We use our own RenderQueueListener so we can draw UNDER overlays
+        guiRenderer_->setFrameControlExecutionEnabled(false);
+        rqListener_ = new RQListener();
+        resourceProvider_ = &OgreRenderer::createOgreResourceProvider();
+        imageCodec_ = &OgreRenderer::createOgreImageCodec();
+#endif
         resourceProvider_->setDefaultResourceGroup("General");
 
         // Setup scripting
-        luaState_.reset(new LuaState());
+        luaState_ = new LuaState();
         rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua");
         // This is necessary to ensure that input events also use the right resource info when triggering lua functions
         luaState_->setDefaultResourceInfo(this->rootFileInfo_);
-        scriptModule_.reset(new LuaScriptModule(luaState_->getInternalLuaState()));
+#ifdef ORXONOX_OLD_CEGUI
+        scriptModule_ = new LuaScriptModule(luaState_->getInternalLuaState());
+        // Ugly workaround: older CEGUILua versions don't initialise the member
+        // d_activeErrFuncIndex at all. That leads to "error in error handling"
+        // problems when a Lua error occurs.
+        // We fix this by setting the member manually.
+        reinterpret_cast<LuaScriptModuleWorkaround*>(scriptModule_)->d_activeErrFuncIndex = LUA_NOREF;
+        luaState_->doString("ORXONOX_OLD_CEGUI = true");
+#else
+        scriptModule_ = &LuaScriptModule::create(luaState_->getInternalLuaState());
+#endif
         scriptModule_->setDefaultPCallErrorHandler(LuaState::ERROR_HANDLER_NAME);
 
@@ -144,5 +215,5 @@
         std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
         ceguiLogger->setLogFilename(PathConfig::getLogPathString() + "cegui.log");
-        // set the log level according to ours (translate by subtracting 1)
+        // Set the log level according to ours (translate by subtracting 1)
         ceguiLogger->setLoggingLevel(
             static_cast<LoggingLevel>(OutputHandler::getInstance().getSoftDebugLevel("logFile") - 1));
@@ -150,5 +221,12 @@
 
         // Create the CEGUI system singleton
-        guiSystem_.reset(new System(guiRenderer_.get(), resourceProvider_, 0, scriptModule_.get()));
+#ifdef ORXONOX_OLD_CEGUI
+        guiSystem_ = new System(guiRenderer_, resourceProvider_, 0, scriptModule_);
+        // Add functions that have been renamed in newer versions
+        luaState_->doString("CEGUI.SchemeManager.create = CEGUI.SchemeManager.loadScheme");
+        luaState_->doString("CEGUI.Window.getUnclippedOuterRect = CEGUI.Window.getUnclippedPixelRect");
+#else
+        guiSystem_ = &System::create(*guiRenderer_, resourceProvider_, 0, imageCodec_, scriptModule_);
+#endif
 
         // Align CEGUI mouse with OIS mouse
@@ -175,10 +253,22 @@
     }
 
-    /**
-    @brief
-        Basically shuts down CEGUI (member smart pointers) but first unloads our Tolua modules.
-    */
-    GUIManager::~GUIManager()
-    {
+    void GUIManager::cleanup()
+    {
+        using namespace CEGUI;
+
+#ifdef ORXONOX_OLD_CEGUI
+        delete guiSystem_;
+        delete guiRenderer_;
+        delete scriptModule_;
+#else
+        System::destroy();
+        OgreRenderer::destroyOgreResourceProvider(*resourceProvider_);
+        OgreRenderer::destroyOgreImageCodec(*imageCodec_);
+        OgreRenderer::destroy(*guiRenderer_);
+        LuaScriptModule::destroy(*scriptModule_);
+        delete ceguiLogger_;
+        delete rqListener_;
+#endif
+        delete luaState_;
     }
 
@@ -221,9 +311,16 @@
     void GUIManager::setCamera(Ogre::Camera* camera)
     {
-        this->camera_ = camera;
+#ifdef ORXONOX_OLD_CEGUI
         if (camera == NULL)
             this->guiRenderer_->setTargetSceneManager(0);
         else
             this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
+#else
+        if (camera_ != NULL && camera_->getSceneManager() != NULL)
+            camera_->getSceneManager()->removeRenderQueueListener(rqListener_);
+        if (camera != NULL && camera->getSceneManager() != NULL)
+            camera->getSceneManager()->addRenderQueueListener(rqListener_);
+#endif
+        this->camera_ = camera;
     }
 
@@ -321,4 +418,9 @@
         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);
@@ -327,4 +429,5 @@
         else
             state->setMouseExclusive(TriBool::False);
+#endif
 
         if (showCursor == TriBool::True)
@@ -522,5 +625,5 @@
         The Listbox for which to enable (or disable) tooltips.
     @param enabled
-        Whether to enable or disabel the tooltips.
+        Whether to enable or disable the tooltips.
     */
     void GUIManager::setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled)
Index: code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- code/trunk/src/libraries/core/GUIManager.h	(revision 8329)
+++ code/trunk/src/libraries/core/GUIManager.h	(revision 8351)
@@ -42,6 +42,7 @@
 #include <string>
 #include <CEGUIForwardRefs.h>
-#include <boost/scoped_ptr.hpp>
+#include <CEGUIVersion.h>
 #include <boost/shared_ptr.hpp>
+#include <loki/ScopeGuard.h>
 
 #include "util/OgreForwardRefs.h"
@@ -57,4 +58,8 @@
 $cfile "../util/TriBool.h" // tolua_export
 */
+
+#if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
+#  define ORXONOX_OLD_CEGUI
+#endif
 
 namespace orxonox // tolua_export
@@ -78,5 +83,6 @@
     public:
         GUIManager(const std::pair<int, int>& mousePosition);
-        ~GUIManager();
+        //! Leave empty and use cleanup() instead
+        ~GUIManager() {}
 
         void setConfigValues(void);
@@ -104,5 +110,5 @@
         const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
         LuaState* getLuaState(void)
-            { return this->luaState_.get(); }
+            { return this->luaState_; }
 
         //! Returns the root window for all menu sheets
@@ -127,4 +133,8 @@
     private:
         GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
+
+        /// Destructor that also executes when object fails to construct
+        void cleanup();
+
         void executeCode(const std::string& str);
 
@@ -147,10 +157,20 @@
         virtual void windowFocusChanged(bool bFocus);
 
-        scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
-        scoped_ptr<LuaState>                 luaState_;         //!< LuaState, access point to the Lua engine
-        scoped_ptr<CEGUI::LuaScriptModule>   scriptModule_;     //!< CEGUI's script module to use Lua
-        scoped_ptr<CEGUI::System>            guiSystem_;        //!< CEGUI's main system
+        /// Surrogate for the destructor
+        Loki::ObjScopeGuardImpl0<GUIManager, void (GUIManager::*)()> destroyer_;
+
+#ifdef ORXONOX_OLD_CEGUI
+        CEGUI::OgreCEGUIRenderer*            guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
+        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
+#else
+        CEGUI::OgreRenderer*                 guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
+        Ogre::RenderQueueListener*           rqListener_;       //!< RQ listener so we can draw UNDER Ogre overlays
+        CEGUI::OgreResourceProvider*         resourceProvider_; //!< CEGUI's resource provider
+        CEGUI::OgreImageCodec*               imageCodec_;
+#endif
+        LuaState*                            luaState_;         //!< LuaState, access point to the Lua engine
+        CEGUI::LuaScriptModule*              scriptModule_;     //!< CEGUI's script module to use Lua
+        CEGUI::System*                       guiSystem_;        //!< CEGUI's main system
         shared_ptr<ResourceInfo>             rootFileInfo_;     //!< Resource information about the root script
-        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
         CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
         CEGUI::Window*                       rootWindow_;       //!< Root node for all windows
Index: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc	(revision 8329)
+++ code/trunk/src/libraries/core/Game.cc	(revision 8351)
@@ -459,5 +459,5 @@
             ThrowException(GameState, "Emtpy GameState hierarchy provided, terminating.");
         // Add element with large identation to detect the last with just an iterator
-        stateStrings.push_back(std::make_pair("", -1));
+        stateStrings.push_back(std::make_pair(std::string(), -1));
 
         // Parse elements recursively
Index: code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.cc	(revision 8329)
+++ code/trunk/src/libraries/core/GraphicsManager.cc	(revision 8351)
@@ -30,4 +30,5 @@
 #include "GraphicsManager.h"
 
+#include <cstdlib>
 #include <fstream>
 #include <sstream>
@@ -35,6 +36,4 @@
 #include <boost/shared_array.hpp>
 
-#include <OgreArchiveFactory.h>
-#include <OgreArchiveManager.h>
 #include <OgreFrameListener.h>
 #include <OgreRoot.h>
@@ -60,5 +59,4 @@
 #include "GUIManager.h"
 #include "Loader.h"
-#include "MemoryArchive.h"
 #include "PathConfig.h"
 #include "ViewportEventListener.h"
@@ -102,7 +100,4 @@
     GraphicsManager::GraphicsManager(bool bLoadRenderer)
         : ogreWindowEventListener_(new OgreWindowEventListener())
-#if OGRE_VERSION < 0x010600
-        , memoryArchiveFactory_(new MemoryArchiveFactory())
-#endif
         , renderWindow_(0)
         , viewport_(0)
@@ -126,10 +121,9 @@
         // Only for development runs
         if (PathConfig::isDevelopmentRun())
-        {
             Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem");
-            extResources_.reset(new XMLFile("resources.oxr"));
-            extResources_->setLuaSupport(false);
-            Loader::open(extResources_.get());
-        }
+
+        extResources_.reset(new XMLFile("resources.oxr"));
+        extResources_->setLuaSupport(false);
+        Loader::open(extResources_.get());
 
         if (bLoadRenderer)
@@ -156,6 +150,5 @@
         // Undeclare the resources
         Loader::unload(resources_.get());
-        if (PathConfig::isDevelopmentRun())
-            Loader::unload(extResources_.get());
+        Loader::unload(extResources_.get());
     }
 
@@ -164,6 +157,4 @@
         SetConfigValue(ogreConfigFile_,  "ogre.cfg")
             .description("Location of the Ogre config file");
-        SetConfigValue(ogrePluginsDirectory_, specialConfig::ogrePluginsDirectory)
-            .description("Folder where the Ogre plugins are located.");
         SetConfigValue(ogrePlugins_, specialConfig::ogrePlugins)
             .description("Comma separated list of all plugins to load.");
@@ -196,52 +187,4 @@
         this->loadRenderer();
 
-#if OGRE_VERSION < 0x010600
-        // WORKAROUND: There is an incompatibility for particle scripts when trying
-        // to support both Ogre 1.4 and 1.6. The hacky solution is to create
-        // scripts for the 1.6 version and then remove the inserted "particle_system"
-        // keyword. But we need to supply these new scripts as well, which is why
-        // there is an extra Ogre::Archive dealing with it in the memory.
-        using namespace Ogre;
-        ArchiveManager::getSingleton().addArchiveFactory(memoryArchiveFactory_.get());
-        const StringVector& groups = ResourceGroupManager::getSingleton().getResourceGroups();
-        // Travers all groups
-        for (StringVector::const_iterator itGroup = groups.begin(); itGroup != groups.end(); ++itGroup)
-        {
-            FileInfoListPtr files = ResourceGroupManager::getSingleton().findResourceFileInfo(*itGroup, "*.particle");
-            for (FileInfoList::const_iterator itFile = files->begin(); itFile != files->end(); ++itFile)
-            {
-                // open file
-                Ogre::DataStreamPtr input = ResourceGroupManager::getSingleton().openResource(itFile->filename, *itGroup, false);
-                std::stringstream output;
-                // Parse file and replace "particle_system" with nothing
-                while (!input->eof())
-                {
-                    std::string line = input->getLine();
-                    size_t pos = line.find("particle_system");
-                    if (pos != std::string::npos)
-                    {
-                        // 15 is the length of "particle_system"
-                        line.replace(pos, 15, "");
-                    }
-                    output << line << std::endl;
-                }
-                // Add file to the memory archive
-                shared_array<char> data(new char[output.str().size()]);
-                // Debug optimisations
-                const std::string& outputStr = output.str();
-                char* rawData = data.get();
-                for (unsigned i = 0; i < outputStr.size(); ++i)
-                    rawData[i] = outputStr[i];
-                MemoryArchive::addFile("particle_scripts_ogre_1.4_" + *itGroup, itFile->filename, data, output.str().size());
-            }
-            if (!files->empty())
-            {
-                // Declare the files, but using a new group
-                ResourceGroupManager::getSingleton().addResourceLocation("particle_scripts_ogre_1.4_" + *itGroup,
-                    "Memory", "particle_scripts_ogre_1.4_" + *itGroup);
-            }
-        }
-#endif
-
         // Initialise all resources (do this AFTER the renderer has been loaded!)
         // Note: You can only do this once! Ogre will check whether a resource group has
@@ -305,14 +248,32 @@
     void GraphicsManager::loadOgrePlugins()
     {
-        // just to make sure the next statement doesn't segfault
-        if (ogrePluginsDirectory_.empty())
-            ogrePluginsDirectory_ = '.';
-
-        boost::filesystem::path folder(ogrePluginsDirectory_);
+        // Plugin path can have many different locations...
+        std::string pluginPath = specialConfig::ogrePluginsDirectory;
+#ifdef DEPENDENCY_PACKAGE_ENABLE
+        if (!PathConfig::isDevelopmentRun())
+        {
+#  if defined(ORXONOX_PLATFORM_WINDOWS)
+            pluginPath = PathConfig::getExecutablePathString();
+#  elif defined(ORXONOX_PLATFORM_APPLE)
+            // TODO: Where are the plugins being installed to?
+            pluginPath = PathConfig::getExecutablePathString();
+#  endif
+        }
+#endif
+
+#ifdef ORXONOX_PLATFORM_WINDOWS
+        // Add OGRE plugin path to the environment. That way one plugin could
+        // also depend on another without problems on Windows
+        const char* currentPATH = getenv("PATH");
+        std::string newPATH = pluginPath;
+        if (currentPATH != NULL)
+            newPATH = std::string(currentPATH) + ';' + newPATH;
+        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
+#endif
+
         // Do some SubString magic to get the comma separated list of plugins
         SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '{', '}', false, '\0');
-        // Use backslash paths on Windows! file_string() already does that though.
         for (unsigned int i = 0; i < plugins.size(); ++i)
-            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
+            ogreRoot_->loadPlugin(pluginPath + '/' + plugins[i]);
     }
 
Index: code/trunk/src/libraries/core/GraphicsManager.h
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.h	(revision 8329)
+++ code/trunk/src/libraries/core/GraphicsManager.h	(revision 8351)
@@ -114,7 +114,4 @@
 
         scoped_ptr<OgreWindowEventListener> ogreWindowEventListener_; //!< Pimpl to hide OgreWindowUtilities.h
-#if OGRE_VERSION < 0x010600
-        scoped_ptr<MemoryArchiveFactory>    memoryArchiveFactory_;    //!< Stores the modified particle scripts
-#endif
         scoped_ptr<Ogre::LogManager>        ogreLogger_;
         scoped_ptr<Ogre::Root>              ogreRoot_;                //!< Ogre's root
@@ -131,5 +128,4 @@
         // config values
         std::string         ogreConfigFile_;           //!< ogre config filename
-        std::string         ogrePluginsDirectory_;     //!< Directory where the Ogre plugins are located
         std::string         ogrePlugins_;              //!< Comma separated list of all plugins to load
         std::string         ogreLogFile_;              //!< log filename for Ogre log messages
Index: code/trunk/src/libraries/core/Identifier.h
===================================================================
--- code/trunk/src/libraries/core/Identifier.h	(revision 8329)
+++ code/trunk/src/libraries/core/Identifier.h	(revision 8351)
@@ -123,5 +123,5 @@
 
             /// Returns the unique ID of the class.
-            FORCEINLINE unsigned int getClassID() const { return this->classID_; }
+            ORX_FORCEINLINE unsigned int getClassID() const { return this->classID_; }
 
             /// Returns the list of all existing objects of this class.
@@ -395,5 +395,5 @@
     {
         // Get the name of the class
-        const std::string& name = typeid(T).name();
+        std::string name = typeid(T).name();
 
         // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used.
@@ -486,5 +486,5 @@
     */
     template <class T, class U>
-    FORCEINLINE T orxonox_cast(U* source)
+    ORX_FORCEINLINE T orxonox_cast(U* source)
     {
 #ifdef ORXONOX_COMPILER_MSVC
Index: code/trunk/src/libraries/core/LuaState.cc
===================================================================
--- code/trunk/src/libraries/core/LuaState.cc	(revision 8329)
+++ code/trunk/src/libraries/core/LuaState.cc	(revision 8351)
@@ -30,5 +30,5 @@
 #include "LuaState.h"
 
-#include <tolua/tolua++.h>
+#include <tolua++.h>
 extern "C" {
 #include <lua.h>
@@ -60,14 +60,5 @@
         luaState_ = lua_open();
         Loki::ScopeGuard luaStateGuard = Loki::MakeGuard(&lua_close, luaState_);
-#if LUA_VERSION_NUM == 501
         luaL_openlibs(luaState_);
-#else
-        luaopen_base(luaState_);
-        luaopen_string(luaState_);
-        luaopen_table(luaState_);
-        luaopen_math(luaState_);
-        luaopen_io(luaState_);
-        luaopen_debug(luaState_);
-#endif
 
         // Open all available tolua interfaces
@@ -187,12 +178,5 @@
         }
 
-#if LUA_VERSION_NUM != 501
-        LoadS ls;
-        ls.s = code.c_str();
-        ls.size = code.size();
-        int error = lua_load(luaState_, &orxonox::LuaState::lua_Chunkreader, &ls, chunkname.c_str());
-#else
         int error = luaL_loadbuffer(luaState_, code.c_str(), code.size(), chunkname.c_str());
-#endif
 
         switch (error)
@@ -293,16 +277,4 @@
     }
 
-#if LUA_VERSION_NUM != 501
-    const char * LuaState::lua_Chunkreader(lua_State *L, void *data, size_t *size)
-    {
-        LoadS* ls = static_cast<LoadS*>(data);
-        if (ls->size == 0)
-            return NULL;
-        *size = ls->size;
-        ls->size = 0;
-        return ls->s;
-    }
-#endif
-
     /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
     {
Index: code/trunk/src/libraries/core/LuaState.h
===================================================================
--- code/trunk/src/libraries/core/LuaState.h	(revision 8329)
+++ code/trunk/src/libraries/core/LuaState.h	(revision 8351)
@@ -113,14 +113,4 @@
         shared_ptr<ResourceInfo> getFileInfo(const std::string& filename);
 
-#if LUA_VERSION_NUM != 501
-        struct LoadS
-        {
-            const char* s;
-            size_t size;
-        };
-
-        static const char * lua_Chunkreader(lua_State *L, void *data, size_t *size);
-#endif
-
         std::stringstream output_;
         lua_State* luaState_;
Index: code/trunk/src/libraries/core/MemoryArchive.cc
===================================================================
--- code/trunk/src/libraries/core/MemoryArchive.cc	(revision 8329)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "MemoryArchive.h"
-
-#if OGRE_VERSION < 0x010600
-
-#include <OgreException.h>
-#include <boost/filesystem.hpp>
-#include <boost/version.hpp>
-
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_HAS_BRANCH_PATH_FUNCTION has_parent_path
-#else
-#  define BOOST_HAS_BRANCH_PATH_FUNCTION has_branch_path
-#endif
-
-namespace orxonox
-{
-    using namespace Ogre;
-
-    MemoryArchive::ArchiveMap MemoryArchive::archives_s;
-
-    void MemoryArchive::load()
-    {
-        if (archives_s.find(this->getName()) == archives_s.end())
-            OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, this->getName() + " - MemoryArchive not found.", "MemoryArchive");
-    }
-
-    DataStreamPtr MemoryArchive::open(const Ogre::String& filename) const
-    {
-        const FileMap& files = archives_s[this->getName()];
-        FileMap::const_iterator itFile = files.find(filename);
-        if (itFile == files.end())
-            return DataStreamPtr();
-        else
-            return MemoryDataStreamPtr(new MemoryDataStream(itFile->second.first.get(), itFile->second.second));
-    }
-
-    void MemoryArchive::findFiles(const Ogre::String& pattern, bool bRecursive,
-        bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList)
-    {
-        const FileMap& files = archives_s[this->getName()];
-
-        for (FileMap::const_iterator it = files.begin(); it != files.end(); ++it)
-        {
-            boost::filesystem::path file = it->first;
-            // Check pattern
-            if (!StringUtil::match(file.string(), pattern, true))
-                continue;
-            if (bDirs)
-                file = file.branch_path();
-            if (file.empty())
-                continue;
-            if (file.BOOST_HAS_BRANCH_PATH_FUNCTION() && !bRecursive)
-                continue;
-            if (simpleList)
-                simpleList->push_back(file.string());
-            if (detailList)
-            {
-                FileInfo fi;
-                fi.archive = this;
-                fi.filename = file.string();
-                fi.basename = file.leaf();
-                fi.path = file.branch_path().string();
-                fi.compressedSize = it->second.second;
-                fi.uncompressedSize = it->second.second;
-                detailList->push_back(fi);
-            }
-        }
-    }
-    StringVectorPtr MemoryArchive::list(bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles("*", recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::listFileInfo(bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles("*", recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    StringVectorPtr MemoryArchive::find(const Ogre::String& pattern,
-                                            bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles(pattern, recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::findFileInfo(const Ogre::String& pattern,
-        bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles(pattern, recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    bool MemoryArchive::exists(const Ogre::String& filename)
-    {
-        const FileMap& files = archives_s[this->getName()];
-        return files.find(filename) != files.end();
-    }
-
-    const Ogre::String& MemoryArchiveFactory::getType(void) const
-    {
-        static std::string result("Memory");
-        return result;
-    }
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
Index: code/trunk/src/libraries/core/MemoryArchive.h
===================================================================
--- code/trunk/src/libraries/core/MemoryArchive.h	(revision 8329)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @ingroup Management Resources
-*/
-
-#ifndef _MemoryArchive_H__
-#define _MemoryArchive_H__
-
-#include "CorePrereqs.h"
-#include <OgrePrerequisites.h>
-
-#if OGRE_VERSION < 0x010600
-
-#include <map>
-#include <OgreArchive.h>
-#include <OgreArchiveFactory.h>
-#include <boost/shared_array.hpp>
-
-namespace orxonox
-{
-    /**
-    @brief
-        Provides a simple mechanism of 'memory mapped IO', but compatible for Ogre 1.4
-
-        Files are stored as shared_array<char> in a static map with the archive names
-        (imaging the different archives as resource locations). This map then contains
-        yet another map with the actual files.
-        If you want to know why we make such a fuss, contact GraphicsManager::upgradeToGraphics()
-        for more information.
-    */
-    class MemoryArchive : public Ogre::Archive
-    {
-    public:
-        MemoryArchive(const Ogre::String& name, const Ogre::String& archiveType) : Ogre::Archive(name, archiveType) { }
-        ~MemoryArchive() { }
-
-        bool isCaseSensitive(void) const { return true; }
-
-        void load();
-        void unload() { }
-
-        Ogre::DataStreamPtr open(const Ogre::String& filename) const;
-
-        Ogre::StringVectorPtr list(bool recursive = true, bool dirs = false);
-        Ogre::FileInfoListPtr listFileInfo(bool recursive = true, bool dirs = false);
-
-        Ogre::StringVectorPtr find(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-        Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-
-        bool exists(const Ogre::String& filename);
-
-        static void addFile(const std::string& archiveName, const std::string& filename, shared_array<char> content, size_t size)
-            { archives_s[archiveName][filename] = std::make_pair(content, size); }
-
-    private:
-        void findFiles(const Ogre::String& pattern, bool bRecursive,
-            bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList);
-
-        typedef std::map<std::string, std::pair<shared_array<char>, size_t> > FileMap;
-        typedef std::map<std::string, FileMap> ArchiveMap;
-        static ArchiveMap archives_s;
-    };
-
-    //! Specialisation of ArchiveFactory for MemoryArchive.
-    class _CoreExport MemoryArchiveFactory : public Ogre::ArchiveFactory
-    {
-    public:
-        const Ogre::String& getType(void) const;
-        Ogre::Archive* createInstance(const Ogre::String& name) { return new MemoryArchive(name, "Memory"); }
-        void destroyInstance(Ogre::Archive* arch)               { delete arch; }
-    };
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
-
-#endif /* _MemoryArchive_H__ */
Index: code/trunk/src/libraries/core/OrxonoxClass.h
===================================================================
--- code/trunk/src/libraries/core/OrxonoxClass.h	(revision 8329)
+++ code/trunk/src/libraries/core/OrxonoxClass.h	(revision 8351)
@@ -135,5 +135,5 @@
                 Returns NULL if the no pointer was found.
             */
-            FORCEINLINE void* getDerivedPointer(unsigned int classID)
+            ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID)
             {
                 for (int i = this->objectPointers_.size() - 1; i >= 0; --i)
@@ -146,8 +146,8 @@
 
             /// Version of getDerivedPointer with template
-            template <class T> FORCEINLINE T* getDerivedPointer(unsigned int classID)
+            template <class T> ORX_FORCEINLINE T* getDerivedPointer(unsigned int classID)
             {   return static_cast<T*>(this->getDerivedPointer(classID));   }
             /// Const version of getDerivedPointer with template
-            template <class T> FORCEINLINE const T* getDerivedPointer(unsigned int classID) const
+            template <class T> ORX_FORCEINLINE const T* getDerivedPointer(unsigned int classID) const
             {   return const_cast<OrxonoxClass*>(this)->getDerivedPointer<T>(classID);   }
 
Index: code/trunk/src/libraries/core/PathConfig.cc
===================================================================
--- code/trunk/src/libraries/core/PathConfig.cc	(revision 8329)
+++ code/trunk/src/libraries/core/PathConfig.cc	(revision 8351)
@@ -33,5 +33,4 @@
 #include <cstdio>
 #include <vector>
-#include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
@@ -56,9 +55,13 @@
 #include "CommandLineParser.h"
 
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_LEAF_FUNCTION filename
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_LEAF leaf
+#  define BF_GENERIC_STRING string
+#  define BF_NATIVE_STRING file_string
 #else
-#  define BOOST_LEAF_FUNCTION leaf
+#  define BF_LEAF path().filename().string
+#  define BF_GENERIC_STRING generic_string
+#  define BF_NATIVE_STRING string
 #endif
 
@@ -95,5 +98,5 @@
 #elif defined(ORXONOX_PLATFORM_APPLE)
         char buffer[1024];
-        unsigned long path_len = 1023;
+        uint32_t path_len = 1023;
         if (_NSGetExecutablePath(buffer, &path_len))
             ThrowException(General, "Could not retrieve executable path.");
@@ -125,8 +128,6 @@
 #endif
 
-        executablePath_ = bf::path(buffer);
-#ifndef ORXONOX_PLATFORM_APPLE
-        executablePath_ = executablePath_.branch_path(); // remove executable name
-#endif
+        // Remove executable filename
+        executablePath_ = bf::path(buffer).branch_path();
 
         /////////////////////
@@ -206,9 +207,9 @@
 
             // Get user directory
-#  ifdef ORXONOX_PLATFORM_UNIX /* Apple? */
+#ifdef ORXONOX_PLATFORM_UNIX
             char* userDataPathPtr(getenv("HOME"));
-#  else
+#else
             char* userDataPathPtr(getenv("APPDATA"));
-#  endif
+#endif
             if (userDataPathPtr == NULL)
                 ThrowException(General, "Could not retrieve user data path.");
@@ -233,6 +234,6 @@
         // Create directories to avoid problems when opening files in non existent folders.
         std::vector<std::pair<bf::path, std::string> > directories;
-        directories.push_back(std::make_pair(bf::path(configPath_), "config"));
-        directories.push_back(std::make_pair(bf::path(logPath_), "log"));
+        directories.push_back(std::make_pair(bf::path(configPath_), std::string("config")));
+        directories.push_back(std::make_pair(bf::path(logPath_), std::string("log")));
 
         for (std::vector<std::pair<bf::path, std::string> >::iterator it = directories.begin();
@@ -242,5 +243,5 @@
             {
                 ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
-                                         Please remove " + it->first.string());
+                                         Please remove " + it->first.BF_GENERIC_STRING());
             }
             if (bf::create_directories(it->first)) // function may not return true at all (bug?)
@@ -259,7 +260,12 @@
         size_t moduleextensionlength = moduleextension.size();
 
+#ifdef ORXONOX_PLATFORM_WINDOWS
         // Add that path to the PATH variable in case a module depends on another one
-        std::string pathVariable(getenv("PATH"));
-        putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.string()).c_str()));
+        const char* currentPATH = getenv("PATH");
+        std::string newPATH = modulePath_.BF_NATIVE_STRING();
+        if (currentPATH != NULL)
+            newPATH = std::string(currentPATH) + ';' + newPATH;
+        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
+#endif
 
         // Make sure the path exists, otherwise don't load modules
@@ -273,7 +279,7 @@
         while (file != end)
         {
-            const std::string& filename = file->BOOST_LEAF_FUNCTION();
-
-            // Check if the file ends with the exension in question
+            std::string filename = file->BF_LEAF();
+
+            // Check if the file ends with the extension in question
             if (filename.size() > moduleextensionlength)
             {
@@ -282,5 +288,5 @@
                     // We've found a helper file
                     const std::string& library = filename.substr(0, filename.size() - moduleextensionlength);
-                    modulePaths.push_back((modulePath_ / library).file_string());
+                    modulePaths.push_back(getModulePathString() + library);
                 }
             }
@@ -293,35 +299,35 @@
     /*static*/ std::string PathConfig::getRootPathString()
     {
-        return getInstance().rootPath_.string() + '/';
+        return getInstance().rootPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getExecutablePathString()
     {
-        return getInstance().executablePath_.string() + '/';
+        return getInstance().executablePath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getDataPathString()
     {
-        return getInstance().dataPath_.string() + '/';
+        return getInstance().dataPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getExternalDataPathString()
     {
-        return getInstance().externalDataPath_.string() + '/';
+        return getInstance().externalDataPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getConfigPathString()
     {
-        return getInstance().configPath_.string() + '/';
+        return getInstance().configPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getLogPathString()
     {
-        return getInstance().logPath_.string() + '/';
+        return getInstance().logPath_.BF_GENERIC_STRING() + '/';
     }
 
     /*static*/ std::string PathConfig::getModulePathString()
     {
-        return getInstance().modulePath_.string() + '/';
+        return getInstance().modulePath_.BF_GENERIC_STRING() + '/';
     }
 }
Index: code/trunk/src/libraries/core/PathConfig.h
===================================================================
--- code/trunk/src/libraries/core/PathConfig.h	(revision 8329)
+++ code/trunk/src/libraries/core/PathConfig.h	(revision 8351)
@@ -113,5 +113,5 @@
             static std::string getModulePathString();
 
-            //! Return trrue for runs in the build directory (not installed)
+            //! Return true for runs in the build directory (not installed)
             static bool isDevelopmentRun() { return getInstance().bDevRun_; }
 
Index: code/trunk/src/libraries/core/Resource.cc
===================================================================
--- code/trunk/src/libraries/core/Resource.cc	(revision 8329)
+++ code/trunk/src/libraries/core/Resource.cc	(revision 8351)
@@ -34,12 +34,22 @@
 #include <OgreResourceGroupManager.h>
 
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_GENERIC_STRING string
+#else
+#  define BF_GENERIC_STRING generic_string
+#endif
+
 namespace orxonox
 {
-    std::string Resource::DEFAULT_GROUP(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
+    const std::string& Resource::getDefaultResourceGroup()
+    {
+        return Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME;
+    }
 
     DataStreamPtr Resource::open(const std::string& name)
     {
         return Ogre::ResourceGroupManager::getSingleton().openResource(name,
-            Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
+            getDefaultResourceGroup(), true);
     }
 
@@ -95,5 +105,5 @@
                     boost::filesystem::path base(it->archive->getName());
                     base /= it->filename;
-                    ptr->fileSystemPath = base.string();
+                    ptr->fileSystemPath = base.BF_GENERIC_STRING();
                 }
                 return ptr;
Index: code/trunk/src/libraries/core/Resource.h
===================================================================
--- code/trunk/src/libraries/core/Resource.h	(revision 8329)
+++ code/trunk/src/libraries/core/Resource.h	(revision 8351)
@@ -137,5 +137,5 @@
 
         //! Name of the default resource group (usually "General")
-        static std::string DEFAULT_GROUP;
+        static const std::string& getDefaultResourceGroup();
 
     private:
Index: code/trunk/src/libraries/core/Super.h
===================================================================
--- code/trunk/src/libraries/core/Super.h	(revision 8329)
+++ code/trunk/src/libraries/core/Super.h	(revision 8351)
@@ -94,8 +94,8 @@
         struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
         { \
-            static void check() \
+            static void superCheck() \
             { \
                 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0)); \
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check(); \
+                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck(); \
             } \
             \
@@ -132,7 +132,7 @@
         struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
         { \
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
+            static void superCheck() \
+            { \
+                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
             } \
         };
@@ -150,5 +150,5 @@
         struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
         {
-            static void check()
+            static void superCheck()
             {
                 // This call to the apply-function is the whole check. By calling the function with
@@ -156,6 +156,6 @@
                 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0));
 
-                // Go go the check for of next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check();
+                // Go go the superCheck for of next super-function (functionnumber + 1)
+                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck();
             }
 
@@ -202,8 +202,8 @@
         struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
         { \
-            // The check function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
+            // The superCheck function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
+            static void superCheck() \
+            { \
+                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
             } \
         };
@@ -303,5 +303,5 @@
         struct SuperFunctionCondition
         {
-            static void check() {}
+            static void superCheck() {}
         };
 
@@ -338,7 +338,7 @@
             struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
             { \
-                static void check() \
+                static void superCheck() \
                 { \
-                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check(); \
+                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck(); \
                 } \
             }; \
@@ -421,8 +421,8 @@
             // If this function gets called, the header-file of the super function is not
             // included, so this fallback template (templatehack not specialized) is used
-            static void check()
+            static void superCheck()
             {
                 // Calls the condition-check of the next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check();
+                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck();
             }
         };
@@ -574,5 +574,5 @@
         virtual void createSuperFunctionCaller() const
         {
-            SuperFunctionCondition<0, T, 0, 0>::check();
+            SuperFunctionCondition<0, T, 0, 0>::superCheck();
         }
 
Index: code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 8329)
+++ code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 8351)
@@ -35,5 +35,4 @@
 
 #include <map>
-#include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
@@ -47,9 +46,13 @@
 #include "TclThreadManager.h"
 
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_LEAF_FUNCTION filename
+// Differentiate Boost Filesystem v2 and v3
+#if (BOOST_FILESYSTEM_VERSION < 3)
+#  define BF_LEAF leaf
+#  define BF_GENERIC_STRING string
+#  define BF_DICTIONARY_ENTRY_NAME string
 #else
-#  define BOOST_LEAF_FUNCTION leaf
+#  define BF_LEAF path().filename().string
+#  define BF_GENERIC_STRING generic_string
+#  define BF_DICTIONARY_ENTRY_NAME path().string
 #endif
 
@@ -245,5 +248,5 @@
                 else
                 {
-                    const std::string& dir = startdirectory.string();
+                    const std::string& dir = startdirectory.BF_GENERIC_STRING();
                     if (dir.size() > 0 && dir[dir.size() - 1] == ':')
                         startdirectory = dir + '/';
@@ -257,7 +260,7 @@
                 {
                     if (boost::filesystem::is_directory(*file))
-                        dirlist.push_back(ArgumentCompletionListElement(file->string() + '/', getLowercase(file->string()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
+                        dirlist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/'));
                     else
-                        filelist.push_back(ArgumentCompletionListElement(file->string(), getLowercase(file->string()), file->BOOST_LEAF_FUNCTION()));
+                        filelist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF()));
                     ++file;
                 }
Index: code/trunk/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- code/trunk/src/libraries/core/command/TclThreadManager.cc	(revision 8329)
+++ code/trunk/src/libraries/core/command/TclThreadManager.cc	(revision 8351)
@@ -116,6 +116,7 @@
     TclThreadManager::~TclThreadManager()
     {
+        delete this->interpreterBundles_[0];
         delete this->interpreterBundlesMutex_;
-//        delete this->mainInterpreterMutex_; // <-- temporary disabled to avoid crash if a thread is still actively queriyng
+//        delete this->mainInterpreterMutex_; // <-- temporarily disabled to avoid crash if a thread is still actively querying
         delete this->messageQueue_;
     }
Index: code/trunk/src/libraries/core/input/InputDevice.h
===================================================================
--- code/trunk/src/libraries/core/input/InputDevice.h	(revision 8329)
+++ code/trunk/src/libraries/core/input/InputDevice.h	(revision 8351)
@@ -184,5 +184,5 @@
     protected:
         //! Common code for all button pressed events (updates pressed buttons list and calls the input states)
-        FORCEINLINE void buttonPressed(ButtonTypeParam button)
+        ORX_FORCEINLINE void buttonPressed(ButtonTypeParam button)
         {
             // check whether the button already is in the list (can happen when focus was lost)
@@ -201,5 +201,5 @@
 
         //! Common code for all button released events (updates pressed buttons list and calls the input states)
-        FORCEINLINE void buttonReleased(ButtonTypeParam button)
+        ORX_FORCEINLINE void buttonReleased(ButtonTypeParam button)
         {
             // remove the button from the pressedButtons_ list
Index: code/trunk/src/libraries/core/input/InputManager.cc
===================================================================
--- code/trunk/src/libraries/core/input/InputManager.cc	(revision 8329)
+++ code/trunk/src/libraries/core/input/InputManager.cc	(revision 8351)
@@ -151,39 +151,41 @@
         assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick);
 
+        typedef std::pair<std::string, std::string> StringPair;
+
         // Fill parameter list
         OIS::ParamList paramList;
         size_t windowHnd = GraphicsManager::getInstance().getRenderWindowHandle();
-        paramList.insert(std::make_pair("WINDOW", multi_cast<std::string>(windowHnd)));
+        paramList.insert(StringPair("WINDOW", multi_cast<std::string>(windowHnd)));
 #if defined(ORXONOX_PLATFORM_WINDOWS)
-        paramList.insert(std::make_pair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
-        paramList.insert(std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));
-        paramList.insert(std::make_pair("w32_mouse", "DISCL_FOREGROUND"));
+        paramList.insert(StringPair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
+        paramList.insert(StringPair("w32_keyboard", "DISCL_FOREGROUND"));
+        paramList.insert(StringPair("w32_mouse", "DISCL_FOREGROUND"));
         if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
         {
             // Disable Windows key plus special keys (like play, stop, next, etc.)
-            paramList.insert(std::make_pair("w32_keyboard", "DISCL_NOWINKEY"));
-            paramList.insert(std::make_pair("w32_mouse", "DISCL_EXCLUSIVE"));
-        }
-        else
-            paramList.insert(std::make_pair("w32_mouse", "DISCL_NONEXCLUSIVE"));
+            paramList.insert(StringPair("w32_keyboard", "DISCL_NOWINKEY"));
+            paramList.insert(StringPair("w32_mouse", "DISCL_EXCLUSIVE"));
+        }
+        else
+            paramList.insert(StringPair("w32_mouse", "DISCL_NONEXCLUSIVE"));
 #elif defined(ORXONOX_PLATFORM_LINUX)
         // Enabling this is probably a bad idea, but whenever orxonox crashes, the setting stays on
         // Trouble might be that the Pressed event occurs a bit too often...
-        paramList.insert(std::make_pair("XAutoRepeatOn", "true"));
+        paramList.insert(StringPair("XAutoRepeatOn", "true"));
 
         if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
         {
             if (CommandLineParser::getValue("keyboard_no_grab").getBool())
-                paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
+                paramList.insert(StringPair("x11_keyboard_grab", "false"));
             else
-                paramList.insert(std::make_pair("x11_keyboard_grab", "true"));
-            paramList.insert(std::make_pair("x11_mouse_grab",  "true"));
-            paramList.insert(std::make_pair("x11_mouse_hide", "true"));
-        }
-        else
-        {
-            paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
-            paramList.insert(std::make_pair("x11_mouse_grab",  "false"));
-            paramList.insert(std::make_pair("x11_mouse_hide", "false"));
+                paramList.insert(StringPair("x11_keyboard_grab", "true"));
+            paramList.insert(StringPair("x11_mouse_grab",  "true"));
+            paramList.insert(StringPair("x11_mouse_hide", "true"));
+        }
+        else
+        {
+            paramList.insert(StringPair("x11_keyboard_grab", "false"));
+            paramList.insert(StringPair("x11_mouse_grab",  "false"));
+            paramList.insert(StringPair("x11_mouse_hide", "false"));
         }
 #endif
Index: code/trunk/src/libraries/core/input/InputState.h
===================================================================
--- code/trunk/src/libraries/core/input/InputState.h	(revision 8329)
+++ code/trunk/src/libraries/core/input/InputState.h	(revision 8351)
@@ -176,5 +176,5 @@
     };
 
-    FORCEINLINE void InputState::update(float dt)
+    ORX_FORCEINLINE void InputState::update(float dt)
     {
         for (unsigned int i = 0; i < handlers_.size(); ++i)
@@ -183,5 +183,5 @@
     }
 
-    FORCEINLINE void InputState::update(float dt, unsigned int device)
+    ORX_FORCEINLINE void InputState::update(float dt, unsigned int device)
     {
         switch (device)
@@ -205,5 +205,5 @@
 
     template <typename EventType, class ButtonTypeParam>
-    FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
+    ORX_FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
     {
         assert(device < handlers_.size());
@@ -216,5 +216,5 @@
     }
 
-    FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
+    ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     {
         if (handlers_[mouseIndex_s] != NULL)
@@ -222,5 +222,5 @@
     }
 
-    FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
+    ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
     {
         if (handlers_[mouseIndex_s] != NULL)
@@ -228,5 +228,5 @@
     }
 
-    FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
+    ORX_FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
     {
         assert(device < handlers_.size());
Index: code/trunk/src/libraries/core/input/KeyBinder.cc
===================================================================
--- code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 8329)
+++ code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 8351)
@@ -396,7 +396,7 @@
 
             // iterate over all modes
-            for (size_t mode_index = 0; mode_index < 3; ++mode_index)
-            {
-                if (mode_index == (unsigned int)new_mode) // skip commands that are already in the desired mode
+            for (int mode_index = 0; mode_index < 3; ++mode_index)
+            {
+                if (mode_index == new_mode) // skip commands that are already in the desired mode
                     continue;
 
Index: code/trunk/src/libraries/network/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/network/CMakeLists.txt	(revision 8329)
+++ code/trunk/src/libraries/network/CMakeLists.txt	(revision 8351)
@@ -87,4 +87,5 @@
     enet_orxonox
     ${Boost_THREAD_LIBRARY}
+    ${CEGUI_TOLUA_LIBRARY}
     util
     core
Index: code/trunk/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/trunk/src/libraries/network/LANDiscoverable.cc	(revision 8329)
+++ code/trunk/src/libraries/network/LANDiscoverable.cc	(revision 8351)
@@ -29,10 +29,10 @@
 #include "LANDiscoverable.h"
 
-#include "NetworkPrereqs.h"
-#include "packet/ServerInformation.h"
-
 #include <enet/enet.h>
 #include <cassert>
 #include <cstring>
+
+#include "util/Debug.h"
+#include "packet/ServerInformation.h"
 
 namespace orxonox
Index: code/trunk/src/libraries/network/MasterServerComm.cc
===================================================================
--- code/trunk/src/libraries/network/MasterServerComm.cc	(revision 8329)
+++ code/trunk/src/libraries/network/MasterServerComm.cc	(revision 8351)
@@ -28,4 +28,5 @@
 
 #include "MasterServerComm.h"
+#include "util/Debug.h"
 
 namespace orxonox
Index: code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h
===================================================================
--- code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h	(revision 8329)
+++ code/trunk/src/libraries/network/NetworkPrecompiledHeaders.h	(revision 8351)
@@ -62,7 +62,4 @@
 #include <cmath>    // 15
 
-#define WIN32_LEAN_AND_MEAN
-#include <enet/enet.h> // 6, 3.1MB
-
 #include <OgreMath.h>        // 15
 #include <OgreVector2.h>     // 15
@@ -71,4 +68,7 @@
 #include <OgreQuaternion.h>  // 15
 #include <OgreColourValue.h> // 15
+
+#define WIN32_LEAN_AND_MEAN
+#include <enet/enet.h> // 6, 3.1MB
 
 #include "util/mbool.h" // 11
Index: code/trunk/src/libraries/network/NetworkPrereqs.h
===================================================================
--- code/trunk/src/libraries/network/NetworkPrereqs.h	(revision 8329)
+++ code/trunk/src/libraries/network/NetworkPrereqs.h	(revision 8351)
@@ -52,8 +52,11 @@
 #    endif
 #  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _NetworkPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
 #  define _NetworkExport  __attribute__ ((visibility("default")))
+#  define _NetworkPrivate __attribute__ ((visibility("hidden")))
 #else
 #  define _NetworkExport
+#  define _NetworkPrivate
 #endif
 
Index: code/trunk/src/libraries/network/Server.cc
===================================================================
--- code/trunk/src/libraries/network/Server.cc	(revision 8329)
+++ code/trunk/src/libraries/network/Server.cc	(revision 8351)
@@ -252,5 +252,5 @@
    * @brief: return packet loss ratio to client (scales from 0 to 1)
    */
-  double Server::getPacketLoss(unsigned int clientID)
+  float Server::getPacketLoss(unsigned int clientID)
   {
 //     assert(ClientInformation::findClient(clientID));
Index: code/trunk/src/libraries/network/Server.h
===================================================================
--- code/trunk/src/libraries/network/Server.h	(revision 8329)
+++ code/trunk/src/libraries/network/Server.h	(revision 8351)
@@ -74,5 +74,5 @@
     unsigned int getRTT(unsigned int clientID);
     virtual void printRTT();
-    double getPacketLoss(unsigned int clientID);
+    float getPacketLoss(unsigned int clientID);
   protected:
     void updateGamestate();
Index: code/trunk/src/libraries/network/packet/FunctionCalls.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 8329)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 8351)
@@ -33,4 +33,5 @@
 #include "network/FunctionCallManager.h"
 #include "network/GamestateHandler.h"
+#include "network/Host.h"
 
 namespace orxonox {
Index: code/trunk/src/libraries/tools/BulletConversions.h
===================================================================
--- code/trunk/src/libraries/tools/BulletConversions.h	(revision 8329)
+++ code/trunk/src/libraries/tools/BulletConversions.h	(revision 8351)
@@ -43,5 +43,5 @@
     struct ConverterExplicit<orxonox::Vector3, btVector3>
     {
-        FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input)
+        ORX_FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input)
         {
             output->setX(input.x);
@@ -56,5 +56,5 @@
     struct ConverterExplicit<btVector3, orxonox::Vector3>
     {
-        FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input)
         {
             output->x = input.x();
@@ -69,5 +69,5 @@
     struct ConverterExplicit<orxonox::Quaternion, btQuaternion>
     {
-        FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
+        ORX_FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
         {
             output->setW(input.w);
@@ -83,5 +83,5 @@
     struct ConverterExplicit<btQuaternion, orxonox::Quaternion>
     {
-        FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
         {
             output->w = input.w();
Index: code/trunk/src/libraries/tools/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/tools/CMakeLists.txt	(revision 8329)
+++ code/trunk/src/libraries/tools/CMakeLists.txt	(revision 8351)
@@ -21,5 +21,11 @@
   FIND_HEADER_FILES
   LINK_LIBRARIES
+    ${OGRE_LIBRARY}
+    ${Boost_FILESYSTEM_LIBRARY}
+    ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
+    tinyxml_orxonox
+    util
     core
-  SOURCE_FILES ${TOOLS_SRC_FILES}
+  SOURCE_FILES
+    ${TOOLS_SRC_FILES}
 )
Index: code/trunk/src/libraries/tools/Mesh.cc
===================================================================
--- code/trunk/src/libraries/tools/Mesh.cc	(revision 8329)
+++ code/trunk/src/libraries/tools/Mesh.cc	(revision 8351)
@@ -69,15 +69,4 @@
                 this->entity_ = this->scenemanager_->createEntity("Mesh" + multi_cast<std::string>(Mesh::meshCounter_s++), meshsource);
                 this->entity_->setCastShadows(this->bCastShadows_);
-
-#if OGRE_VERSION < 0x010600
-                this->entity_->setNormaliseNormals(true);
-                /*
-                    Excerpt from Ogre forum:
-                    "Note that the above is only for the fixed function pipeline.
-                    If/when you get into shaders, you'll need to manually normalize() the normal inside the vertex or pixel shader."
-
-                    I don't know exactly what this means, but I put this here if there will be problems with shaders.
-                */
-#endif
             }
             catch (...)
Index: code/trunk/src/libraries/tools/ResourceCollection.cc
===================================================================
--- code/trunk/src/libraries/tools/ResourceCollection.cc	(revision 8329)
+++ code/trunk/src/libraries/tools/ResourceCollection.cc	(revision 8351)
@@ -45,5 +45,5 @@
 
         // Default group is "General"
-        this->setResourceGroup(Resource::DEFAULT_GROUP);
+        this->setResourceGroup(Resource::getDefaultResourceGroup());
     }
 
Index: code/trunk/src/libraries/tools/ToolsPrereqs.h
===================================================================
--- code/trunk/src/libraries/tools/ToolsPrereqs.h	(revision 8329)
+++ code/trunk/src/libraries/tools/ToolsPrereqs.h	(revision 8351)
@@ -52,8 +52,11 @@
 #    endif
 #  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _ToolsPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
 #  define _ToolsExport  __attribute__ ((visibility("default")))
+#  define _ToolsPrivate __attribute__ ((visibility("hidden")))
 #else
 #  define _ToolsExport
+#  define _ToolsPrivate
 #endif
 
Index: code/trunk/src/libraries/util/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/util/CMakeLists.txt	(revision 8329)
+++ code/trunk/src/libraries/util/CMakeLists.txt	(revision 8351)
@@ -19,29 +19,26 @@
 
 SET_SOURCE_FILES(UTIL_SRC_FILES
-  Clock.cc
-  Exception.cc
-  ExprParser.cc
-  Math.cc
-  MultiType.cc
-  Scope.cc
-  StringUtils.cc
 COMPILATION_BEGIN StableCompilation.cc
   Clipboard.cc
+  Clock.cc
   Convert.cc
   CRC32.cc
+  ExprParser.cc
   OutputHandler.cc
+  Scope.cc
   ScopedSingletonManager.cc
   SharedPtr.cc
-  SignalHandler.cc
   Sleep.cc
   SmallObjectAllocator.cc
   SubString.cc
 COMPILATION_END
+
+  MultiType.cc
+  Exception.cc
+  Math.cc
+  SignalHandler.cc
+  StringUtils.cc
 )
 
-IF(GCC_NO_SYSTEM_HEADER_SUPPORT)
-  # Get around displaying a few hundred lines of warning code
-  SET_SOURCE_FILES_PROPERTIES(MultiType.cc PROPERTIES COMPILE_FLAGS "-w")
-ENDIF()
 IF(MSVC)
   # Simply using #pragma warning(disable:4244) doesn't really disable it
Index: code/trunk/src/libraries/util/Convert.h
===================================================================
--- code/trunk/src/libraries/util/Convert.h	(revision 8329)
+++ code/trunk/src/libraries/util/Convert.h	(revision 8351)
@@ -143,5 +143,5 @@
     struct ConverterFallback
     {
-        FORCEINLINE static bool convert(ToType* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             COUT(2) << "Could not convert value of type " << typeid(FromType).name()
@@ -155,5 +155,5 @@
     struct ConverterFallback<FromType*, ToType*>
     {
-        FORCEINLINE static bool convert(ToType** output, FromType* const input)
+        ORX_FORCEINLINE static bool convert(ToType** output, FromType* const input)
         {
             ToType* temp = dynamic_cast<ToType*>(input);
@@ -182,5 +182,5 @@
 struct ConverterStringStream
 {
-    FORCEINLINE static bool convert(ToType* output, const FromType& input)
+    ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
     {
         return orxonox::ConverterFallback<FromType, ToType>::convert(output, input);
@@ -198,5 +198,5 @@
     /// Fallback operator <<() (delegates to orxonox::ConverterFallback)
     template <class FromType>
-    FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
+    ORX_FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
     {
         std::string temp;
@@ -215,5 +215,5 @@
 struct ConverterStringStream<FromType, std::string>
 {
-    FORCEINLINE static bool convert(std::string* output, const FromType& input)
+    ORX_FORCEINLINE static bool convert(std::string* output, const FromType& input)
     {
         using namespace fallbackTemplates;
@@ -241,5 +241,5 @@
     /// Fallback operator >>() (delegates to orxonox::ConverterFallback)
     template <class ToType>
-    FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
+    ORX_FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
     {
         std::string input(static_cast<std::istringstream&>(instream).str());
@@ -252,5 +252,5 @@
 struct ConverterStringStream<std::string, ToType>
 {
-    FORCEINLINE static bool convert(ToType* output, const std::string& input)
+    ORX_FORCEINLINE static bool convert(ToType* output, const std::string& input)
     {
         using namespace fallbackTemplates;
@@ -276,5 +276,5 @@
     /// %Template delegates to ::ConverterStringStream
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
+    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<false>)
     {
         return ConverterStringStream<FromType, ToType>::convert(output, input);
@@ -283,5 +283,5 @@
     /// Makes an implicit cast from \a FromType to \a ToType
     template <class FromType, class ToType>
-    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
+    ORX_FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, Loki::Int2Type<true>)
     {
         (*output) = static_cast<ToType>(input);
@@ -303,5 +303,5 @@
     {
         enum { probe = ImplicitConversion<FromType, ToType>::exists };
-        FORCEINLINE static bool convert(ToType* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             // Use the probe's value to delegate to the right function
@@ -327,5 +327,5 @@
     */
     template <class FromType, class ToType>
-    FORCEINLINE bool convertValue(ToType* output, const FromType& input)
+    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input)
     {
         return ConverterExplicit<FromType, ToType>::convert(output, input);
@@ -348,5 +348,5 @@
     */
     template<class FromType, class ToType>
-    FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
+    ORX_FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
     {
         if (convertValue(output, input))
@@ -361,5 +361,5 @@
     /// Directly returns the converted value, but uses the fallback on failure. @see convertValue
     template<class FromType, class ToType>
-    FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
+    ORX_FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
     {
         ToType output;
@@ -380,5 +380,5 @@
     */
     template<class ToType, class FromType>
-    FORCEINLINE ToType multi_cast(const FromType& input)
+    ORX_FORCEINLINE ToType multi_cast(const FromType& input)
     {
         ToType output;
@@ -395,5 +395,5 @@
     struct ConverterExplicit<const char*, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const char* input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const char* input)
         {
             return convertValue<std::string, ToType>(output, input);
@@ -405,5 +405,5 @@
     struct ConverterExplicit<char, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const char input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const char input)
         {
             *output = input;
@@ -415,5 +415,5 @@
     struct ConverterExplicit<unsigned char, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const unsigned char input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const unsigned char input)
         {
             *output = input;
@@ -425,5 +425,5 @@
     struct ConverterExplicit<std::string, char>
     {
-        FORCEINLINE static bool convert(char* output, const std::string& input)
+        ORX_FORCEINLINE static bool convert(char* output, const std::string& input)
         {
             if (!input.empty())
@@ -438,5 +438,5 @@
     struct ConverterExplicit<std::string, unsigned char>
     {
-        FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
+        ORX_FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
         {
             if (!input.empty())
@@ -453,5 +453,5 @@
     struct ConverterExplicit<bool, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const bool& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const bool& input)
         {
             if (input)
Index: code/trunk/src/libraries/util/Exception.cc
===================================================================
--- code/trunk/src/libraries/util/Exception.cc	(revision 8329)
+++ code/trunk/src/libraries/util/Exception.cc	(revision 8351)
@@ -35,4 +35,5 @@
 #include "Exception.h"
 
+#include <cstddef>
 #include <CEGUIExceptions.h>
 #include "Debug.h"
@@ -95,16 +96,12 @@
             throw;
         }
+        catch (const CEGUI::Exception& ex)
+        {
+            return GeneralException(ex.getMessage().c_str(), ex.getLine(),
+                ex.getFileName().c_str(), ex.getName().c_str()).getDescription();
+        }
         catch (const std::exception& ex)
         {
             return ex.what();
-        }
-        catch (const CEGUI::Exception& ex)
-        {
-#if CEGUI_VERSION_MAJOR == 0 && CEGUI_VERSION_MINOR < 6
-            return GeneralException(ex.getMessage().c_str()).getDescription();
-#else
-            return GeneralException(ex.getMessage().c_str(), ex.getLine(),
-                ex.getFileName().c_str(), ex.getName().c_str()).getDescription();
-#endif
         }
         catch (...)
Index: code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- code/trunk/src/libraries/util/ExprParser.cc	(revision 8329)
+++ code/trunk/src/libraries/util/ExprParser.cc	(revision 8351)
@@ -52,9 +52,9 @@
     {
         this->failed_ = false;
-        this->variables_["pi"] = math::pi_d;
-        this->variables_["e"] = math::e_d;
-    }
-
-    void ExprParser::setVariable(const std::string& varname, double value)
+        this->variables_["pi"] = math::pi;
+        this->variables_["e"] = math::e;
+    }
+
+    void ExprParser::setVariable(const std::string& varname, float value)
     {
         this->variables_[varname] = value;
@@ -78,7 +78,7 @@
     //Private functions:
     /******************/
-    double ExprParser::parse_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ',')
         {
@@ -93,7 +93,7 @@
     }
 
-    double ExprParser::parse_last_argument()
-    {
-        double value = parse_expr_8();
+    float ExprParser::parse_last_argument()
+    {
+        float value = parse_expr_8();
         if (*reading_stream == ')')
         {
@@ -108,7 +108,7 @@
     }
 
-    double ExprParser::parse_expr_8()
-    {
-        double value = parse_expr_7();
+    float ExprParser::parse_expr_8()
+    {
+        float value = parse_expr_7();
         for(;;)
         {
@@ -124,7 +124,7 @@
 
 
-    double ExprParser::parse_expr_7()
-    {
-        double value = parse_expr_6();
+    float ExprParser::parse_expr_7()
+    {
+        float value = parse_expr_6();
         for(;;)
         {
@@ -139,7 +139,7 @@
     }
 
-    double ExprParser::parse_expr_6()
-    {
-        double value = parse_expr_5();
+    float ExprParser::parse_expr_6()
+    {
+        float value = parse_expr_5();
         for(;;)
         {
@@ -158,7 +158,7 @@
     }
 
-    double ExprParser::parse_expr_5()
-    {
-        double value = parse_expr_4();
+    float ExprParser::parse_expr_5()
+    {
+        float value = parse_expr_4();
         for(;;)
         {
@@ -183,7 +183,7 @@
     }
 
-    double ExprParser::parse_expr_4()
-    {
-        double value = parse_expr_3();
+    float ExprParser::parse_expr_4()
+    {
+        float value = parse_expr_3();
         for(;;)
         {
@@ -202,7 +202,7 @@
     }
 
-    double ExprParser::parse_expr_3()
-    {
-        double value = parse_expr_2();
+    float ExprParser::parse_expr_3()
+    {
+        float value = parse_expr_2();
         for(;;)
         {
@@ -217,5 +217,5 @@
             case modulo:
                 {
-                    double temp = parse_expr_2();
+                    float temp = parse_expr_2();
                     value = value - floor(value/temp)*temp;
                     break;
@@ -227,7 +227,7 @@
     }
 
-    double ExprParser::parse_expr_2()
-    {
-        double value = parse_expr_1();
+    float ExprParser::parse_expr_2()
+    {
+        float value = parse_expr_1();
         while (*reading_stream != '\0')
         {
@@ -246,8 +246,8 @@
     }
 
-    double ExprParser::parse_expr_1()
+    float ExprParser::parse_expr_1()
     {
         PARSE_BLANKS;
-        double value;
+        float value;
 
         unary_operator op = parse_unary_operator();
@@ -262,5 +262,5 @@
         else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
         {  // number
-            value = strtod(reading_stream, const_cast<char**>(&reading_stream));
+            value = (float)strtod(reading_stream, const_cast<char**>(&reading_stream));
         }
         else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
@@ -306,5 +306,5 @@
                 {
                     value = parse_last_argument();
-                    value = 0.5*log((value + 1)/(value - 1));
+                    value = 0.5f*log((value + 1.0f)/(value - 1.0f));
                 }
                 CASE("int")
@@ -325,16 +325,16 @@
                 {
                     value = parse_last_argument();
-                    value = (value>0 ? 1 : (value<0 ? -1 : 0));
+                    value = (value>0.0f ? 1.0f : (value<0.0f ? -1.0f : 0.0f));
                 }
                 CASE("sqrt")
                     value = sqrt(parse_last_argument());
                 CASE("degrees")
-                    value = parse_last_argument()*180/math::pi_d;
+                    value = parse_last_argument()*180.0f/math::pi;
                 CASE("radians")
-                    value = parse_last_argument()*math::pi_d/180;
+                    value = parse_last_argument()*math::pi/180.0f;
                 CASE("mod")
                 {
                     value = parse_argument();
-                    double value2 = parse_last_argument();
+                    float value2 = parse_last_argument();
                     value = value - floor(value/value2)*value2;
                 }
@@ -356,5 +356,5 @@
             else
             {
-                std::map<std::string, double>::const_iterator it = this->variables_.find(word);
+                std::map<std::string, float>::const_iterator it = this->variables_.find(word);
                 if (it != this->variables_.end())
                     value = it->second;
Index: code/trunk/src/libraries/util/ExprParser.h
===================================================================
--- code/trunk/src/libraries/util/ExprParser.h	(revision 8329)
+++ code/trunk/src/libraries/util/ExprParser.h	(revision 8351)
@@ -57,5 +57,5 @@
                 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << '\'' << std::endl;
             }
-            double result = expr.getResult();
+            float result = expr.getResult();
         }
         else
@@ -125,39 +125,39 @@
         void parse(const std::string& str);
         const std::string& getRemains() { return  this->remains_; }
-        double             getResult()  { return  this->result_; }
+        float              getResult()  { return  this->result_; }
         bool               getSuccess() { return !this->failed_; }
 
-        void setVariable(const std::string& varname, double value);
+        void setVariable(const std::string& varname, float value);
 
     private:
-        double parse_expr_1();
-        double parse_expr_2();
-        double parse_expr_3();
-        double parse_expr_4();
-        double parse_expr_5();
-        double parse_expr_6();
-        double parse_expr_7();
-        double parse_expr_8();
+        float parse_expr_1();
+        float parse_expr_2();
+        float parse_expr_3();
+        float parse_expr_4();
+        float parse_expr_5();
+        float parse_expr_6();
+        float parse_expr_7();
+        float parse_expr_8();
         char* parse_word(char* str);
         binary_operator parse_binary_operator();
         unary_operator parse_unary_operator();
 
-        double parse_argument();
-        double parse_last_argument();
+        float parse_argument();
+        float parse_last_argument();
 
         binary_operator op;
         const char* reading_stream;
         bool failed_;
-        double result_;
+        float result_;
         std::string remains_;
-        std::map<std::string, double> variables_;
+        std::map<std::string, float> variables_;
     };
 
     //Endzeichen für float expression: ')', '}', ']', ',', ';'
-    _UtilExport bool parse_float(char* const, char**, double*);
+    _UtilExport bool parse_float(char* const, char**, float*);
     //Endzeichen angegeben
-    _UtilExport bool parse_float(char* const, char**, char, double*);
+    _UtilExport bool parse_float(char* const, char**, char, float*);
     //Letzter Teil-float eines Vektors parsen (keine Vergleichs- und Logikoperationen)
-    _UtilExport bool parse_vector_float(char* const, char**, bool, double*);
+    _UtilExport bool parse_vector_float(char* const, char**, bool, float*);
 }
 
Index: code/trunk/src/libraries/util/Math.h
===================================================================
--- code/trunk/src/libraries/util/Math.h	(revision 8329)
+++ code/trunk/src/libraries/util/Math.h	(revision 8351)
@@ -66,20 +66,18 @@
 namespace orxonox
 {
-    // C++ doesn't define any constants for pi, e, etc.
+    /** Often used numerical constants because C++ doesn't define any.
+    @note
+        The values here are decimal representations of the approximate floating
+        point value as it is stored according to the IEEE 754 standard.
+    */
     namespace math
     {
-        const float pi      = 3.14159265f;      ///< PI
-        const float pi_2    = 1.57079633f;      ///< PI / 2
-        const float pi_4    = 7.85398163e-1f;   ///< PI / 4
-        const float e       = 2.71828183f;      ///< e
-        const float sqrt2   = 1.41421356f;      ///< sqrt(2)
-        const float sqrt2_2 = 7.07106781e-1f;   ///< sqrt(2) / 2
-
-        const double pi_d      = 3.14159265358979324;       ///< PI (double)
-        const double pi_2_d    = 1.57079632679489662;       ///< PI / 2 (double)
-        const double pi_4_d    = 7.85398163397448310e-1;    ///< PI / 4 (double)
-        const double e_d       = 2.71828182845904524;       ///< e (double)
-        const double sqrt2_d   = 1.41421356237309505;       ///< sqrt(2) (double)
-        const double sqrt2_2_d = 7.07106781186547524e-1;    ///< sqrt(2) / 2 (double)
+        const float twoPi   = 6.283185482025146484375f;     ///< PI * 2
+        const float pi      = 3.1415927410125732421875f;    ///< PI
+        const float pi_2    = 1.57079637050628662109375f;   ///< PI / 2
+        const float pi_4    = 0.785398185253143310546875f;  ///< PI / 4
+        const float e       = 2.718281269073486328125f;     ///< e
+        const float sqrt2   = 1.41421353816986083984375f;   ///< sqrt(2)
+        const float sqrt2_2 = 0.707106769084930419921875f;  ///< sqrt(2) / 2
     }
 
Index: code/trunk/src/libraries/util/MathConvert.h
===================================================================
--- code/trunk/src/libraries/util/MathConvert.h	(revision 8329)
+++ code/trunk/src/libraries/util/MathConvert.h	(revision 8351)
@@ -51,5 +51,5 @@
     struct ConverterExplicit<orxonox::Vector2, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
         {
             std::ostringstream ostream;
@@ -67,5 +67,5 @@
     struct ConverterExplicit<orxonox::Vector3, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
         {
             std::ostringstream ostream;
@@ -83,5 +83,5 @@
     struct ConverterExplicit<orxonox::Vector4, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
         {
             std::ostringstream ostream;
@@ -99,5 +99,5 @@
     struct ConverterExplicit<orxonox::Quaternion, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
         {
             std::ostringstream ostream;
@@ -115,5 +115,5 @@
     struct ConverterExplicit<orxonox::ColourValue, std::string>
     {
-        FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
+        ORX_FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
         {
             std::ostringstream ostream;
@@ -157,5 +157,5 @@
     struct ConverterFallback<orxonox::Radian, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
@@ -167,5 +167,5 @@
     struct ConverterFallback<orxonox::Degree, ToType>
     {
-        FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
+        ORX_FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
@@ -177,5 +177,5 @@
     struct ConverterFallback<FromType, orxonox::Radian>
     {
-        FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
         {
             float temp;
@@ -194,5 +194,5 @@
     struct ConverterFallback<FromType, orxonox::Degree>
     {
-        FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
+        ORX_FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
         {
             float temp;
Index: code/trunk/src/libraries/util/SharedPtr.h
===================================================================
--- code/trunk/src/libraries/util/SharedPtr.h	(revision 8329)
+++ code/trunk/src/libraries/util/SharedPtr.h	(revision 8351)
@@ -163,4 +163,5 @@
             public:
                 SharedCounter() : count_(1) {}
+                virtual ~SharedCounter() {}
                 virtual void destroy() = 0;
 
@@ -186,5 +187,5 @@
         _UtilExport SmallObjectAllocator& createSharedCounterPool();
 
-        FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
+        ORX_FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
         {
             static SmallObjectAllocator& instance = createSharedCounterPool();
Index: code/trunk/src/libraries/util/SignalHandler.cc
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.cc	(revision 8329)
+++ code/trunk/src/libraries/util/SignalHandler.cc	(revision 8351)
@@ -37,4 +37,5 @@
 #include <cstdlib>
 #include <cstring>
+#include <cstdio>
 
 #include "Debug.h"
Index: code/trunk/src/libraries/util/SignalHandler.h
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.h	(revision 8329)
+++ code/trunk/src/libraries/util/SignalHandler.h	(revision 8351)
@@ -70,5 +70,5 @@
 
     /// The SignalHandler is used to catch signals like SIGSEGV and write a backtrace to the logfile.
-    class SignalHandler : public Singleton<SignalHandler>
+    class _UtilExport SignalHandler : public Singleton<SignalHandler>
     {
         friend class Singleton<SignalHandler>;
Index: code/trunk/src/libraries/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/libraries/util/UtilPrereqs.h	(revision 8329)
+++ code/trunk/src/libraries/util/UtilPrereqs.h	(revision 8351)
@@ -52,8 +52,11 @@
 #    endif
 #  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _UtilPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
 #  define _UtilExport  __attribute__ ((visibility("default")))
+#  define _UtilPrivate __attribute__ ((visibility("hidden")))
 #else
 #  define _UtilExport
+#  define _UtilPrivate
 #endif
 
