Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2008, 8:59:48 PM (16 years ago)
Author:
rgrieder
Message:

Merged revisions 1875-2278 of the buildsystem branch to buildsystem2.

Location:
code/branches/buildsystem2
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2

  • code/branches/buildsystem2/src/orxonox/CMakeLists.txt

    r2171 r2509  
    66  PlayerManager.cc
    77  Settings.cc
    8  
    9   tolua/tolua_bind.cc
    108)
    119
     
    1614ADD_SOURCE_DIRECTORY(ORXONOX_SRC_FILES tools)
    1715
    18 GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION)
    19 ADD_CUSTOM_COMMAND(
    20   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.cc ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.h
    21   COMMAND ${TOLUA_EXE} -n Orxonox -o ../../src/orxonox/tolua/tolua_bind.cc -H ../../src/orxonox/tolua/tolua_bind.h ../../src/orxonox/tolua/tolua.pkg
    22   DEPENDS
    23     tolua_orxonox
    24     tolua/tolua.pkg
    25     gui/GUIManager.h
    26   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
    27 )
     16INCLUDE(UseTolua)
     17TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h)
    2818
    2919
     
    4232
    4333TARGET_LINK_LIBRARIES( orxonox
    44   ${OGRE_LIBRARIES}
    45   ${CEGUI_LIBRARIES}
    46   lua_orxonox
     34  ${OGRE_LIBRARY}
     35  ${CEGUI_LIBRARY}
     36  ${LUA_LIBRARIES}
     37  #${CEGUI_SCRIPT_LIBRARIES}
    4738  ceguilua_orxonox
    4839  tinyxml_orxonox
     
    5344  network
    5445)
    55 
  • code/branches/buildsystem2/src/orxonox/Settings.cc

    r2087 r2509  
    6363    void Settings::setConfigValues()
    6464    {
    65         SetConfigValue(dataPath_, "../../media/").description("Relative path to the game data.").callback(this, &Settings::dataPathChanged);
     65        SetConfigValue(dataPath_, "../../../media/").description("Relative path to the game data.").callback(this, &Settings::dataPathChanged);
    6666    }
    6767
  • code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.cc

    r2171 r2509  
    4444#include "util/Debug.h"
    4545#include "util/Exception.h"
     46#include "util/String.h"
     47#include "util/SubString.h"
    4648#include "core/ConsoleCommand.h"
    4749#include "core/ConfigValueIncludes.h"
     
    9698        SetConfigValue(ogreConfigFile_,  "ogre.cfg")
    9799            .description("Location of the Ogre config file");
    98         SetConfigValue(ogrePluginsFile_, "plugins.cfg")
    99             .description("Location of the Ogre plugins file");
     100        SetConfigValue(ogrePluginsFolder_, ".")
     101            .description("Folder where the Ogre plugins are located.");
     102        SetConfigValue(ogrePlugins_, "RenderSystem_GL, Plugin_ParticleFX")
     103            .description("Comma separated list of all plugins to load.");
    100104        SetConfigValue(ogreLogFile_,     "ogre.log")
    101105            .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
     
    121125        // Ogre setup procedure
    122126        setupOgre();
     127        // load all the required plugins for Ogre
     128        loadOgrePlugins();
     129        // read resource declaration file
    123130        this->declareResources();
    124         this->loadRenderer();    // creates the render window
     131        // Reads ogre config and creates the render window
     132        this->loadRenderer();
     133
    125134        // TODO: Spread this so that this call only initialises things needed for the Console and GUI
    126135        this->initialiseResources();
     
    345354            probe.close();
    346355
    347         ogreRoot_ = new Ogre::Root(ogrePluginsFile_, ogreConfigFile_, ogreLogFile_);
     356        // Leave plugins file empty. We're going to do that part manually later
     357        ogreRoot_ = new Ogre::Root("", ogreConfigFile_, ogreLogFile_);
    348358
    349359#if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.)
     
    358368
    359369        COUT(3) << "Ogre set up done." << std::endl;
     370    }
     371
     372    void GSGraphics::loadOgrePlugins()
     373    {
     374        // just to make sure the next statement doesn't segfault
     375        if (ogrePluginsFolder_ == "")
     376            ogrePluginsFolder_ = ".";
     377
     378#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     379        convertToWindowsPath(&ogrePluginsFolder_);
     380#else
     381        convertToUnixPath(&ogrePluginsFolder_);
     382#endif
     383
     384        // Do some SubString magic to get the comma separated list of plugins
     385        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
     386        for (unsigned int i = 0; i < plugins.size(); ++i)
     387            ogreRoot_->loadPlugin(ogrePluginsFolder_ + plugins[i]);
    360388    }
    361389
  • code/branches/buildsystem2/src/orxonox/gamestates/GSGraphics.h

    r2103 r2509  
    6060
    6161        void setupOgre();
     62        void loadOgrePlugins();
    6263        void declareResources();
    6364        void loadRenderer();
     
    105106        std::string           resourceFile_;             //!< resources file name
    106107        std::string           ogreConfigFile_;           //!< ogre config file name
    107         std::string           ogrePluginsFile_;          //!< ogre plugins file name
     108        std::string           ogrePluginsFolder_;        //!< Folder where the Ogre plugins are located
     109        std::string           ogrePlugins_;              //!< Comma separated list of all plugins to load
    108110        std::string           ogreLogFile_;              //!< log file name for Ogre log messages
    109111        int                   ogreLogLevelTrivial_;      //!< Corresponding Orxonx debug level for LL_TRIVIAL
  • code/branches/buildsystem2/src/orxonox/gui/GUIManager.cc

    r2087 r2509  
    3939#include <OgreRoot.h>
    4040#include <CEGUI.h>
    41 #include "ceguilua/CEGUILua.h"
     41#include <CEGUILua.h>
    4242#include "util/Exception.h"
    4343#include "core/input/InputManager.h"
    4444#include "core/input/SimpleInputState.h"
    45 #include "core/tolua/tolua_bind.h"
    4645#include "core/ConsoleCommand.h"
    4746#include "core/Core.h"
    48 #include "tolua/tolua_bind.h"
     47#include "core/ToluaBindCore.h"
     48#include "orxonox/ToluaBindOrxonox.h"
    4949#include "OgreCEGUIRenderer.h"
    5050
    51 #include "lua/lua.hpp"
     51extern "C" {
     52#include "lua.h"
     53}
    5254
    5355namespace orxonox
  • code/branches/buildsystem2/src/orxonox/gui/GUIManager.h

    r1887 r2509  
    4242#include "core/input/InputInterfaces.h"
    4343
    44 namespace orxonox // tolua_export
    45 { // tolua_export
     44// tolua_begin
     45namespace orxonox
     46{
    4647    /**
    4748    @brief
    4849        Provides a simple interface to CEGUI with tolua methods and console commands
    4950    */
    50     class _OrxonoxExport GUIManager : public KeyHandler, public MouseHandler
    51     /*
    52     class GUIManager { // tolua_export
    53     */
     51    class _OrxonoxExport GUIManager
     52// tolua_end
     53        : public KeyHandler, public MouseHandler
     54// tolua_begin
    5455    {
     56// tolua_end
    5557    public:
    5658        enum State
Note: See TracChangeset for help on using the changeset viewer.