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:
6 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/ConfigFileManager.cc

    r3370 r5645  
    229229        if (!boost::filesystem::exists(filepath))
    230230        {
    231             // Try to get default one from the media folder
    232             boost::filesystem::path defaultFilepath(Core::getMediaPath() / "defaultConfig" / this->filename_);
     231            // Try to get default one from the data folder
     232            boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_);
    233233            if (boost::filesystem::exists(defaultFilepath))
    234234            {
  • 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
  • code/branches/resource2/src/core/Core.h

    r5641 r5645  
    5757        The Core class is a singleton used to configure the program basics.
    5858    @details
    59         The class provides information about the media, config and log path.
     59        The class provides information about the data, config and log path.
    6060        It determines those by the use of platform specific functions.
    6161    @remark
     
    9191            static void  resetLanguage();
    9292
    93             static void tsetExternalMediaPath(const std::string& path);
     93            static void tsetExternalDataPath(const std::string& path);
    9494            //! Returns the path to the data files as boost::filesystem::path
    95             static const boost::filesystem::path& getMediaPath();
     95            static const boost::filesystem::path& getDataPath();
    9696            //! Returns the path to the external data files as boost::filesystem::path
    97             static const boost::filesystem::path& getExternalMediaPath();
     97            static const boost::filesystem::path& getExternalDataPath();
    9898            //! Returns the path to the config files as boost::filesystem::path
    9999            static const boost::filesystem::path& getConfigPath();
    100100            //! Returns the path to the log files as boost::filesystem::path
    101101            static const boost::filesystem::path& getLogPath();
    102             //! Returns the path to the data files as std::string
    103102            //! Returns the path to the root folder as boost::filesystem::path
    104103            static const boost::filesystem::path& getRootPath();
    105             static std::string getMediaPathString();
     104            //! Returns the path to the data files as std::string
     105            static std::string getDataPathString();
    106106            //! Returns the path to the external data files as std::string
    107             static std::string getExternalMediaPathString();
     107            static std::string getExternalDataPathString();
    108108            //! Returns the path to the config files as std::string
    109109            static std::string getConfigPathString();
  • code/branches/resource2/src/core/GUIManager.cc

    r3370 r5645  
    171171    {
    172172        // set datapath for GUI data
    173         lua_pushfstring(this->scriptModule_->getLuaState(), Core::getMediaPathString().c_str());
     173        lua_pushfstring(this->scriptModule_->getLuaState(), Core::getDataPathString().c_str());
    174174        lua_setglobal(this->scriptModule_->getLuaState(), "datapath");
    175175        // call main Lua script
  • code/branches/resource2/src/core/LuaBind.cc

    r3370 r5645  
    4747  LuaBind::LuaBind()
    4848  {
    49     this->includePath_ = Core::getMediaPathString();
     49    this->includePath_ = Core::getDataPathString();
    5050
    5151    luaState_ = lua_open();
Note: See TracChangeset for help on using the changeset viewer.