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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/cmake/Media.cmake

    r2721 r3345  
    4545################ Installation #################
    4646
    47 # Try no to copy both tcl script file libraries
    48 IF(TCL_LIBRARY MATCHES "85|8\\.5")
    49   SET(TCL_EXCLUDE_PATTERN "tcl8\\.4")
    50 ELSEIF(TCL_LIBRARY MATCHES "84|8\\.4")
    51   SET(TCL_EXCLUDE_PATTERN "tcl8\\.5")
    52 ENDIF()
    53 
    5447INSTALL(
    5548  DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/
    5649  DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH}
    57   REGEX "\\.svn$|_svn$|backToPNG|${TCL_EXCLUDE_PATTERN}" EXCLUDE
     50  REGEX "\\.svn$|_svn$|backToPNG" EXCLUDE
    5851)
  • code/branches/resource/cmake/PackageConfig.cmake

    r3344 r3345  
    4545LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib-1.2.3/include)
    4646
    47 SET(TCL_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/tcl)
     47### INSTALL ###
    4848
    49 ### INSTALL ###
     49# Tcl script library
     50INSTALL(
     51  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
     52  DESTINATION lib/tcl
     53)
     54
    5055# On Windows, DLLs have to be in the executable folder, install them
    5156IF(WIN32 AND DEP_BINARY_DIR)
  • code/branches/resource/src/SpecialConfig.h.in

    r3344 r3345  
    8888    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@";
    8989#endif
     90#ifdef DEPENDENCY_PACKAGE_ENABLE
     91    const char ORXONOX_DEP_LIB_PATH[]         = "@DEP_LIBRARY_DIR@";
     92#endif
    9093
    91     /* OGRE Plugins */
     94    // OGRE PLUGINS
    9295#ifdef NDEBUG
    9396    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_RELEASE@";
     
    105108#  endif
    106109#endif
    107 
    108     /* Tcl */
    109 #ifdef DEPENDENCY_PACKAGE_ENABLE
    110     const char ORXONOX_TCL_LIBRARY_PATH[] = "@TCL_LIBRARY_DIR@";
    111 #endif
    112110}
    113111
  • 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.