Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 24, 2009, 9:31:31 PM (15 years ago)
Author:
rgrieder
Message:

Fixed installation: The Tcl script library should now be found in the installed version as well.

Location:
code/branches/resource/src/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/Core.cc

    r3343 r3345  
    231231
    232232    Core::Core(const std::string& cmdLine)
    233         : bGraphicsLoaded_(false)
     233        : bDevRun_(false)
     234        , bGraphicsLoaded_(false)
    234235    {
    235236        if (singletonRef_s != 0)
     
    435436    }
    436437
     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
    437447    /**
    438448    @note
     
    544554        {
    545555            COUT(1) << "Running from the build tree." << std::endl;
    546             Core::isDevBuild_ = true;
     556            Core::bDevRun_ = true;
    547557            configuration_->mediaPath_  = ORXONOX_MEDIA_DEV_PATH;
    548558            configuration_->configPath_ = ORXONOX_CONFIG_DEV_PATH;
  • code/branches/resource/src/core/Core.h

    r3343 r3345  
    9090            //! Returns the path to the log files as boost::filesystem::path
    9191            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();
    9294            //! Returns the path to the data files as std::string
    9395            static std::string getMediaPathString();
     
    9698            //! Returns the path to the log files as std::string
    9799            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_; }
    98104
    99105        private:
     
    114120            TclThreadManager*     tclThreadManager_;
    115121
    116             bool                  isDevBuild_;          //!< True for builds in the build directory (not installed)
     122            bool                  bDevRun_;             //!< True for runs in the build directory (not installed)
    117123            bool                  bGraphicsLoaded_;
    118124            CoreConfiguration*    configuration_;
  • code/branches/resource/src/core/TclBind.cc

    r3344 r3345  
    3333#include <cpptcl/cpptcl.h>
    3434
     35#include "SpecialConfig.h"
    3536#include "util/Debug.h"
    3637#include "util/StringUtils.h"
    3738#include "CommandExecutor.h"
    3839#include "ConsoleCommand.h"
     40#include "Core.h"
    3941#include "TclThreadManager.h"
    40 #include "SpecialConfig.h"
    4142
    4243namespace orxonox
     
    102103    Tcl::interpreter* TclBind::createTclInterpreter()
    103104    {
     105        Tcl::interpreter* interpreter;
    104106#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");
    106111#else
    107         Tcl::interpreter* interpreter = new Tcl::interpreter();
     112        interpreter = new Tcl::interpreter();
    108113#endif
    109114        try
    110115        {
    111             interpreter->eval("source " + TclBind::getInstance().tclDataPath_ + "/init.tcl");
     116            interpreter->eval("source \"" + TclBind::getInstance().tclDataPath_ + "/init.tcl\"");
    112117        }
    113118        catch (Tcl::tcl_error const &e)
Note: See TracChangeset for help on using the changeset viewer.