[Orxonox-commit 1115] r5836 - in code/branches/core5/src: libraries/core libraries/tools modules/gamestates orxonox orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Wed Sep 30 00:00:16 CEST 2009
Author: rgrieder
Date: 2009-09-30 00:00:16 +0200 (Wed, 30 Sep 2009)
New Revision: 5836
Added:
code/branches/core5/src/libraries/core/PathConfig.cc
code/branches/core5/src/libraries/core/PathConfig.h
Modified:
code/branches/core5/src/libraries/core/CMakeLists.txt
code/branches/core5/src/libraries/core/CommandLine.cc
code/branches/core5/src/libraries/core/ConfigFileManager.cc
code/branches/core5/src/libraries/core/Core.cc
code/branches/core5/src/libraries/core/Core.h
code/branches/core5/src/libraries/core/CorePrereqs.h
code/branches/core5/src/libraries/core/GUIManager.cc
code/branches/core5/src/libraries/core/GraphicsManager.cc
code/branches/core5/src/libraries/core/Language.cc
code/branches/core5/src/libraries/core/LuaState.cc
code/branches/core5/src/libraries/core/TclBind.cc
code/branches/core5/src/libraries/tools/ResourceLocation.cc
code/branches/core5/src/modules/gamestates/GSGraphics.cc
code/branches/core5/src/modules/gamestates/GSLevel.cc
code/branches/core5/src/orxonox/Level.cc
code/branches/core5/src/orxonox/LevelManager.cc
code/branches/core5/src/orxonox/sound/SoundBase.cc
Log:
Extracted path related parts of Core into a new PathConfig class. This should decrease the mess in Core.cc a little bit.
Modified: code/branches/core5/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/core5/src/libraries/core/CMakeLists.txt 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/CMakeLists.txt 2009-09-29 22:00:16 UTC (rev 5836)
@@ -35,6 +35,7 @@
MemoryArchive.cc
ObjectListBase.cc
OrxonoxClass.cc
+ PathConfig.cc
Resource.cc
WindowEventListener.cc
Modified: code/branches/core5/src/libraries/core/CommandLine.cc
===================================================================
--- code/branches/core5/src/libraries/core/CommandLine.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/CommandLine.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -37,7 +37,7 @@
#include "util/Exception.h"
#include "util/StringUtils.h"
#include "util/SubString.h"
-#include "Core.h"
+#include "PathConfig.h"
namespace orxonox
{
@@ -347,7 +347,7 @@
void CommandLine::_parseFile()
{
std::string filename = CommandLine::getValue("optionsFile").getString();
- boost::filesystem::path filepath(Core::getConfigPath() / filename);
+ boost::filesystem::path filepath(PathConfig::getConfigPath() / filename);
// look for additional arguments in given file or start.ini as default
// They will not overwrite the arguments given directly
Modified: code/branches/core5/src/libraries/core/ConfigFileManager.cc
===================================================================
--- code/branches/core5/src/libraries/core/ConfigFileManager.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/ConfigFileManager.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -35,7 +35,7 @@
#include "util/StringUtils.h"
#include "ConsoleCommand.h"
#include "ConfigValueContainer.h"
-#include "Core.h"
+#include "PathConfig.h"
namespace orxonox
{
@@ -221,11 +221,11 @@
this->clear();
// Get default file if necessary and available
- boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);
+ boost::filesystem::path filepath(PathConfig::getConfigPath() / this->filename_);
if (!boost::filesystem::exists(filepath))
{
// Try to get default one from the data folder
- boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_);
+ boost::filesystem::path defaultFilepath(PathConfig::getDataPath() / "defaultConfig" / this->filename_);
if (boost::filesystem::exists(defaultFilepath))
{
COUT(3) << "Copied " << this->filename_ << " from the defaultConfig folder." << std::endl;
@@ -335,7 +335,7 @@
void ConfigFile::save() const
{
std::ofstream file;
- file.open((Core::getConfigPathString() + filename_).c_str(), std::fstream::out);
+ file.open((PathConfig::getConfigPathString() + filename_).c_str(), std::fstream::out);
file.setf(std::ios::fixed, std::ios::floatfield);
file.precision(6);
Modified: code/branches/core5/src/libraries/core/Core.cc
===================================================================
--- code/branches/core5/src/libraries/core/Core.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/Core.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -36,11 +36,7 @@
#include "Core.h"
#include <cassert>
-#include <fstream>
-#include <cstdlib>
-#include <cstdio>
-#include <boost/version.hpp>
-#include <boost/filesystem.hpp>
+#include <vector>
#ifdef ORXONOX_PLATFORM_WINDOWS
# ifndef WIN32_LEAN_AND_MEAN
@@ -49,18 +45,12 @@
# include <windows.h>
# undef min
# undef max
-#elif defined(ORXONOX_PLATFORM_APPLE)
-# include <sys/param.h>
-# include <mach-o/dyld.h>
-#else /* Linux */
-# include <sys/types.h>
-# include <unistd.h>
#endif
-#include "SpecialConfig.h"
#include "util/Debug.h"
#include "util/Exception.h"
#include "util/SignalHandler.h"
+#include "PathConfig.h"
#include "Clock.h"
#include "CommandExecutor.h"
#include "CommandLine.h"
@@ -79,20 +69,11 @@
#include "TclThreadManager.h"
#include "input/InputManager.h"
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-# define BOOST_LEAF_FUNCTION filename
-#else
-# define BOOST_LEAF_FUNCTION leaf
-#endif
-
namespace orxonox
{
//! Static pointer to the singleton
Core* Core::singletonPtr_s = 0;
- SetCommandLineArgument(externalDataPath, "").information("Path to the external data files");
- SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
#ifdef ORXONOX_PLATFORM_WINDOWS
SetCommandLineArgument(limitToCPU, 0).information("Limits the program to one cpu/core (1, 2, 3, etc.). 0 turns it off (default)");
@@ -115,14 +96,6 @@
{
RegisterRootObject(CoreConfiguration);
this->setConfigValues();
-
- // External data directory only exists for dev runs
- if (Core::isDevelopmentRun())
- {
- // Possible data path override by the command line
- if (!CommandLine::getArgument("externalDataPath")->hasDefaultValue())
- tsetExternalDataPath(CommandLine::getValue("externalDataPath"));
- }
}
/**
@@ -192,17 +165,6 @@
ResetConfigValue(language_);
}
- /**
- @brief
- Temporary sets the external data path
- @param path
- The new data path
- */
- void tsetExternalDataPath(const std::string& path)
- {
- externalDataPath_ = boost::filesystem::path(path);
- }
-
void initializeRandomNumberGenerator()
{
static bool bInitialized = false;
@@ -220,15 +182,6 @@
int softDebugLevelShell_; //!< The debug level for the ingame shell
std::string language_; //!< The language
bool bInitializeRandomNumberGenerator_; //!< If true, srand(time(0)) is called
-
- //! Path to the parent directory of the ones above if program was installed with relativ pahts
- boost::filesystem::path rootPath_;
- boost::filesystem::path executablePath_; //!< Path to the executable
- boost::filesystem::path modulePath_; //!< Path to the modules
- boost::filesystem::path dataPath_; //!< Path to the data file folder
- boost::filesystem::path externalDataPath_; //!< Path to the external data file folder
- boost::filesystem::path configPath_; //!< Path to the config file folder
- boost::filesystem::path logPath_; //!< Path to the log file folder
};
@@ -238,78 +191,41 @@
// Cleanup guard for external console commands that don't belong to an Identifier
, consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands)
, configuration_(new CoreConfiguration()) // Don't yet create config values!
- , bDevRun_(false)
, bGraphicsLoaded_(false)
{
// Set the hard coded fixed paths
- this->setFixedPaths();
+ this->pathConfig_.reset(new PathConfig());
// Create a new dynamic library manager
this->dynLibManager_.reset(new DynLibManager());
// Load modules
- try
+ std::vector<std::string>& modulePaths = this->pathConfig_->getModulePaths();
+ for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it)
{
- // We search for helper files with the following extension
- std::string moduleextension = specialConfig::moduleExtension;
- size_t moduleextensionlength = moduleextension.size();
-
- // Search in the directory of our executable
- boost::filesystem::path searchpath = this->configuration_->modulePath_;
-
- // 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 + ";" + configuration_->modulePath_.string()).c_str()));
-
- boost::filesystem::directory_iterator file(searchpath);
- boost::filesystem::directory_iterator end;
-
- // Iterate through all files
- while (file != end)
+ try
{
- std::string filename = file->BOOST_LEAF_FUNCTION();
-
- // Check if the file ends with the exension in question
- if (filename.size() > moduleextensionlength)
- {
- if (filename.substr(filename.size() - moduleextensionlength) == moduleextension)
- {
- // We've found a helper file - now load the library with the same name
- std::string library = filename.substr(0, filename.size() - moduleextensionlength);
- boost::filesystem::path librarypath = searchpath / library;
-
- try
- {
- DynLibManager::getInstance().load(librarypath.string());
- }
- catch (...)
- {
- COUT(1) << "Couldn't load module \"" << librarypath.string() << "\": " << Exception::handleMessage() << std::endl;
- }
- }
- }
-
- ++file;
+ this->dynLibManager_->load(*it);
}
+ catch (...)
+ {
+ COUT(1) << "Couldn't load module \"" << *it << "\": " << Exception::handleMessage() << std::endl;
+ }
}
- catch (...)
- {
- COUT(1) << "An error occurred while loading modules: " << Exception::handleMessage() << std::endl;
- }
// Parse command line arguments AFTER the modules have been loaded (static code!)
CommandLine::parseCommandLine(cmdLine);
// Set configurable paths like log, config and media
- this->setConfigurablePaths();
+ this->pathConfig_->setConfigurablePaths();
// create a signal handler (only active for linux)
// This call is placed as soon as possible, but after the directories are set
this->signalHandler_.reset(new SignalHandler());
- this->signalHandler_->doCatch(configuration_->executablePath_.string(), Core::getLogPathString() + "orxonox_crash.log");
+ this->signalHandler_->doCatch(PathConfig::getExecutablePathString(), PathConfig::getLogPathString() + "orxonox_crash.log");
// Set the correct log path. Before this call, /tmp (Unix) or %TEMP% was used
- OutputHandler::getOutStream().setLogPath(Core::getLogPathString());
+ OutputHandler::getOutStream().setLogPath(PathConfig::getLogPathString());
// Parse additional options file now that we know its path
CommandLine::parseFile();
@@ -342,7 +258,7 @@
this->graphicsManager_.reset(new GraphicsManager(false));
// initialise Tcl
- this->tclBind_.reset(new TclBind(Core::getDataPathString()));
+ this->tclBind_.reset(new TclBind(PathConfig::getDataPathString()));
this->tclThreadManager_.reset(new TclThreadManager(tclBind_->getTclInterpreter()));
// create a shell
@@ -455,56 +371,6 @@
Core::getInstance().configuration_->resetLanguage();
}
- /*static*/ void Core::tsetExternalDataPath(const std::string& path)
- {
- getInstance().configuration_->tsetExternalDataPath(path);
- }
-
- /*static*/ const boost::filesystem::path& Core::getDataPath()
- {
- return getInstance().configuration_->dataPath_;
- }
- /*static*/ std::string Core::getDataPathString()
- {
- return getInstance().configuration_->dataPath_.string() + '/';
- }
-
- /*static*/ const boost::filesystem::path& Core::getExternalDataPath()
- {
- return getInstance().configuration_->externalDataPath_;
- }
- /*static*/ std::string Core::getExternalDataPathString()
- {
- return getInstance().configuration_->externalDataPath_.string() + '/';
- }
-
- /*static*/ const boost::filesystem::path& Core::getConfigPath()
- {
- return getInstance().configuration_->configPath_;
- }
- /*static*/ std::string Core::getConfigPathString()
- {
- return getInstance().configuration_->configPath_.string() + '/';
- }
-
- /*static*/ const boost::filesystem::path& Core::getLogPath()
- {
- return getInstance().configuration_->logPath_;
- }
- /*static*/ std::string Core::getLogPathString()
- {
- return getInstance().configuration_->logPath_.string() + '/';
- }
-
- /*static*/ const boost::filesystem::path& Core::getRootPath()
- {
- return getInstance().configuration_->rootPath_;
- }
- /*static*/ std::string Core::getRootPathString()
- {
- return getInstance().configuration_->rootPath_.string() + '/';
- }
-
/**
@note
The code of this function has been copied and adjusted from OGRE, an open source graphics engine.
@@ -551,176 +417,6 @@
#endif
}
- /**
- @brief
- Retrievs the executable path and sets all hard coded fixed path (currently only the module path)
- Also checks for "orxonox_dev_build.keep_me" in the executable diretory.
- If found it means that this is not an installed run, hence we
- don't write the logs and config files to ~/.orxonox
- @throw
- GeneralException
- */
- void Core::setFixedPaths()
- {
- //////////////////////////
- // FIND EXECUTABLE PATH //
- //////////////////////////
-
-#ifdef ORXONOX_PLATFORM_WINDOWS
- // get executable module
- TCHAR buffer[1024];
- if (GetModuleFileName(NULL, buffer, 1024) == 0)
- ThrowException(General, "Could not retrieve executable path.");
-
-#elif defined(ORXONOX_PLATFORM_APPLE)
- char buffer[1024];
- unsigned long path_len = 1023;
- if (_NSGetExecutablePath(buffer, &path_len))
- ThrowException(General, "Could not retrieve executable path.");
-
-#else /* Linux */
- /* written by Nicolai Haehnle <prefect_ at gmx.net> */
-
- /* Get our PID and build the name of the link in /proc */
- char linkname[64]; /* /proc/<pid>/exe */
- if (snprintf(linkname, sizeof(linkname), "/proc/%i/exe", getpid()) < 0)
- {
- /* This should only happen on large word systems. I'm not sure
- what the proper response is here.
- Since it really is an assert-like condition, aborting the
- program seems to be in order. */
- assert(false);
- }
-
- /* Now read the symbolic link */
- char buffer[1024];
- int ret;
- ret = readlink(linkname, buffer, 1024);
- /* In case of an error, leave the handling up to the caller */
- if (ret == -1)
- ThrowException(General, "Could not retrieve executable path.");
-
- /* Ensure proper NUL termination */
- buffer[ret] = 0;
-#endif
-
- configuration_->executablePath_ = boost::filesystem::path(buffer);
-#ifndef ORXONOX_PLATFORM_APPLE
- configuration_->executablePath_ = configuration_->executablePath_.branch_path(); // remove executable name
-#endif
-
- /////////////////////
- // SET MODULE PATH //
- /////////////////////
-
- if (boost::filesystem::exists(configuration_->executablePath_ / "orxonox_dev_build.keep_me"))
- {
- COUT(1) << "Running from the build tree." << std::endl;
- Core::bDevRun_ = true;
- configuration_->modulePath_ = specialConfig::moduleDevDirectory;
- }
- else
- {
-
-#ifdef INSTALL_COPYABLE // --> relative paths
-
- // Also set the root path
- boost::filesystem::path relativeExecutablePath(specialConfig::defaultRuntimePath);
- configuration_->rootPath_ = configuration_->executablePath_;
- while (!boost::filesystem::equivalent(configuration_->rootPath_ / relativeExecutablePath, configuration_->executablePath_)
- && !configuration_->rootPath_.empty())
- configuration_->rootPath_ = configuration_->rootPath_.branch_path();
- if (configuration_->rootPath_.empty())
- ThrowException(General, "Could not derive a root directory. Might the binary installation directory contain '..' when taken relative to the installation prefix path?");
-
- // Module path is fixed as well
- configuration_->modulePath_ = configuration_->rootPath_ / specialConfig::defaultModulePath;
-
-#else
-
- // There is no root path, so don't set it at all
- // Module path is fixed as well
- configuration_->modulePath_ = specialConfig::moduleInstallDirectory;
-
-#endif
- }
- }
-
- /**
- @brief
- Sets config, log and media path and creates folders if necessary.
- @throws
- GeneralException
- */
- void Core::setConfigurablePaths()
- {
- if (Core::isDevelopmentRun())
- {
- configuration_->dataPath_ = specialConfig::dataDevDirectory;
- configuration_->externalDataPath_ = specialConfig::externalDataDevDirectory;
- configuration_->configPath_ = specialConfig::configDevDirectory;
- configuration_->logPath_ = specialConfig::logDevDirectory;
- }
- else
- {
-
-#ifdef INSTALL_COPYABLE // --> relative paths
-
- // Using paths relative to the install prefix, complete them
- configuration_->dataPath_ = configuration_->rootPath_ / specialConfig::defaultDataPath;
- configuration_->configPath_ = configuration_->rootPath_ / specialConfig::defaultConfigPath;
- configuration_->logPath_ = configuration_->rootPath_ / specialConfig::defaultLogPath;
-
-#else
-
- configuration_->dataPath_ = specialConfig::dataInstallDirectory;
-
- // Get user directory
-# ifdef ORXONOX_PLATFORM_UNIX /* Apple? */
- char* userDataPathPtr(getenv("HOME"));
-# else
- char* userDataPathPtr(getenv("APPDATA"));
-# endif
- if (userDataPathPtr == NULL)
- ThrowException(General, "Could not retrieve user data path.");
- boost::filesystem::path userDataPath(userDataPathPtr);
- userDataPath /= ".orxonox";
-
- configuration_->configPath_ = userDataPath / specialConfig::defaultConfigPath;
- configuration_->logPath_ = userDataPath / specialConfig::defaultLogPath;
-
-#endif
-
- }
-
- // Option to put all the config and log files in a separate folder
- if (!CommandLine::getArgument("writingPathSuffix")->hasDefaultValue())
- {
- std::string directory(CommandLine::getValue("writingPathSuffix").getString());
- configuration_->configPath_ = configuration_->configPath_ / directory;
- configuration_->logPath_ = configuration_->logPath_ / directory;
- }
-
- // Create directories to avoid problems when opening files in non existent folders.
- std::vector<std::pair<boost::filesystem::path, std::string> > directories;
- directories.push_back(std::make_pair(boost::filesystem::path(configuration_->configPath_), "config"));
- directories.push_back(std::make_pair(boost::filesystem::path(configuration_->logPath_), "log"));
-
- for (std::vector<std::pair<boost::filesystem::path, std::string> >::iterator it = directories.begin();
- it != directories.end(); ++it)
- {
- if (boost::filesystem::exists(it->first) && !boost::filesystem::is_directory(it->first))
- {
- ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
- Please remove " + it->first.string());
- }
- if (boost::filesystem::create_directories(it->first)) // function may not return true at all (bug?)
- {
- COUT(4) << "Created " << it->second << " directory" << std::endl;
- }
- }
- }
-
void Core::preUpdate(const Clock& time)
{
if (this->bGraphicsLoaded_)
Modified: code/branches/core5/src/libraries/core/Core.h
===================================================================
--- code/branches/core5/src/libraries/core/Core.h 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/Core.h 2009-09-29 22:00:16 UTC (rev 5836)
@@ -27,15 +27,6 @@
*
*/
-/**
- at file
- at brief
- Declaration of the Core class.
- at details
- The Core class is a singleton, only used to configure some variables
- in the core through the config-file.
-*/
-
#ifndef _Core_H__
#define _Core_H__
@@ -54,9 +45,6 @@
/**
@brief
The Core class is a singleton used to configure the program basics.
- @details
- The class provides information about the data, config and log path.
- It determines those by the use of platform specific functions.
@remark
You should only create this singleton once because it destroys the identifiers!
*/
@@ -84,30 +72,6 @@
static const std::string& getLanguage();
static void resetLanguage();
- static void tsetExternalDataPath(const std::string& path);
- //! Returns the path to the data files as boost::filesystem::path
- static const boost::filesystem::path& getDataPath();
- //! Returns the path to the external data files as boost::filesystem::path
- static const boost::filesystem::path& getExternalDataPath();
- //! Returns the path to the config files as boost::filesystem::path
- static const boost::filesystem::path& getConfigPath();
- //! Returns the path to the log files as boost::filesystem::path
- static const boost::filesystem::path& getLogPath();
- //! Returns the path to the root folder as boost::filesystem::path
- static const boost::filesystem::path& getRootPath();
- //! Returns the path to the data files as std::string
- static std::string getDataPathString();
- //! Returns the path to the external data files as std::string
- static std::string getExternalDataPathString();
- //! Returns the path to the config files as std::string
- static std::string getConfigPathString();
- //! Returns the path to the log files as std::string
- static std::string getLogPathString();
- //! Returns the path to the root folder as std::string
- static std::string getRootPathString();
-
- static bool isDevelopmentRun() { return getInstance().bDevRun_; }
-
private:
Core(const Core&); //!< Don't use (undefined symbol)
@@ -117,11 +81,10 @@
void loadGraphics();
void unloadGraphics();
- void setFixedPaths();
- void setConfigurablePaths();
void setThreadAffinity(int limitToCPU);
// Mind the order for the destruction!
+ scoped_ptr<PathConfig> pathConfig_;
scoped_ptr<DynLibManager> dynLibManager_;
scoped_ptr<SignalHandler> signalHandler_;
SimpleScopeGuard identifierDestroyer_;
@@ -137,9 +100,7 @@
scoped_ptr<InputManager> inputManager_; //!< Interface to OIS
scoped_ptr<GUIManager> guiManager_; //!< Interface to GUI
- bool bDevRun_; //!< True for runs in the build directory (not installed)
bool bGraphicsLoaded_;
-
static Core* singletonPtr_s;
};
}
Modified: code/branches/core5/src/libraries/core/CorePrereqs.h
===================================================================
--- code/branches/core5/src/libraries/core/CorePrereqs.h 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/CorePrereqs.h 2009-09-29 22:00:16 UTC (rev 5836)
@@ -150,6 +150,7 @@
class ObjectListIterator;
class OgreWindowEventListener;
class OrxonoxClass;
+ class PathConfig;
struct ResourceInfo;
class Shell;
class ShellListener;
Modified: code/branches/core5/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/core5/src/libraries/core/GUIManager.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/GUIManager.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -54,6 +54,7 @@
#include "Core.h"
#include "Clock.h"
#include "LuaState.h"
+#include "PathConfig.h"
#include "Resource.h"
namespace orxonox
@@ -115,7 +116,7 @@
// Create our own logger to specify the filepath
std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
- ceguiLogger->setLogFilename(Core::getLogPathString() + "cegui.log");
+ ceguiLogger->setLogFilename(PathConfig::getLogPathString() + "cegui.log");
// set the log level according to ours (translate by subtracting 1)
ceguiLogger->setLoggingLevel(
static_cast<LoggingLevel>(Core::getSoftDebugLevel(OutputHandler::LD_Logfile) - 1));
Modified: code/branches/core5/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/core5/src/libraries/core/GraphicsManager.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/GraphicsManager.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -54,11 +54,11 @@
#include "ConsoleCommand.h"
#include "ConfigValueIncludes.h"
#include "CoreIncludes.h"
-#include "Core.h"
#include "Game.h"
#include "GameMode.h"
#include "Loader.h"
#include "MemoryArchive.h"
+#include "PathConfig.h"
#include "WindowEventListener.h"
#include "XMLFile.h"
@@ -101,16 +101,16 @@
this->loadOgrePlugins();
// At first, add the root paths of the data directories as resource locations
- Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getDataPathString(), "FileSystem", "dataRoot", false);
+ Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getDataPathString(), "FileSystem", "dataRoot", false);
// Load resources
resources_.reset(new XMLFile("resources.oxr", "dataRoot"));
resources_->setLuaSupport(false);
Loader::open(resources_.get());
// Only for development runs
- if (Core::isDevelopmentRun())
+ if (PathConfig::isDevelopmentRun())
{
- Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
+ Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
extResources_.reset(new XMLFile("resources.oxr", "externalDataRoot"));
extResources_->setLuaSupport(false);
Loader::open(extResources_.get());
@@ -134,7 +134,7 @@
// Undeclare the resources
Loader::unload(resources_.get());
- if (Core::isDevelopmentRun())
+ if (PathConfig::isDevelopmentRun())
Loader::unload(extResources_.get());
}
@@ -245,8 +245,8 @@
ModifyConfigValue(ogreLogFile_, tset, "ogre.log");
}
- boost::filesystem::path ogreConfigFilepath(Core::getConfigPath() / this->ogreConfigFile_);
- boost::filesystem::path ogreLogFilepath(Core::getLogPath() / this->ogreLogFile_);
+ boost::filesystem::path ogreConfigFilepath(PathConfig::getConfigPath() / this->ogreConfigFile_);
+ boost::filesystem::path ogreLogFilepath(PathConfig::getLogPath() / this->ogreLogFile_);
// create a new logManager
// Ogre::Root will detect that we've already created a Log
@@ -421,6 +421,6 @@
{
assert(this->renderWindow_);
- this->renderWindow_->writeContentsToTimestampedFile(Core::getLogPathString() + "screenShot_", ".jpg");
+ this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".jpg");
}
}
Modified: code/branches/core5/src/libraries/core/Language.cc
===================================================================
--- code/branches/core5/src/libraries/core/Language.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/Language.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -38,6 +38,7 @@
#include "util/Debug.h"
#include "Core.h"
+#include "PathConfig.h"
namespace orxonox
{
@@ -199,7 +200,7 @@
{
COUT(4) << "Read default language file." << std::endl;
- boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));
+ boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));
// This creates the file if it's not existing
std::ofstream createFile;
@@ -248,7 +249,7 @@
{
COUT(4) << "Read translated language file (" << Core::getLanguage() << ")." << std::endl;
- boost::filesystem::path filepath(Core::getConfigPath() / getFilename(Core::getLanguage()));
+ boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(Core::getLanguage()));
// Open the file
std::ifstream file;
@@ -302,7 +303,7 @@
{
COUT(4) << "Language: Write default language file." << std::endl;
- boost::filesystem::path filepath(Core::getConfigPath() / getFilename(this->defaultLanguage_));
+ boost::filesystem::path filepath(PathConfig::getConfigPath() / getFilename(this->defaultLanguage_));
// Open the file
std::ofstream file;
Modified: code/branches/core5/src/libraries/core/LuaState.cc
===================================================================
--- code/branches/core5/src/libraries/core/LuaState.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/LuaState.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -36,7 +36,6 @@
}
#include "util/Debug.h"
-#include "Core.h"
#include "Resource.h"
#include "ToluaBindCore.h"
Copied: code/branches/core5/src/libraries/core/PathConfig.cc (from rev 5832, code/branches/core5/src/libraries/core/Core.cc)
===================================================================
--- code/branches/core5/src/libraries/core/PathConfig.cc (rev 0)
+++ code/branches/core5/src/libraries/core/PathConfig.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -0,0 +1,323 @@
+/*
+ * 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 "PathConfig.h"
+
+#include <cassert>
+#include <cstdlib>
+#include <cstdio>
+#include <vector>
+#include <boost/version.hpp>
+#include <boost/filesystem.hpp>
+
+#ifdef ORXONOX_PLATFORM_WINDOWS
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# undef min
+# undef max
+#elif defined(ORXONOX_PLATFORM_APPLE)
+# include <sys/param.h>
+# include <mach-o/dyld.h>
+#else /* Linux */
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#include "SpecialConfig.h"
+#include "util/Debug.h"
+#include "util/Exception.h"
+#include "CommandLine.h"
+
+// Boost 1.36 has some issues with deprecated functions that have been omitted
+#if (BOOST_VERSION == 103600)
+# define BOOST_LEAF_FUNCTION filename
+#else
+# define BOOST_LEAF_FUNCTION leaf
+#endif
+
+namespace orxonox
+{
+ namespace bf = boost::filesystem;
+
+ //! Static pointer to the singleton
+ PathConfig* PathConfig::singletonPtr_s = 0;
+
+ SetCommandLineArgument(externalDataPath, "").information("Path to the external data files");
+ SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
+
+ PathConfig::PathConfig()
+ : rootPath_(*(new bf::path()))
+ , executablePath_(*(new bf::path()))
+ , modulePath_(*(new bf::path()))
+ , dataPath_(*(new bf::path()))
+ , externalDataPath_(*(new bf::path()))
+ , configPath_(*(new bf::path()))
+ , logPath_(*(new bf::path()))
+ , bDevRun_(false)
+ {
+ //////////////////////////
+ // FIND EXECUTABLE PATH //
+ //////////////////////////
+
+#ifdef ORXONOX_PLATFORM_WINDOWS
+ // get executable module
+ TCHAR buffer[1024];
+ if (GetModuleFileName(NULL, buffer, 1024) == 0)
+ ThrowException(General, "Could not retrieve executable path.");
+
+#elif defined(ORXONOX_PLATFORM_APPLE)
+ char buffer[1024];
+ unsigned long path_len = 1023;
+ if (_NSGetExecutablePath(buffer, &path_len))
+ ThrowException(General, "Could not retrieve executable path.");
+
+#else /* Linux */
+ /* written by Nicolai Haehnle <prefect_ at gmx.net> */
+
+ /* Get our PID and build the name of the link in /proc */
+ char linkname[64]; /* /proc/<pid>/exe */
+ if (snprintf(linkname, sizeof(linkname), "/proc/%i/exe", getpid()) < 0)
+ {
+ /* This should only happen on large word systems. I'm not sure
+ what the proper response is here.
+ Since it really is an assert-like condition, aborting the
+ program seems to be in order. */
+ assert(false);
+ }
+
+ /* Now read the symbolic link */
+ char buffer[1024];
+ int ret;
+ ret = readlink(linkname, buffer, 1024);
+ /* In case of an error, leave the handling up to the caller */
+ if (ret == -1)
+ ThrowException(General, "Could not retrieve executable path.");
+
+ /* Ensure proper NUL termination */
+ buffer[ret] = 0;
+#endif
+
+ executablePath_ = bf::path(buffer);
+#ifndef ORXONOX_PLATFORM_APPLE
+ executablePath_ = executablePath_.branch_path(); // remove executable name
+#endif
+
+ /////////////////////
+ // SET MODULE PATH //
+ /////////////////////
+
+ if (bf::exists(executablePath_ / "orxonox_dev_build.keep_me"))
+ {
+ COUT(1) << "Running from the build tree." << std::endl;
+ PathConfig::bDevRun_ = true;
+ modulePath_ = specialConfig::moduleDevDirectory;
+ }
+ else
+ {
+
+#ifdef INSTALL_COPYABLE // --> relative paths
+
+ // Also set the root path
+ bf::path relativeExecutablePath(specialConfig::defaultRuntimePath);
+ rootPath_ = executablePath_;
+ while (!bf::equivalent(rootPath_ / relativeExecutablePath, executablePath_) && !rootPath_.empty())
+ rootPath_ = rootPath_.branch_path();
+ if (rootPath_.empty())
+ ThrowException(General, "Could not derive a root directory. Might the binary installation directory contain '..' when taken relative to the installation prefix path?");
+
+ // Module path is fixed as well
+ modulePath_ = rootPath_ / specialConfig::defaultModulePath;
+
+#else
+
+ // There is no root path, so don't set it at all
+ // Module path is fixed as well
+ modulePath_ = specialConfig::moduleInstallDirectory;
+
+#endif
+ }
+ }
+
+ PathConfig::~PathConfig()
+ {
+ delete &rootPath_;
+ delete &executablePath_;
+ delete &modulePath_;
+ delete &dataPath_;
+ delete &externalDataPath_;
+ delete &configPath_;
+ delete &logPath_;
+ }
+
+ void PathConfig::setConfigurablePaths()
+ {
+ if (bDevRun_)
+ {
+ dataPath_ = specialConfig::dataDevDirectory;
+ configPath_ = specialConfig::configDevDirectory;
+ logPath_ = specialConfig::logDevDirectory;
+
+ // Check for data path override by the command line
+ if (!CommandLine::getArgument("externalDataPath")->hasDefaultValue())
+ externalDataPath_ = CommandLine::getValue("externalDataPath").getString();
+ else
+ externalDataPath_ = specialConfig::externalDataDevDirectory;
+ }
+ else
+ {
+
+#ifdef INSTALL_COPYABLE // --> relative paths
+
+ // Using paths relative to the install prefix, complete them
+ dataPath_ = rootPath_ / specialConfig::defaultDataPath;
+ configPath_ = rootPath_ / specialConfig::defaultConfigPath;
+ logPath_ = rootPath_ / specialConfig::defaultLogPath;
+
+#else
+
+ dataPath_ = specialConfig::dataInstallDirectory;
+
+ // Get user directory
+# ifdef ORXONOX_PLATFORM_UNIX /* Apple? */
+ char* userDataPathPtr(getenv("HOME"));
+# else
+ char* userDataPathPtr(getenv("APPDATA"));
+# endif
+ if (userDataPathPtr == NULL)
+ ThrowException(General, "Could not retrieve user data path.");
+ bf::path userDataPath(userDataPathPtr);
+ userDataPath /= ".orxonox";
+
+ configPath_ = userDataPath / specialConfig::defaultConfigPath;
+ logPath_ = userDataPath / specialConfig::defaultLogPath;
+
+#endif
+
+ }
+
+ // Option to put all the config and log files in a separate folder
+ if (!CommandLine::getArgument("writingPathSuffix")->hasDefaultValue())
+ {
+ std::string directory(CommandLine::getValue("writingPathSuffix").getString());
+ configPath_ = configPath_ / directory;
+ logPath_ = logPath_ / directory;
+ }
+
+ // 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"));
+
+ for (std::vector<std::pair<bf::path, std::string> >::iterator it = directories.begin();
+ it != directories.end(); ++it)
+ {
+ if (bf::exists(it->first) && !bf::is_directory(it->first))
+ {
+ ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
+ Please remove " + it->first.string());
+ }
+ if (bf::create_directories(it->first)) // function may not return true at all (bug?)
+ {
+ COUT(4) << "Created " << it->second << " directory" << std::endl;
+ }
+ }
+ }
+
+ std::vector<std::string> PathConfig::getModulePaths()
+ {
+ std::vector<std::string> modulePaths;
+
+ // We search for helper files with the following extension
+ std::string moduleextension = specialConfig::moduleExtension;
+ size_t moduleextensionlength = moduleextension.size();
+
+ // 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()));
+
+ boost::filesystem::directory_iterator file(modulePath_);
+ boost::filesystem::directory_iterator end;
+
+ // Iterate through all files
+ while (file != end)
+ {
+ std::string filename = file->BOOST_LEAF_FUNCTION();
+
+ // Check if the file ends with the exension in question
+ if (filename.size() > moduleextensionlength)
+ {
+ if (filename.substr(filename.size() - moduleextensionlength) == moduleextension)
+ {
+ // We've found a helper file
+ std::string library = filename.substr(0, filename.size() - moduleextensionlength);
+ modulePaths.push_back((modulePath_ / library).string());
+ }
+ }
+ ++file;
+ }
+
+ return modulePaths;
+ }
+
+ /*static*/ std::string PathConfig::getRootPathString()
+ {
+ return getInstance().rootPath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getExecutablePathString()
+ {
+ return getInstance().executablePath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getDataPathString()
+ {
+ return getInstance().dataPath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getExternalDataPathString()
+ {
+ return getInstance().externalDataPath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getConfigPathString()
+ {
+ return getInstance().configPath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getLogPathString()
+ {
+ return getInstance().logPath_.string() + '/';
+ }
+
+ /*static*/ std::string PathConfig::getModulePathString()
+ {
+ return getInstance().modulePath_.string() + '/';
+ }
+}
Copied: code/branches/core5/src/libraries/core/PathConfig.h (from rev 5832, code/branches/core5/src/libraries/core/Core.h)
===================================================================
--- code/branches/core5/src/libraries/core/PathConfig.h (rev 0)
+++ code/branches/core5/src/libraries/core/PathConfig.h 2009-09-29 22:00:16 UTC (rev 5836)
@@ -0,0 +1,136 @@
+/*
+ * 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:
+ * ...
+ *
+ */
+
+#ifndef _PathConfig_H__
+#define _PathConfig_H__
+
+#include "CorePrereqs.h"
+
+#include <string>
+#include "util/Singleton.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ The PathConfig class is a singleton used to configure different paths.
+ @details
+ The class provides information about the data, config, log, executable,
+ root and module path.
+ It determines those by the use of platform specific functions.
+ @remarks
+ Not all paths are always available:
+ - root only when installed copyable
+ - externalData only for development builds in the build tree
+ */
+ class _CoreExport PathConfig : public Singleton<PathConfig>
+ {
+ friend class Singleton<PathConfig>;
+ friend class Core;
+
+ public:
+ /**
+ @brief
+ Retrievs the executable path and sets all hard coded fixed paths (currently only the module path)
+ Also checks for "orxonox_dev_build.keep_me" in the executable diretory.
+ If found it means that this is not an installed run, hence we
+ don't write the logs and config files to ~/.orxonox
+ @throw
+ GeneralException
+ */
+ PathConfig();
+ ~PathConfig();
+
+ //! Returns the path to the root folder as boost::filesystem::path
+ static const boost::filesystem::path& getRootPath()
+ { return getInstance().rootPath_; }
+ //! Returns the path to the executable folder as boost::filesystem::path
+ static const boost::filesystem::path& getExecutablePath()
+ { return getInstance().executablePath_; }
+ //! Returns the path to the data files as boost::filesystem::path
+ static const boost::filesystem::path& getDataPath()
+ { return getInstance().dataPath_; }
+ //! Returns the path to the external data files as boost::filesystem::path
+ static const boost::filesystem::path& getExternalDataPath()
+ { return getInstance().externalDataPath_; }
+ //! Returns the path to the config files as boost::filesystem::path
+ static const boost::filesystem::path& getConfigPath()
+ { return getInstance().configPath_; }
+ //! Returns the path to the log files as boost::filesystem::path
+ static const boost::filesystem::path& getLogPath()
+ { return getInstance().logPath_; }
+ //! Returns the path to the modules as boost::filesystem::path
+ static const boost::filesystem::path& getModulePath()
+ { return getInstance().modulePath_; }
+
+ //! Returns the path to the root folder as std::string
+ static std::string getRootPathString();
+ //! Returns the path to the executable folder as std::string
+ static std::string getExecutablePathString();
+ //! Returns the path to the data files as std::string
+ static std::string getDataPathString();
+ //! Returns the path to the external data files as std::string
+ static std::string getExternalDataPathString();
+ //! Returns the path to the config files as std::string
+ static std::string getConfigPathString();
+ //! Returns the path to the log files as std::string
+ static std::string getLogPathString();
+ //! Returns the path to the modules as std::string
+ static std::string getModulePathString();
+
+ //! Return trrue for runs in the build directory (not installed)
+ static bool isDevelopmentRun() { return getInstance().bDevRun_; }
+
+ private:
+ PathConfig(const PathConfig&); //!< Don't use (undefined symbol)
+
+ /**
+ @brief
+ Sets config, log and media path and creates the folders if necessary.
+ @throws
+ GeneralException
+ */
+ void setConfigurablePaths();
+ //! Returns a list with all modules declared by a *.module file in the module folder.
+ std::vector<std::string> getModulePaths();
+
+ //! Path to the parent directory of the ones above if program was installed with relativ paths
+ boost::filesystem::path& rootPath_;
+ boost::filesystem::path& executablePath_; //!< Path to the executable
+ boost::filesystem::path& modulePath_; //!< Path to the modules
+ boost::filesystem::path& dataPath_; //!< Path to the data files folder
+ boost::filesystem::path& externalDataPath_; //!< Path to the external data files folder
+ boost::filesystem::path& configPath_; //!< Path to the config files folder
+ boost::filesystem::path& logPath_; //!< Path to the log files folder
+
+ bool bDevRun_; //!< True for runs in the build directory (not installed)
+ static PathConfig* singletonPtr_s;
+ };
+}
+
+#endif /* _PathConfig_H__ */
Modified: code/branches/core5/src/libraries/core/TclBind.cc
===================================================================
--- code/branches/core5/src/libraries/core/TclBind.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/core/TclBind.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -38,7 +38,7 @@
#include "util/StringUtils.h"
#include "CommandExecutor.h"
#include "ConsoleCommand.h"
-#include "Core.h"
+#include "PathConfig.h"
#include "TclThreadManager.h"
namespace orxonox
@@ -122,10 +122,10 @@
std::string TclBind::getTclLibraryPath()
{
#ifdef DEPENDENCY_PACKAGE_ENABLE
- if (Core::isDevelopmentRun())
+ if (PathConfig::isDevelopmentRun())
return (std::string(specialConfig::dependencyLibraryDirectory) + "/tcl");
else
- return (Core::getRootPathString() + "lib/tcl");
+ return (PathConfig::getRootPathString() + "lib/tcl");
#else
return "";
#endif
Modified: code/branches/core5/src/libraries/tools/ResourceLocation.cc
===================================================================
--- code/branches/core5/src/libraries/tools/ResourceLocation.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/libraries/tools/ResourceLocation.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -32,8 +32,8 @@
#include <boost/filesystem.hpp>
#include "util/Exception.h"
-#include "core/Core.h"
#include "core/CoreIncludes.h"
+#include "core/PathConfig.h"
#include "core/XMLFile.h"
#include "core/XMLPort.h"
@@ -70,11 +70,12 @@
ThrowException(InitialisationFailed, "ResourceLocation: Trying to add one without the path being set");
// Find the path
- boost::filesystem::path path;
- if (boost::filesystem::exists(Core::getDataPath() / this->getPath()))
- path = Core::getDataPath() / this->getPath();
- else if (Core::isDevelopmentRun() && boost::filesystem::exists(Core::getExternalDataPath() / this->getPath()))
- path = Core::getExternalDataPath() / this->getPath();
+ namespace bf = boost::filesystem;
+ bf::path path;
+ if (bf::exists(PathConfig::getDataPath() / this->getPath()))
+ path = PathConfig::getDataPath() / this->getPath();
+ else if (PathConfig::isDevelopmentRun() && bf::exists(PathConfig::getExternalDataPath() / this->getPath()))
+ path = PathConfig::getExternalDataPath() / this->getPath();
else
{
COUT(2) << "Warning: ResourceLocation '" << this->getPath() << "' does not seem to exist" << std::endl;
Modified: code/branches/core5/src/modules/gamestates/GSGraphics.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSGraphics.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/modules/gamestates/GSGraphics.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -38,7 +38,6 @@
#include "core/Clock.h"
#include "core/CommandExecutor.h"
#include "core/ConsoleCommand.h"
-#include "core/Core.h"
#include "core/Game.h"
#include "core/GUIManager.h"
#include "core/input/InputManager.h"
Modified: code/branches/core5/src/modules/gamestates/GSLevel.cc
===================================================================
--- code/branches/core5/src/modules/gamestates/GSLevel.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/modules/gamestates/GSLevel.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -40,7 +40,6 @@
#include "core/CoreIncludes.h"
#include "core/Game.h"
#include "core/GameMode.h"
-#include "core/Core.h"
#include "core/GraphicsManager.h"
#include "core/GUIManager.h"
#include "core/Loader.h"
Modified: code/branches/core5/src/orxonox/Level.cc
===================================================================
--- code/branches/core5/src/orxonox/Level.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/orxonox/Level.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -29,7 +29,6 @@
#include "Level.h"
#include "util/Math.h"
-#include "core/Core.h"
#include "core/CoreIncludes.h"
#include "core/Loader.h"
#include "core/Template.h"
Modified: code/branches/core5/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/core5/src/orxonox/LevelManager.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/orxonox/LevelManager.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -33,7 +33,6 @@
#include "core/CommandLine.h"
#include "core/ConfigValueIncludes.h"
-#include "core/Core.h"
#include "core/CoreIncludes.h"
#include "core/Loader.h"
#include "PlayerManager.h"
Modified: code/branches/core5/src/orxonox/sound/SoundBase.cc
===================================================================
--- code/branches/core5/src/orxonox/sound/SoundBase.cc 2009-09-29 20:47:58 UTC (rev 5835)
+++ code/branches/core5/src/orxonox/sound/SoundBase.cc 2009-09-29 22:00:16 UTC (rev 5836)
@@ -34,7 +34,6 @@
#include <vorbis/vorbisfile.h>
#include "util/Math.h"
-#include "core/Core.h"
#include "core/Resource.h"
#include "worldentities/WorldEntity.h"
#include "SoundManager.h"
More information about the Orxonox-commit
mailing list