Changeset 8366
- Timestamp:
- Apr 30, 2011, 9:31:02 PM (14 years ago)
- Location:
- code/trunk/src/libraries
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Core.cc
r8351 r8366 98 98 , lastLevelTimestamp_(0) 99 99 , ogreConfigTimestamp_(0) 100 , bDevMode_(false) 100 101 { 101 102 // Set the hard coded fixed paths … … 212 213 #ifdef ORXONOX_RELEASE 213 214 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.");216 215 #else 217 216 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.");220 217 #endif 221 218 SetConfigValueExternal(softDebugLevelLogFile_, "OutputHandler", "softDebugLevelLogFile", defaultLevelLogFile) … … 223 220 OutputHandler::getInstance().setSoftDebugLevel(OutputHandler::logFileOutputListenerName_s, this->softDebugLevelLogFile_); 224 221 222 SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun()) 223 .description("Developer mode. If not set, hides some things from the user to not confuse him."); 225 224 SetConfigValue(language_, Language::getInstance().defaultLanguage_) 226 225 .description("The language of the in game text") -
code/trunk/src/libraries/core/Core.h
r8079 r8366 91 91 { return this->ogreConfigTimestamp_; } 92 92 93 //! Developers bit. If returns false, some options are not available as to not confuse the normal user. 93 94 inline bool inDevMode(void) const 94 95 { return this->bDevMode_; } -
code/trunk/src/libraries/core/GraphicsManager.cc
r8351 r8366 119 119 Loader::open(resources_.get()); 120 120 121 // Only for development runs122 if (PathConfig:: isDevelopmentRun())121 // Only for runs in the build directory (not installed) 122 if (PathConfig::buildDirectoryRun()) 123 123 Ogre::ResourceGroupManager::getSingleton().addResourceLocation(PathConfig::getExternalDataPathString(), "FileSystem"); 124 124 … … 251 251 std::string pluginPath = specialConfig::ogrePluginsDirectory; 252 252 #ifdef DEPENDENCY_PACKAGE_ENABLE 253 if (!PathConfig:: isDevelopmentRun())253 if (!PathConfig::buildDirectoryRun()) 254 254 { 255 255 # if defined(ORXONOX_PLATFORM_WINDOWS) -
code/trunk/src/libraries/core/PathConfig.cc
r8351 r8366 84 84 , configPath_(*(new bf::path())) 85 85 , logPath_(*(new bf::path())) 86 , b DevRun_(false)86 , bBuildDirectoryRun_(false) 87 87 { 88 88 ////////////////////////// … … 138 138 { 139 139 COUT(1) << "Running from the build tree." << std::endl; 140 PathConfig::b DevRun_ = true;140 PathConfig::bBuildDirectoryRun_ = true; 141 141 modulePath_ = specialConfig::moduleDevDirectory; 142 142 } … … 180 180 void PathConfig::setConfigurablePaths() 181 181 { 182 if (b DevRun_)182 if (bBuildDirectoryRun_) 183 183 { 184 184 dataPath_ = specialConfig::dataDevDirectory; -
code/trunk/src/libraries/core/PathConfig.h
r8351 r8366 114 114 115 115 //! Return true for runs in the build directory (not installed) 116 static bool isDevelopmentRun() { return getInstance().bDevRun_; }116 static bool buildDirectoryRun() { return getInstance().bBuildDirectoryRun_; } 117 117 118 118 private: … … 129 129 std::vector<std::string> getModulePaths(); 130 130 131 //! Path to the parent directory of the ones above if program was installed with relativ paths131 //! Path to the parent directory of the ones above if program was installed with relative paths 132 132 boost::filesystem::path& rootPath_; 133 133 boost::filesystem::path& executablePath_; //!< Path to the executable … … 138 138 boost::filesystem::path& logPath_; //!< Path to the log files folder 139 139 140 bool b DevRun_;//!< True for runs in the build directory (not installed)140 bool bBuildDirectoryRun_; //!< True for runs in the build directory (not installed) 141 141 static PathConfig* singletonPtr_s; 142 142 }; //tolua_export -
code/trunk/src/libraries/core/command/TclBind.cc
r8079 r8366 140 140 { 141 141 #ifdef DEPENDENCY_PACKAGE_ENABLE 142 if (PathConfig:: isDevelopmentRun())142 if (PathConfig::buildDirectoryRun()) 143 143 return (std::string(specialConfig::dependencyLibraryDirectory) + "/tcl"); 144 144 else 145 return (PathConfig::getRootPathString() + "lib/tcl");145 return (PathConfig::getRootPathString() + specialConfig::defaultLibraryPath + "/tcl"); 146 146 #else 147 147 return ""; -
code/trunk/src/libraries/core/input/KeyBinder.cc
r8351 r8366 253 253 COUT(3) << "KeyBinder: Loading key bindings..." << std::endl; 254 254 255 this->configFile_ = new ConfigFile(this->filename_, !PathConfig:: isDevelopmentRun());255 this->configFile_ = new ConfigFile(this->filename_, !PathConfig::buildDirectoryRun()); 256 256 this->configFile_->load(); 257 257 258 if (PathConfig:: isDevelopmentRun())258 if (PathConfig::buildDirectoryRun()) 259 259 { 260 260 // Dev users should have combined key bindings files … … 287 287 addButtonToCommand(binding, it->second); 288 288 std::string str = binding; 289 if (PathConfig:: isDevelopmentRun() && binding.empty())289 if (PathConfig::buildDirectoryRun() && binding.empty()) 290 290 str = "NoBinding"; 291 291 it->second->setBinding(this->configFile_, this->fallbackConfigFile_, binding, bTemporary); -
code/trunk/src/libraries/tools/ResourceLocation.cc
r8079 r8366 76 76 if (bf::exists(PathConfig::getDataPath() / this->getPath())) 77 77 path = PathConfig::getDataPath() / this->getPath(); 78 else if (PathConfig:: isDevelopmentRun() && bf::exists(PathConfig::getExternalDataPath() / this->getPath()))78 else if (PathConfig::buildDirectoryRun() && bf::exists(PathConfig::getExternalDataPath() / this->getPath())) 79 79 path = PathConfig::getExternalDataPath() / this->getPath(); 80 80 else
Note: See TracChangeset
for help on using the changeset viewer.