Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 30, 2009, 2:22:00 AM (15 years ago)
Author:
rgrieder
Message:

Merged resource2 branch back to trunk.

IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/ConfigFileManager.cc

    r3370 r5695  
    4040namespace orxonox
    4141{
    42     const char* const DEFAULT_CONFIG_FILE = "default.ini";
    43 
    44     ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
    45 
    4642    SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
    4743    SetConsoleCommandShortcutExtern(tconfig).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
     
    229225        if (!boost::filesystem::exists(filepath))
    230226        {
    231             // Try to get default one from the media folder
    232             boost::filesystem::path defaultFilepath(Core::getMediaPath() / "defaultConfig" / this->filename_);
     227            // Try to get default one from the data folder
     228            boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_);
    233229            if (boost::filesystem::exists(defaultFilepath))
    234230            {
     
    339335    void ConfigFile::save() const
    340336    {
    341         boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);
    342 
    343337        std::ofstream file;
    344         file.open(filepath.string().c_str(), std::fstream::out);
     338        file.open((Core::getConfigPathString() + filename_).c_str(), std::fstream::out);
    345339        file.setf(std::ios::fixed, std::ios::floatfield);
    346340        file.precision(6);
     
    479473    ///////////////////////
    480474
     475    ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
     476
     477    std::string ConfigFileManager::DEFAULT_CONFIG_FILE = "default.ini";
     478
    481479    ConfigFileManager::ConfigFileManager()
    482480         : mininmalFreeType_(ConfigFileType::numberOfReservedTypes)
Note: See TracChangeset for help on using the changeset viewer.