Changeset 3345 for code/branches/resource/src/core
- Timestamp:
- Jul 24, 2009, 9:31:31 PM (15 years ago)
- Location:
- code/branches/resource/src/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/core/Core.cc
r3343 r3345 231 231 232 232 Core::Core(const std::string& cmdLine) 233 : bGraphicsLoaded_(false) 233 : bDevRun_(false) 234 , bGraphicsLoaded_(false) 234 235 { 235 236 if (singletonRef_s != 0) … … 435 436 } 436 437 438 /*static*/ const boost::filesystem::path& Core::getRootPath() 439 { 440 return getInstance().configuration_->rootPath_; 441 } 442 /*static*/ std::string Core::getRootPathString() 443 { 444 return getInstance().configuration_->rootPath_.string() + '/'; 445 } 446 437 447 /** 438 448 @note … … 544 554 { 545 555 COUT(1) << "Running from the build tree." << std::endl; 546 Core:: isDevBuild_ = true;556 Core::bDevRun_ = true; 547 557 configuration_->mediaPath_ = ORXONOX_MEDIA_DEV_PATH; 548 558 configuration_->configPath_ = ORXONOX_CONFIG_DEV_PATH; -
code/branches/resource/src/core/Core.h
r3343 r3345 90 90 //! Returns the path to the log files as boost::filesystem::path 91 91 static const boost::filesystem::path& getLogPath(); 92 //! Returns the path to the root folder as boost::filesystem::path 93 static const boost::filesystem::path& getRootPath(); 92 94 //! Returns the path to the data files as std::string 93 95 static std::string getMediaPathString(); … … 96 98 //! Returns the path to the log files as std::string 97 99 static std::string getLogPathString(); 100 //! Returns the path to the root folder as std::string 101 static std::string getRootPathString(); 102 103 static bool isDevelopmentRun() { return getInstance().bDevRun_; } 98 104 99 105 private: … … 114 120 TclThreadManager* tclThreadManager_; 115 121 116 bool isDevBuild_; //!< True for builds in the build directory (not installed)122 bool bDevRun_; //!< True for runs in the build directory (not installed) 117 123 bool bGraphicsLoaded_; 118 124 CoreConfiguration* configuration_; -
code/branches/resource/src/core/TclBind.cc
r3344 r3345 33 33 #include <cpptcl/cpptcl.h> 34 34 35 #include "SpecialConfig.h" 35 36 #include "util/Debug.h" 36 37 #include "util/StringUtils.h" 37 38 #include "CommandExecutor.h" 38 39 #include "ConsoleCommand.h" 40 #include "Core.h" 39 41 #include "TclThreadManager.h" 40 #include "SpecialConfig.h"41 42 42 43 namespace orxonox … … 102 103 Tcl::interpreter* TclBind::createTclInterpreter() 103 104 { 105 Tcl::interpreter* interpreter; 104 106 #ifdef DEPENDENCY_PACKAGE_ENABLE 105 Tcl::interpreter* interpreter = new Tcl::interpreter(ORXONOX_TCL_LIBRARY_PATH); 107 if (true)//Core::isDevelopmentRun()) 108 interpreter = new Tcl::interpreter(std::string(ORXONOX_DEP_LIB_PATH) + "/tcl"); 109 else 110 interpreter = new Tcl::interpreter(Core::getRootPathString() + "lib/tcl"); 106 111 #else 107 Tcl::interpreter*interpreter = new Tcl::interpreter();112 interpreter = new Tcl::interpreter(); 108 113 #endif 109 114 try 110 115 { 111 interpreter->eval("source " + TclBind::getInstance().tclDataPath_ + "/init.tcl");116 interpreter->eval("source \"" + TclBind::getInstance().tclDataPath_ + "/init.tcl\""); 112 117 } 113 118 catch (Tcl::tcl_error const &e)
Note: See TracChangeset
for help on using the changeset viewer.