Changeset 10509 for code/branches/core7/src/libraries/core/Core.cc
- Timestamp:
- May 30, 2015, 12:22:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/Core.cc
r10484 r10509 59 59 #include "core/singleton/ScopedSingletonIncludes.h" 60 60 #include "util/SignalHandler.h" 61 #include "PathConfig.h" 61 #include "ApplicationPaths.h" 62 #include "ConfigurablePaths.h" 62 63 #include "commandline/CommandLineIncludes.h" 63 64 #include "config/ConfigFileManager.h" … … 94 95 95 96 Core::Core(const std::string& cmdLine) 96 : pathConfig_(NULL) 97 : applicationPaths_(NULL) 98 , configurablePaths_(NULL) 97 99 , dynLibManager_(NULL) 98 100 , signalHandler_(NULL) … … 115 117 116 118 // Set the hard coded fixed paths 117 this-> pathConfig_ = new PathConfig();119 this->applicationPaths_ = new ApplicationPaths(); 118 120 119 121 // Create a new dynamic library manager … … 122 124 // Load modules 123 125 orxout(internal_info) << "Loading modules:" << endl; 124 const std::vector<std::string>& modulePaths = this->pathConfig_->getModulePaths();126 const std::vector<std::string>& modulePaths = ApplicationPaths::getInstance().getModulePaths(); 125 127 for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it) 126 128 { … … 146 148 147 149 // Set configurable paths like log, config and media 148 this->pathConfig_->setConfigurablePaths(); 149 150 orxout(internal_info) << "Root path: " << PathConfig::getRootPathString() << endl; 151 orxout(internal_info) << "Executable path: " << PathConfig::getExecutablePathString() << endl; 152 orxout(internal_info) << "Data path: " << PathConfig::getDataPathString() << endl; 153 orxout(internal_info) << "Ext. data path: " << PathConfig::getExternalDataPathString() << endl; 154 orxout(internal_info) << "Config path: " << PathConfig::getConfigPathString() << endl; 155 orxout(internal_info) << "Log path: " << PathConfig::getLogPathString() << endl; 156 orxout(internal_info) << "Modules path: " << PathConfig::getModulePathString() << endl; 157 158 // create a signal handler (only active for Linux) 150 this->configurablePaths_ = new ConfigurablePaths(); 151 this->configurablePaths_->setConfigurablePaths(ApplicationPaths::getInstance()); 152 153 orxout(internal_info) << "Root path: " << ApplicationPaths::getRootPathString() << endl; 154 orxout(internal_info) << "Executable path: " << ApplicationPaths::getExecutablePathString() << endl; 155 orxout(internal_info) << "Modules path: " << ApplicationPaths::getModulePathString() << endl; 156 157 orxout(internal_info) << "Data path: " << ConfigurablePaths::getDataPathString() << endl; 158 orxout(internal_info) << "Ext. data path: " << ConfigurablePaths::getExternalDataPathString() << endl; 159 orxout(internal_info) << "Config path: " << ConfigurablePaths::getConfigPathString() << endl; 160 orxout(internal_info) << "Log path: " << ConfigurablePaths::getLogPathString() << endl; 161 162 // create a signal handler 159 163 // This call is placed as soon as possible, but after the directories are set 160 164 this->signalHandler_ = new SignalHandler(); 161 this->signalHandler_->doCatch( PathConfig::getExecutablePathString(), PathConfig::getLogPathString() + "orxonox_crash.log");165 this->signalHandler_->doCatch(ApplicationPaths::getExecutablePathString(), ConfigurablePaths::getLogPathString() + "orxonox_crash.log"); 162 166 163 167 #ifdef ORXONOX_PLATFORM_WINDOWS … … 186 190 187 191 // Set the correct log path and rewrite the log file with the correct log levels 188 OutputManager::getInstance().getLogWriter()->setLogDirectory( PathConfig::getLogPathString());192 OutputManager::getInstance().getLogWriter()->setLogDirectory(ConfigurablePaths::getLogPathString()); 189 193 190 194 #if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN) … … 209 213 210 214 // initialise Tcl 211 this->tclBind_ = new TclBind( PathConfig::getDataPathString());215 this->tclBind_ = new TclBind(ConfigurablePaths::getDataPathString()); 212 216 this->tclThreadManager_ = new TclThreadManager(tclBind_->getTclInterpreter()); 213 217 … … 255 259 safeObjectDelete(&signalHandler_); 256 260 safeObjectDelete(&dynLibManager_); 257 safeObjectDelete(&pathConfig_); 261 safeObjectDelete(&configurablePaths_); 262 safeObjectDelete(&applicationPaths_); 258 263 259 264 orxout(internal_status) << "finished destroying Core object" << endl;
Note: See TracChangeset
for help on using the changeset viewer.