Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2009, 2:13:29 PM (16 years ago)
Author:
rgrieder
Message:

Completed work on installation:

  • The CMake switch INSTALL_COPYABLE tells whether you will be able to move the installed directory or not. If TRUE then all folders, including log and config directory, will be put into the CMAKE_INSTALL_PREFIX. Furthermore, relative paths are used, which get resolved at run time.
  • If INSTALL_COPYABLE is set to FALSE, the standard operating system directories will be used. That also means on Windows files get written to the Application Data/.orxonox folder instead of Program Files/Orxonox
  • Default configuration is INSTALL_COPYABLE=TRUE for Windows and FALSE for Unix
  • Split OrxonoxConfig.h.in in two to avoid complete recompiles when changing only a path or INSTALL_COPYABLE
  • Added a global constant character: CP_SLASH which stands for cross platform slash, meaning '/' on Unix and '
    ' on Windows
  • Core class now has methods getFooPath(), getFooPathString() and getFooPathPOSIXString() where Foo can be Media, Log or Config
  • getFooPathPOSIXString() will always return a directory formatted with slashes, even on Windows
  • getFooPath() returns a reference to the boost::filesystem::path
  • boost/filesystem.hpp does not get included to Core.h because it has a very large rat tail
  • The platform specific directory stuff gets done in Core::postMainInitialisation()
  • Adjusted all classes using the media path
Location:
code/branches/buildsystem3/src/orxonox/gamestates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/src/orxonox/gamestates/GSGraphics.cc

    r2699 r2702  
    4545#include <OgreWindowEventUtilities.h>
    4646
     47#include "SpecialConfig.h"
    4748#include "util/Debug.h"
    4849#include "util/Exception.h"
     
    135136        // load debug overlay
    136137        COUT(3) << "Loading Debug Overlay..." << std::endl;
    137         this->debugOverlay_ = new XMLFile(Core::getMediaPath() + "overlay/debug.oxo");
     138        this->debugOverlay_ = new XMLFile((Core::getMediaPath() / "overlay" / "debug.oxo").file_string());
    138139        Loader::open(debugOverlay_);
    139140
     
    293294        }
    294295
    295         boost::filesystem::path ogreConfigFilepath(Core::getConfigPath());
    296         ogreConfigFilepath /= this->ogreConfigFile_;
    297         boost::filesystem::path ogreLogFilepath(Core::getLogPath());
    298         ogreLogFilepath /= this->ogreLogFile_;
     296        boost::filesystem::path ogreConfigFilepath(Core::getConfigPath() / this->ogreConfigFile_);
     297        boost::filesystem::path ogreLogFilepath(Core::getLogPath() / this->ogreLogFile_);
    299298
    300299        // create a new logManager
     
    357356        try
    358357        {
    359             cf.load(Core::getMediaPath() + resourceFile_);
     358            cf.load((Core::getMediaPath() / resourceFile_).file_string());
    360359        }
    361360        catch (...)
     
    383382
    384383                    Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
    385                         std::string(Core::getMediaPath() + archName), typeName, secName);
     384                        (Core::getMediaPath() / archName).directory_string(), typeName, secName);
    386385                }
    387386            }
  • code/branches/buildsystem3/src/orxonox/gamestates/GSLevel.cc

    r2690 r2702  
    202202        std::string levelName;
    203203        CommandLine::getValue("level", &levelName);
    204         startFile_ = new XMLFile(Core::getMediaPath() + std::string("levels/") + levelName);
     204        startFile_ = new XMLFile(Core::getMediaPathString() + "levels" + CP_SLASH + levelName);
    205205        Loader::open(startFile_);
    206206    }
  • code/branches/buildsystem3/src/orxonox/gamestates/GSRoot.cc

    r2693 r2702  
    111111
    112112        // initialise TCL
    113         this->tclBind_ = new TclBind(Core::getMediaPath());
     113        this->tclBind_ = new TclBind(Core::getMediaPathPOSIXString());
    114114        this->tclThreadManager_ = new TclThreadManager(tclBind_->getTclInterpreter());
    115115
Note: See TracChangeset for help on using the changeset viewer.