Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 30, 2011, 9:31:02 PM (14 years ago)
Author:
rgrieder
Message:

Renamed PathConfig::isDevelopmentRun() to PathConfig::buildDirectoryRun() because that fits better and there is no confusion with Core::inDevMode().
Also used isDevelopmentRun() as default value for Core::inDevMode() instead of ORXONOX_RELEASE.

Location:
code/trunk/src/libraries/core
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/Core.cc

    r8351 r8366  
    9898        , lastLevelTimestamp_(0)
    9999        , ogreConfigTimestamp_(0)
     100        , bDevMode_(false)
    100101    {
    101102        // Set the hard coded fixed paths
     
    212213#ifdef ORXONOX_RELEASE
    213214        const unsigned int defaultLevelLogFile = 3;
    214         SetConfigValue(bDevMode_, false)
    215             .description("Developer mode. If not set, hides some things from the user to not confuse him.");
    216215#else
    217216        const unsigned int defaultLevelLogFile = 4;
    218         SetConfigValue(bDevMode_, true)
    219             .description("Developer mode. If not set, hides some things from the user to not confuse him.");
    220217#endif
    221218        SetConfigValueExternal(softDebugLevelLogFile_, "OutputHandler", "softDebugLevelLogFile", defaultLevelLogFile)
     
    223220        OutputHandler::getInstance().setSoftDebugLevel(OutputHandler::logFileOutputListenerName_s, this->softDebugLevelLogFile_);
    224221
     222        SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun())
     223            .description("Developer mode. If not set, hides some things from the user to not confuse him.");
    225224        SetConfigValue(language_, Language::getInstance().defaultLanguage_)
    226225            .description("The language of the in game text")
  • code/trunk/src/libraries/core/Core.h

    r8079 r8366  
    9191                { return this->ogreConfigTimestamp_; }
    9292
     93            //! Developers bit. If returns false, some options are not available as to not confuse the normal user.
    9394            inline bool inDevMode(void) const
    9495                { return this->bDevMode_; }
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r8351 r8366  
    119119        Loader::open(resources_.get());
    120120
    121         // Only for development runs
    122         if (PathConfig::isDevelopmentRun())
     121        // Only for runs in the build directory (not installed)
     122        if (PathConfig::buildDirectoryRun())
    123123            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem");
    124124
     
    251251        std::string pluginPath = specialConfig::ogrePluginsDirectory;
    252252#ifdef DEPENDENCY_PACKAGE_ENABLE
    253         if (!PathConfig::isDevelopmentRun())
     253        if (!PathConfig::buildDirectoryRun())
    254254        {
    255255#  if defined(ORXONOX_PLATFORM_WINDOWS)
  • code/trunk/src/libraries/core/PathConfig.cc

    r8351 r8366  
    8484        , configPath_(*(new bf::path()))
    8585        , logPath_(*(new bf::path()))
    86         , bDevRun_(false)
     86        , bBuildDirectoryRun_(false)
    8787    {
    8888        //////////////////////////
     
    138138        {
    139139            COUT(1) << "Running from the build tree." << std::endl;
    140             PathConfig::bDevRun_ = true;
     140            PathConfig::bBuildDirectoryRun_ = true;
    141141            modulePath_ = specialConfig::moduleDevDirectory;
    142142        }
     
    180180    void PathConfig::setConfigurablePaths()
    181181    {
    182         if (bDevRun_)
     182        if (bBuildDirectoryRun_)
    183183        {
    184184            dataPath_         = specialConfig::dataDevDirectory;
  • code/trunk/src/libraries/core/PathConfig.h

    r8351 r8366  
    114114
    115115            //! Return true for runs in the build directory (not installed)
    116             static bool isDevelopmentRun() { return getInstance().bDevRun_; }
     116            static bool buildDirectoryRun() { return getInstance().bBuildDirectoryRun_; }
    117117
    118118        private:
     
    129129            std::vector<std::string> getModulePaths();
    130130
    131             //! Path to the parent directory of the ones above if program was installed with relativ paths
     131            //! Path to the parent directory of the ones above if program was installed with relative paths
    132132            boost::filesystem::path& rootPath_;
    133133            boost::filesystem::path& executablePath_;        //!< Path to the executable
     
    138138            boost::filesystem::path& logPath_;               //!< Path to the log files folder
    139139
    140             bool                     bDevRun_;               //!< True for runs in the build directory (not installed)
     140            bool                     bBuildDirectoryRun_;    //!< True for runs in the build directory (not installed)
    141141            static PathConfig* singletonPtr_s;
    142142    }; //tolua_export
  • code/trunk/src/libraries/core/command/TclBind.cc

    r8079 r8366  
    140140    {
    141141#ifdef DEPENDENCY_PACKAGE_ENABLE
    142         if (PathConfig::isDevelopmentRun())
     142        if (PathConfig::buildDirectoryRun())
    143143            return (std::string(specialConfig::dependencyLibraryDirectory) + "/tcl");
    144144        else
    145             return (PathConfig::getRootPathString() + "lib/tcl");
     145            return (PathConfig::getRootPathString() + specialConfig::defaultLibraryPath + "/tcl");
    146146#else
    147147        return "";
  • code/trunk/src/libraries/core/input/KeyBinder.cc

    r8351 r8366  
    253253        COUT(3) << "KeyBinder: Loading key bindings..." << std::endl;
    254254
    255         this->configFile_ = new ConfigFile(this->filename_, !PathConfig::isDevelopmentRun());
     255        this->configFile_ = new ConfigFile(this->filename_, !PathConfig::buildDirectoryRun());
    256256        this->configFile_->load();
    257257
    258         if (PathConfig::isDevelopmentRun())
     258        if (PathConfig::buildDirectoryRun())
    259259        {
    260260            // Dev users should have combined key bindings files
     
    287287            addButtonToCommand(binding, it->second);
    288288            std::string str = binding;
    289             if (PathConfig::isDevelopmentRun() && binding.empty())
     289            if (PathConfig::buildDirectoryRun() && binding.empty())
    290290                str = "NoBinding";
    291291            it->second->setBinding(this->configFile_, this->fallbackConfigFile_, binding, bTemporary);
Note: See TracChangeset for help on using the changeset viewer.