Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 7:15:14 AM (13 years ago)
Author:
rgrieder
Message:

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/PathConfig.cc

    r6417 r8351  
    3333#include <cstdio>
    3434#include <vector>
    35 #include <boost/version.hpp>
    3635#include <boost/filesystem.hpp>
    3736
     
    5655#include "CommandLineParser.h"
    5756
    58 // Boost 1.36 has some issues with deprecated functions that have been omitted
    59 #if (BOOST_VERSION == 103600)
    60 #  define BOOST_LEAF_FUNCTION filename
     57// Differentiate Boost Filesystem v2 and v3
     58#if (BOOST_FILESYSTEM_VERSION < 3)
     59#  define BF_LEAF leaf
     60#  define BF_GENERIC_STRING string
     61#  define BF_NATIVE_STRING file_string
    6162#else
    62 #  define BOOST_LEAF_FUNCTION leaf
     63#  define BF_LEAF path().filename().string
     64#  define BF_GENERIC_STRING generic_string
     65#  define BF_NATIVE_STRING string
    6366#endif
    6467
     
    9598#elif defined(ORXONOX_PLATFORM_APPLE)
    9699        char buffer[1024];
    97         unsigned long path_len = 1023;
     100        uint32_t path_len = 1023;
    98101        if (_NSGetExecutablePath(buffer, &path_len))
    99102            ThrowException(General, "Could not retrieve executable path.");
     
    125128#endif
    126129
    127         executablePath_ = bf::path(buffer);
    128 #ifndef ORXONOX_PLATFORM_APPLE
    129         executablePath_ = executablePath_.branch_path(); // remove executable name
    130 #endif
     130        // Remove executable filename
     131        executablePath_ = bf::path(buffer).branch_path();
    131132
    132133        /////////////////////
     
    206207
    207208            // Get user directory
    208 #  ifdef ORXONOX_PLATFORM_UNIX /* Apple? */
     209#ifdef ORXONOX_PLATFORM_UNIX
    209210            char* userDataPathPtr(getenv("HOME"));
    210 #  else
     211#else
    211212            char* userDataPathPtr(getenv("APPDATA"));
    212 #  endif
     213#endif
    213214            if (userDataPathPtr == NULL)
    214215                ThrowException(General, "Could not retrieve user data path.");
     
    233234        // Create directories to avoid problems when opening files in non existent folders.
    234235        std::vector<std::pair<bf::path, std::string> > directories;
    235         directories.push_back(std::make_pair(bf::path(configPath_), "config"));
    236         directories.push_back(std::make_pair(bf::path(logPath_), "log"));
     236        directories.push_back(std::make_pair(bf::path(configPath_), std::string("config")));
     237        directories.push_back(std::make_pair(bf::path(logPath_), std::string("log")));
    237238
    238239        for (std::vector<std::pair<bf::path, std::string> >::iterator it = directories.begin();
     
    242243            {
    243244                ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \
    244                                          Please remove " + it->first.string());
     245                                         Please remove " + it->first.BF_GENERIC_STRING());
    245246            }
    246247            if (bf::create_directories(it->first)) // function may not return true at all (bug?)
     
    259260        size_t moduleextensionlength = moduleextension.size();
    260261
     262#ifdef ORXONOX_PLATFORM_WINDOWS
    261263        // Add that path to the PATH variable in case a module depends on another one
    262         std::string pathVariable(getenv("PATH"));
    263         putenv(const_cast<char*>(("PATH=" + pathVariable + ';' + modulePath_.string()).c_str()));
     264        const char* currentPATH = getenv("PATH");
     265        std::string newPATH = modulePath_.BF_NATIVE_STRING();
     266        if (currentPATH != NULL)
     267            newPATH = std::string(currentPATH) + ';' + newPATH;
     268        putenv(const_cast<char*>(("PATH=" + newPATH).c_str()));
     269#endif
    264270
    265271        // Make sure the path exists, otherwise don't load modules
     
    273279        while (file != end)
    274280        {
    275             const std::string& filename = file->BOOST_LEAF_FUNCTION();
    276 
    277             // Check if the file ends with the exension in question
     281            std::string filename = file->BF_LEAF();
     282
     283            // Check if the file ends with the extension in question
    278284            if (filename.size() > moduleextensionlength)
    279285            {
     
    282288                    // We've found a helper file
    283289                    const std::string& library = filename.substr(0, filename.size() - moduleextensionlength);
    284                     modulePaths.push_back((modulePath_ / library).file_string());
     290                    modulePaths.push_back(getModulePathString() + library);
    285291                }
    286292            }
     
    293299    /*static*/ std::string PathConfig::getRootPathString()
    294300    {
    295         return getInstance().rootPath_.string() + '/';
     301        return getInstance().rootPath_.BF_GENERIC_STRING() + '/';
    296302    }
    297303
    298304    /*static*/ std::string PathConfig::getExecutablePathString()
    299305    {
    300         return getInstance().executablePath_.string() + '/';
     306        return getInstance().executablePath_.BF_GENERIC_STRING() + '/';
    301307    }
    302308
    303309    /*static*/ std::string PathConfig::getDataPathString()
    304310    {
    305         return getInstance().dataPath_.string() + '/';
     311        return getInstance().dataPath_.BF_GENERIC_STRING() + '/';
    306312    }
    307313
    308314    /*static*/ std::string PathConfig::getExternalDataPathString()
    309315    {
    310         return getInstance().externalDataPath_.string() + '/';
     316        return getInstance().externalDataPath_.BF_GENERIC_STRING() + '/';
    311317    }
    312318
    313319    /*static*/ std::string PathConfig::getConfigPathString()
    314320    {
    315         return getInstance().configPath_.string() + '/';
     321        return getInstance().configPath_.BF_GENERIC_STRING() + '/';
    316322    }
    317323
    318324    /*static*/ std::string PathConfig::getLogPathString()
    319325    {
    320         return getInstance().logPath_.string() + '/';
     326        return getInstance().logPath_.BF_GENERIC_STRING() + '/';
    321327    }
    322328
    323329    /*static*/ std::string PathConfig::getModulePathString()
    324330    {
    325         return getInstance().modulePath_.string() + '/';
     331        return getInstance().modulePath_.BF_GENERIC_STRING() + '/';
    326332    }
    327333}
Note: See TracChangeset for help on using the changeset viewer.