Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2009, 10:50:07 PM (15 years ago)
Author:
rgrieder
Message:

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).

Location:
code/branches/resource2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2

    • Property svn:externals
      •  

        old new  
        1 media_stripped http://svn.orxonox.net/game/data/branches/media_stripped
         1data_stripped https://svn.orxonox.net/game/data/branches/media_stripped
  • code/branches/resource2/src/core/Core.cc

    r5641 r5645  
    8585    Core* Core::singletonPtr_s  = 0;
    8686
    87     SetCommandLineArgument(externalMediaPath, "").information("Path to the external media files");
     87    SetCommandLineArgument(externalDataPath, "").information("Path to the external data files");
    8888    SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
    8989    SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
     
    110110            this->setConfigValues();
    111111
    112             // External media directory only exists for dev runs
     112            // External data directory only exists for dev runs
    113113            if (Core::isDevelopmentRun())
    114114            {
    115                 // Possible media path override by the command line
    116                 if (!CommandLine::getArgument("externalMediaPath")->hasDefaultValue())
    117                     tsetExternalMediaPath(CommandLine::getValue("externalMediaPath"));
     115                // Possible data path override by the command line
     116                if (!CommandLine::getArgument("externalDataPath")->hasDefaultValue())
     117                    tsetExternalDataPath(CommandLine::getValue("externalDataPath"));
    118118            }
    119119        }
     
    188188        /**
    189189        @brief
    190             Temporary sets the media path
     190            Temporary sets the data path
    191191        @param path
    192             The new media path
     192            The new data path
    193193        */
    194         void tsetExternalMediaPath(const std::string& path)
    195         {
    196             mediaPath_ = boost::filesystem::path(path);
     194        void tsetExternalDataPath(const std::string& path)
     195        {
     196            dataPath_ = boost::filesystem::path(path);
    197197        }
    198198
     
    218218        boost::filesystem::path rootPath_;
    219219        boost::filesystem::path executablePath_;        //!< Path to the executable
    220         boost::filesystem::path mediaPath_;             //!< Path to the media file folder
    221         boost::filesystem::path externalMediaPath_;     //!< Path to the media file folder
     220        boost::filesystem::path dataPath_;              //!< Path to the data file folder
     221        boost::filesystem::path externalDataPath_;      //!< Path to the external data file folder
    222222        boost::filesystem::path configPath_;            //!< Path to the config file folder
    223223        boost::filesystem::path logPath_;               //!< Path to the log file folder
     
    283283
    284284        // initialise Tcl
    285         this->tclBind_.reset(new TclBind(Core::getMediaPathString()));
     285        this->tclBind_.reset(new TclBind(Core::getDataPathString()));
    286286        this->tclThreadManager_.reset(new TclThreadManager(tclBind_->getTclInterpreter()));
    287287
     
    401401    }
    402402
    403     /*static*/ void Core::tsetExternalMediaPath(const std::string& path)
    404     {
    405         getInstance().configuration_->tsetExternalMediaPath(path);
    406     }
    407 
    408     /*static*/ const boost::filesystem::path& Core::getMediaPath()
    409     {
    410         return getInstance().configuration_->mediaPath_;
    411     }
    412     /*static*/ std::string Core::getMediaPathString()
    413     {
    414         return getInstance().configuration_->mediaPath_.string() + '/';
    415     }
    416 
    417     /*static*/ const boost::filesystem::path& Core::getExternalMediaPath()
    418     {
    419         return getInstance().configuration_->externalMediaPath_;
    420     }
    421     /*static*/ std::string Core::getExternalMediaPathString()
    422     {
    423         return getInstance().configuration_->externalMediaPath_.string() + '/';
     403    /*static*/ void Core::tsetExternalDataPath(const std::string& path)
     404    {
     405        getInstance().configuration_->tsetExternalDataPath(path);
     406    }
     407
     408    /*static*/ const boost::filesystem::path& Core::getDataPath()
     409    {
     410        return getInstance().configuration_->dataPath_;
     411    }
     412    /*static*/ std::string Core::getDataPathString()
     413    {
     414        return getInstance().configuration_->dataPath_.string() + '/';
     415    }
     416
     417    /*static*/ const boost::filesystem::path& Core::getExternalDataPath()
     418    {
     419        return getInstance().configuration_->externalDataPath_;
     420    }
     421    /*static*/ std::string Core::getExternalDataPathString()
     422    {
     423        return getInstance().configuration_->externalDataPath_.string() + '/';
    424424    }
    425425
     
    561561            COUT(1) << "Running from the build tree." << std::endl;
    562562            Core::bDevRun_ = true;
    563             configuration_->mediaPath_  = specialConfig::mediaDevDirectory;
    564             configuration_->externalMediaPath_ = specialConfig::externalMediaDevDirectory;
     563            configuration_->dataPath_  = specialConfig::dataDevDirectory;
     564            configuration_->externalDataPath_ = specialConfig::externalDataDevDirectory;
    565565            configuration_->configPath_ = specialConfig::configDevDirectory;
    566566            configuration_->logPath_    = specialConfig::logDevDirectory;
     
    579579
    580580            // Using paths relative to the install prefix, complete them
    581             configuration_->mediaPath_  = configuration_->rootPath_ / specialConfig::defaultMediaPath;
     581            configuration_->dataPath_  = configuration_->rootPath_ / specialConfig::defaultDataPath;
    582582            configuration_->configPath_ = configuration_->rootPath_ / specialConfig::defaultConfigPath;
    583583            configuration_->logPath_    = configuration_->rootPath_ / specialConfig::defaultLogPath;
     
    585585            // There is no root path, so don't set it at all
    586586
    587             configuration_->mediaPath_  = specialConfig::mediaInstallDirectory;
     587            configuration_->dataPath_  = specialConfig::dataInstallDirectory;
    588588
    589589            // Get user directory
Note: See TracChangeset for help on using the changeset viewer.