[Orxonox-commit 922] r5645 - in code/branches/resource2: . cmake media src src/core src/orxonox src/orxonox/gamestates src/orxonox/objects src/orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Aug 13 22:50:07 CEST 2009
Author: rgrieder
Date: 2009-08-13 22:50:07 +0200 (Thu, 13 Aug 2009)
New Revision: 5645
Added:
code/branches/resource2/media/DataInstallScript.cmake
Removed:
code/branches/resource2/media/MediaInstallScript.cmake
Modified:
code/branches/resource2/
code/branches/resource2/CMakeLists.txt
code/branches/resource2/cmake/BuildConfig.cmake
code/branches/resource2/media/CMakeLists.txt
code/branches/resource2/src/SpecialConfig.h.in
code/branches/resource2/src/core/ConfigFileManager.cc
code/branches/resource2/src/core/Core.cc
code/branches/resource2/src/core/Core.h
code/branches/resource2/src/core/GUIManager.cc
code/branches/resource2/src/core/LuaBind.cc
code/branches/resource2/src/orxonox/LevelManager.cc
code/branches/resource2/src/orxonox/gamestates/GSGraphics.cc
code/branches/resource2/src/orxonox/gamestates/GSLevel.cc
code/branches/resource2/src/orxonox/objects/Level.cc
code/branches/resource2/src/orxonox/sound/SoundBase.cc
Log:
Renamed media to data to restore consistency with game/data/trunk folder name.
Couldn't yet rename the media folder though probably due to some fundamental limitations of SVN (believe me, I tried).
Property changes on: code/branches/resource2
___________________________________________________________________
Modified: svn:externals
- media_stripped http://svn.orxonox.net/game/data/branches/media_stripped
+ data_stripped https://svn.orxonox.net/game/data/branches/media_stripped
Modified: code/branches/resource2/CMakeLists.txt
===================================================================
--- code/branches/resource2/CMakeLists.txt 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/CMakeLists.txt 2009-08-13 20:50:07 UTC (rev 5645)
@@ -45,8 +45,8 @@
# General build and compiler options and configurations
INCLUDE(BuildConfig)
-# Configure media directory location and installation
-ADD_SUBDIRECTORY(media)
+# Configure data directory location and installation
+ADD_SUBDIRECTORY(data)
# Create the actual project
ADD_SUBDIRECTORY(src)
Modified: code/branches/resource2/cmake/BuildConfig.cmake
===================================================================
--- code/branches/resource2/cmake/BuildConfig.cmake 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/cmake/BuildConfig.cmake 2009-08-13 20:50:07 UTC (rev 5645)
@@ -21,7 +21,7 @@
# Reto Grieder
# Description:
# Configures the compilers and sets build options.
- # This also includes handling the OGRE plugins and the media directory.
+ # This also includes handling the OGRE plugins and the data directory.
#
################# Misc Settings #################
@@ -31,7 +31,7 @@
SET(DEFAULT_LIBRARY_PATH lib)
SET(DEFAULT_ARCHIVE_PATH lib/static)
SET(DEFAULT_DOC_PATH doc)
-SET(DEFAULT_MEDIA_PATH media)
+SET(DEFAULT_DATA_PATH data)
SET(DEFAULT_CONFIG_PATH config)
SET(DEFAULT_LOG_PATH log)
@@ -40,7 +40,7 @@
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH})
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH})
SET(CMAKE_DOC_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_DOC_PATH})
-# Media directories are only inputs
+# Data directories are only inputs
SET(CMAKE_CONFIG_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_CONFIG_PATH})
SET(CMAKE_LOG_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LOG_PATH})
@@ -130,7 +130,7 @@
SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
SET(DOC_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
-SET(MEDIA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH})
+SET(DATA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DATA_PATH})
SET(CONFIG_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_CONFIG_PATH})
SET(LOG_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LOG_PATH})
@@ -141,7 +141,7 @@
SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
SET(DOC_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
- SET(MEDIA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/orxonox)
+ SET(DATA_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/orxonox)
ENDIF()
# Leave empty because it is user and therefore runtime dependent
Modified: code/branches/resource2/media/CMakeLists.txt
===================================================================
--- code/branches/resource2/media/CMakeLists.txt 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/media/CMakeLists.txt 2009-08-13 20:50:07 UTC (rev 5645)
@@ -20,28 +20,28 @@
# Author:
# Reto Grieder
# Description:
- # Finds the external media directory and configures the media installation.
- # Default search paths are: ../../media and ../media_extern
+ # Finds the external data directory and configures the data installation.
+ # Default search paths are: ../../data and ../data_extern
#
-# For dev runs we've got two media directory. The one from the other repository root folder
-# is called EXTERNAL_MEDIA
-SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
+# For dev runs we've got two data directory. The one from the other repository root folder
+# is called EXTERNAL_DATA
+SET(DATA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+SET(DATA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
-# Specify media directory
-GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
-FIND_PATH(EXTERNAL_MEDIA_DIRECTORY resources.oxr
+# Specify data directory
+GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_DATA_PATH} ABSOLUTE)
+FIND_PATH(EXTERNAL_DATA_DIRECTORY resources.oxr
PATHS
- ${CMAKE_SOURCE_DIR}/media_extern
+ ${CMAKE_SOURCE_DIR}/data_extern
${_search_path_1}
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
)
-IF(NOT EXTERNAL_MEDIA_DIRECTORY)
- MESSAGE(STATUS "Warning: External media directory not found. If you want to compile while downloading the media files, you will have to recompile about four files afterwards and relink everything. \\n You can specify your own folder with the MEDIA_DIRECTORY variable. Default location for the path is orxonox_root/media_extern")
+IF(NOT EXTERNAL_DATA_DIRECTORY)
+ MESSAGE(STATUS "Warning: External data directory not found. If you want to compile while downloading the data files, you will have to recompile about four files afterwards and relink everything. \\n You can specify your own folder with the DATA_DIRECTORY variable. Default location for the path is orxonox_root/data_extern")
# Temporary override to the default location.
- SET(EXTERNAL_MEDIA_DIRECTORY ${CMAKE_SOURCE_DIR}/media_extern)
+ SET(EXTERNAL_DATA_DIRECTORY ${CMAKE_SOURCE_DIR}/data_extern)
ENDIF()
@@ -49,17 +49,17 @@
# Internal directory
INSTALL(
- DIRECTORY ${MEDIA_DIRECTORY}/
- DESTINATION ${MEDIA_INSTALL_DIRECTORY}
+ DIRECTORY ${DATA_DIRECTORY}/
+ DESTINATION ${DATA_INSTALL_DIRECTORY}
REGEX "\\.svn$|_svn$|CMakeLists.txt|InstallScript.cmake" EXCLUDE
)
# External directory
INSTALL(
- DIRECTORY ${EXTERNAL_MEDIA_DIRECTORY}/
- DESTINATION ${MEDIA_INSTALL_DIRECTORY}
+ DIRECTORY ${EXTERNAL_DATA_DIRECTORY}/
+ DESTINATION ${DATA_INSTALL_DIRECTORY}
REGEX "\\.svn$|_svn$|resources\\.oxr" EXCLUDE
)
# Configure the install scripts (variables not available during installation)
-CONFIGURE_FILE(MediaInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/MediaInstallScript.cmake @ONLY)
+CONFIGURE_FILE(DataInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake @ONLY)
# Join both resources.oxr files
-INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/MediaInstallScript.cmake)
+INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake)
Copied: code/branches/resource2/media/DataInstallScript.cmake (from rev 5644, code/branches/resource2/media/MediaInstallScript.cmake)
===================================================================
--- code/branches/resource2/media/DataInstallScript.cmake (rev 0)
+++ code/branches/resource2/media/DataInstallScript.cmake 2009-08-13 20:50:07 UTC (rev 5645)
@@ -0,0 +1,37 @@
+ #
+ # ORXONOX - the hottest 3D action shooter ever to exist
+ # > www.orxonox.net <
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+ # as published by the Free Software Foundation; either version 2
+ # of the License, or (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+ # with this program; if not, write to the Free Software Foundation,
+ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+ #
+ # Author:
+ # Reto Grieder
+ # Description:
+ # Joins both resources.oxr files together
+ # Caution:
+ # Variables are declared with @...@ because they don't exist anymore
+ # during the installation. But we still require variables (_external_file)
+ # so we can only replace @...@ but not ${...}
+ #
+
+# Write some comment
+FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ---------------------------------------- -->")
+FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- Content from the external data directory -->")
+FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- ---------------------------------------- -->\n\n")
+
+# Append the external file
+FILE(READ @EXTERNAL_DATA_DIRECTORY@/resources.oxr _external_file)
+FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
Deleted: code/branches/resource2/media/MediaInstallScript.cmake
===================================================================
--- code/branches/resource2/media/MediaInstallScript.cmake 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/media/MediaInstallScript.cmake 2009-08-13 20:50:07 UTC (rev 5645)
@@ -1,37 +0,0 @@
- #
- # ORXONOX - the hottest 3D action shooter ever to exist
- # > www.orxonox.net <
- #
- # This program is free software; you can redistribute it and/or
- # modify it under the terms of the GNU General Public License
- # as published by the Free Software Foundation; either version 2
- # of the License, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License along
- # with this program; if not, write to the Free Software Foundation,
- # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- #
- #
- # Author:
- # Reto Grieder
- # Description:
- # Joins both resources.oxr files together
- # Caution:
- # Variables are declared with @...@ because they don't exist anymore
- # during the installation. But we still require variables (_external_file)
- # so we can only replace @...@ but not ${...}
- #
-
-# Write some comment
-FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ----------------------------------------- -->")
-FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- Content from the external media directory -->")
-FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- ----------------------------------------- -->\n\n")
-
-# Append the external file
-FILE(READ @EXTERNAL_MEDIA_DIRECTORY@/resources.oxr _external_file)
-FILE(APPEND @MEDIA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
Modified: code/branches/resource2/src/SpecialConfig.h.in
===================================================================
--- code/branches/resource2/src/SpecialConfig.h.in 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/SpecialConfig.h.in 2009-08-13 20:50:07 UTC (rev 5645)
@@ -76,19 +76,16 @@
const char defaultLibraryPath[] = "@DEFAULT_LIBRARY_PATH@";
const char defaultArchivePath[] = "@DEFAULT_ARCHIVE_PATH@";
const char defaultDocPath[] = "@DEFAULT_DOC_PATH@";
- const char defaultMediaPath[] = "@DEFAULT_MEDIA_PATH@";
+ const char defaultDataPath[] = "@DEFAULT_DATA_PATH@";
const char defaultConfigPath[] = "@DEFAULT_CONFIG_PATH@";
const char defaultLogPath[] = "@DEFAULT_LOG_PATH@";
// INSTALLATION PATHS
- const char runtimeInstallDirectory[] = "@RUNTIME_INSTALL_DIRECTORY@";
- const char mediaInstallDirectory[] = "@MEDIA_INSTALL_DIRECTORY@";
- const char configInstallDirectory[] = "@CONFIG_INSTALL_DIRECTORY@";
- const char logInstallDirectory[] = "@LOG_INSTALL_DIRECTORY@";
+ const char dataInstallDirectory[] = "@DATA_INSTALL_DIRECTORY@";
// DEVELOPMENT RUN PATHS
- const char mediaDevDirectory[] = "@MEDIA_DIRECTORY@";
- const char externalMediaDevDirectory[] = "@EXTERNAL_MEDIA_DIRECTORY@";
+ const char dataDevDirectory[] = "@DATA_DIRECTORY@";
+ const char externalDataDevDirectory[] = "@EXTERNAL_DATA_DIRECTORY@";
#ifdef CMAKE_CONFIGURATION_TYPES
const char configDevDirectory[] = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
const char logDevDirectory[] = "@CMAKE_LOG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
Modified: code/branches/resource2/src/core/ConfigFileManager.cc
===================================================================
--- code/branches/resource2/src/core/ConfigFileManager.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/core/ConfigFileManager.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -228,8 +228,8 @@
boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);
if (!boost::filesystem::exists(filepath))
{
- // Try to get default one from the media folder
- boost::filesystem::path defaultFilepath(Core::getMediaPath() / "defaultConfig" / this->filename_);
+ // Try to get default one from the data folder
+ boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_);
if (boost::filesystem::exists(defaultFilepath))
{
COUT(3) << "Copied " << this->filename_ << " from the defaultConfig folder." << std::endl;
Modified: code/branches/resource2/src/core/Core.cc
===================================================================
--- code/branches/resource2/src/core/Core.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/core/Core.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -84,7 +84,7 @@
//! Static pointer to the singleton
Core* Core::singletonPtr_s = 0;
- SetCommandLineArgument(externalMediaPath, "").information("Path to the external media files");
+ 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
@@ -109,12 +109,12 @@
RegisterRootObject(CoreConfiguration);
this->setConfigValues();
- // External media directory only exists for dev runs
+ // External data directory only exists for dev runs
if (Core::isDevelopmentRun())
{
- // Possible media path override by the command line
- if (!CommandLine::getArgument("externalMediaPath")->hasDefaultValue())
- tsetExternalMediaPath(CommandLine::getValue("externalMediaPath"));
+ // Possible data path override by the command line
+ if (!CommandLine::getArgument("externalDataPath")->hasDefaultValue())
+ tsetExternalDataPath(CommandLine::getValue("externalDataPath"));
}
}
@@ -187,13 +187,13 @@
/**
@brief
- Temporary sets the media path
+ Temporary sets the data path
@param path
- The new media path
+ The new data path
*/
- void tsetExternalMediaPath(const std::string& path)
+ void tsetExternalDataPath(const std::string& path)
{
- mediaPath_ = boost::filesystem::path(path);
+ dataPath_ = boost::filesystem::path(path);
}
void initializeRandomNumberGenerator()
@@ -217,8 +217,8 @@
//! 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 mediaPath_; //!< Path to the media file folder
- boost::filesystem::path externalMediaPath_; //!< Path to the media file folder
+ 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
};
@@ -282,7 +282,7 @@
this->luaBind_.reset(new LuaBind());
// initialise Tcl
- this->tclBind_.reset(new TclBind(Core::getMediaPathString()));
+ this->tclBind_.reset(new TclBind(Core::getDataPathString()));
this->tclThreadManager_.reset(new TclThreadManager(tclBind_->getTclInterpreter()));
// create a shell
@@ -400,27 +400,27 @@
Core::getInstance().configuration_->resetLanguage();
}
- /*static*/ void Core::tsetExternalMediaPath(const std::string& path)
+ /*static*/ void Core::tsetExternalDataPath(const std::string& path)
{
- getInstance().configuration_->tsetExternalMediaPath(path);
+ getInstance().configuration_->tsetExternalDataPath(path);
}
- /*static*/ const boost::filesystem::path& Core::getMediaPath()
+ /*static*/ const boost::filesystem::path& Core::getDataPath()
{
- return getInstance().configuration_->mediaPath_;
+ return getInstance().configuration_->dataPath_;
}
- /*static*/ std::string Core::getMediaPathString()
+ /*static*/ std::string Core::getDataPathString()
{
- return getInstance().configuration_->mediaPath_.string() + '/';
+ return getInstance().configuration_->dataPath_.string() + '/';
}
- /*static*/ const boost::filesystem::path& Core::getExternalMediaPath()
+ /*static*/ const boost::filesystem::path& Core::getExternalDataPath()
{
- return getInstance().configuration_->externalMediaPath_;
+ return getInstance().configuration_->externalDataPath_;
}
- /*static*/ std::string Core::getExternalMediaPathString()
+ /*static*/ std::string Core::getExternalDataPathString()
{
- return getInstance().configuration_->externalMediaPath_.string() + '/';
+ return getInstance().configuration_->externalDataPath_.string() + '/';
}
/*static*/ const boost::filesystem::path& Core::getConfigPath()
@@ -560,8 +560,8 @@
{
COUT(1) << "Running from the build tree." << std::endl;
Core::bDevRun_ = true;
- configuration_->mediaPath_ = specialConfig::mediaDevDirectory;
- configuration_->externalMediaPath_ = specialConfig::externalMediaDevDirectory;
+ configuration_->dataPath_ = specialConfig::dataDevDirectory;
+ configuration_->externalDataPath_ = specialConfig::externalDataDevDirectory;
configuration_->configPath_ = specialConfig::configDevDirectory;
configuration_->logPath_ = specialConfig::logDevDirectory;
}
@@ -578,13 +578,13 @@
ThrowException(General, "Could not derive a root directory. Might the binary installation directory contain '..' when taken relative to the installation prefix path?");
// Using paths relative to the install prefix, complete them
- configuration_->mediaPath_ = configuration_->rootPath_ / specialConfig::defaultMediaPath;
+ configuration_->dataPath_ = configuration_->rootPath_ / specialConfig::defaultDataPath;
configuration_->configPath_ = configuration_->rootPath_ / specialConfig::defaultConfigPath;
configuration_->logPath_ = configuration_->rootPath_ / specialConfig::defaultLogPath;
#else
// There is no root path, so don't set it at all
- configuration_->mediaPath_ = specialConfig::mediaInstallDirectory;
+ configuration_->dataPath_ = specialConfig::dataInstallDirectory;
// Get user directory
# ifdef ORXONOX_PLATFORM_UNIX /* Apple? */
Modified: code/branches/resource2/src/core/Core.h
===================================================================
--- code/branches/resource2/src/core/Core.h 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/core/Core.h 2009-08-13 20:50:07 UTC (rev 5645)
@@ -56,7 +56,7 @@
@brief
The Core class is a singleton used to configure the program basics.
@details
- The class provides information about the media, config and log path.
+ 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!
@@ -90,21 +90,21 @@
static const std::string& getLanguage();
static void resetLanguage();
- static void tsetExternalMediaPath(const std::string& path);
+ static void tsetExternalDataPath(const std::string& path);
//! Returns the path to the data files as boost::filesystem::path
- static const boost::filesystem::path& getMediaPath();
+ static const boost::filesystem::path& getDataPath();
//! Returns the path to the external data files as boost::filesystem::path
- static const boost::filesystem::path& getExternalMediaPath();
+ 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 data files as std::string
//! Returns the path to the root folder as boost::filesystem::path
static const boost::filesystem::path& getRootPath();
- static std::string getMediaPathString();
+ //! 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 getExternalMediaPathString();
+ 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
Modified: code/branches/resource2/src/core/GUIManager.cc
===================================================================
--- code/branches/resource2/src/core/GUIManager.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/core/GUIManager.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -170,7 +170,7 @@
void GUIManager::loadLuaCode()
{
// set datapath for GUI data
- lua_pushfstring(this->scriptModule_->getLuaState(), Core::getMediaPathString().c_str());
+ lua_pushfstring(this->scriptModule_->getLuaState(), Core::getDataPathString().c_str());
lua_setglobal(this->scriptModule_->getLuaState(), "datapath");
// call main Lua script
this->scriptModule_->executeScriptFile("loadGUI_3.lua", "GUI");
Modified: code/branches/resource2/src/core/LuaBind.cc
===================================================================
--- code/branches/resource2/src/core/LuaBind.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/core/LuaBind.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -46,7 +46,7 @@
LuaBind::LuaBind()
{
- this->includePath_ = Core::getMediaPathString();
+ this->includePath_ = Core::getDataPathString();
luaState_ = lua_open();
luaSource_ = "";
Modified: code/branches/resource2/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/resource2/src/orxonox/LevelManager.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/orxonox/LevelManager.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -134,7 +134,7 @@
{
availableLevels_.clear();
- boost::filesystem::directory_iterator file(Core::getMediaPathString() + "levels");
+ boost::filesystem::directory_iterator file(Core::getDataPathString() + "levels");
boost::filesystem::directory_iterator end;
while (file != end)
Modified: code/branches/resource2/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/resource2/src/orxonox/gamestates/GSGraphics.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/orxonox/gamestates/GSGraphics.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -95,7 +95,7 @@
{
// load debug overlay
COUT(3) << "Loading Debug Overlay..." << std::endl;
- this->debugOverlay_ = new XMLFile(Core::getMediaPathString() + "overlay/debug.oxo");
+ this->debugOverlay_ = new XMLFile(Core::getDataPathString() + "overlay/debug.oxo");
Loader::open(debugOverlay_);
masterKeyBinder_->loadBindings("masterKeybindings.ini");
Modified: code/branches/resource2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/resource2/src/orxonox/gamestates/GSLevel.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/orxonox/gamestates/GSLevel.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -245,7 +245,7 @@
{
// call the loader
COUT(0) << "Loading level..." << std::endl;
- startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + LevelManager::getInstance().getDefaultLevel());
+ startFile_s = new XMLFile(Core::getDataPathString() + "levels" + '/' + LevelManager::getInstance().getDefaultLevel());
Loader::open(startFile_s);
}
Modified: code/branches/resource2/src/orxonox/objects/Level.cc
===================================================================
--- code/branches/resource2/src/orxonox/objects/Level.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/orxonox/objects/Level.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -53,8 +53,8 @@
this->registerVariables();
this->xmlfilename_ = this->getFilename();
- if (this->xmlfilename_.length() >= Core::getMediaPathString().length())
- this->xmlfilename_ = this->xmlfilename_.substr(Core::getMediaPathString().length());
+ if (this->xmlfilename_.length() >= Core::getDataPathString().length())
+ this->xmlfilename_ = this->xmlfilename_.substr(Core::getDataPathString().length());
}
Level::~Level()
@@ -100,7 +100,7 @@
mask.include(Class(Template));
mask.include(Class(OverlayGroup)); // HACK to include the ChatOverlay
- this->xmlfile_ = new XMLFile(Core::getMediaPathString() + this->xmlfilename_, mask);
+ this->xmlfile_ = new XMLFile(Core::getDataPathString() + this->xmlfilename_, mask);
Loader::open(this->xmlfile_);
}
Modified: code/branches/resource2/src/orxonox/sound/SoundBase.cc
===================================================================
--- code/branches/resource2/src/orxonox/sound/SoundBase.cc 2009-08-13 20:08:52 UTC (rev 5644)
+++ code/branches/resource2/src/orxonox/sound/SoundBase.cc 2009-08-13 20:50:07 UTC (rev 5645)
@@ -134,7 +134,7 @@
}
bool SoundBase::loadFile(std::string filename) {
- filename = Core::getMediaPathString() + "/audio/" + filename;
+ filename = Core::getDataPathString() + "/audio/" + filename;
if(!SoundManager::getInstance().isSoundAvailable())
{
More information about the Orxonox-commit
mailing list