Ticket #1527: boost150support.patch

File boost150support.patch, 3.5 KB (added by historic_bruno, 12 years ago)
  • build/premake/extern_libs4.lua

     
    216216            end
    217217            -- These are only needed for boost <= 1.43
    218218            add_default_links({
    219                 android_names = { "boost_system-gcc-mt" },
    220                 unix_names = { "boost_system-mt" },
    221                 bsd_names = { "boost_system" },
     219                android_names = { "boost_filesystem-gcc-mt", "boost_system-gcc-mt" },
     220                unix_names = { "boost_filesystem-mt", "boost_system-mt" },
     221                bsd_names = { "boost_filesystem", "boost_system" },
    222222            })
    223223        end,
    224224        link_settings = function()
  • source/graphics/TextureManager.cpp

     
    425425            CTextureConverter::SettingsFile* f = GetSettingsFile(settingsPath);
    426426            if (f)
    427427                files.push_back(f);
    428             p = p / *it;
     428            p = p / GetWstringFromWpath(*it);
    429429        }
    430         return m_TextureConverter.ComputeSettings(srcPath.leaf(), files);
     430        return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.leaf()), files);
    431431    }
    432432
    433433    /**
  • source/lib/pch/pch_boost.h

     
    2525
    2626// the following boost libraries have been included in TR1 and are
    2727// thus deemed usable:
    28 #define BOOST_FILESYSTEM_VERSION 2
     28#if BOOST_VERSION >= 104400
     29// Filesystem v3 is included since Boost 1.44
     30// v2 is deprecated since 1.46 and removed entirely in 1.50
     31# define BOOST_FILESYSTEM_VERSION 3
     32#else
     33# define BOOST_FILESYSTEM_VERSION 2
     34#endif
    2935#include <boost/filesystem.hpp>
    3036namespace fs = boost::filesystem;
     37
    3138#include <boost/shared_ptr.hpp>
    3239
    3340// (these ones are used more rarely, so we don't enable them in minimal configurations)
  • source/ps/Filesystem.cpp

     
    9595    return INFO::OK;
    9696}
    9797
     98std::wstring GetWstringFromWpath(const fs::wpath& path)
     99{
     100#if BOOST_FILESYSTEM_VERSION == 3
     101    return path.wstring();
     102#else
     103    return path.string();
     104#endif
     105}
    98106
     107
    99108CVFSFile::CVFSFile()
    100109    : m_BufferSize(0)
    101110{
  • source/ps/Filesystem.h

     
    5454 **/
    5555extern Status ReloadChangedFiles();
    5656
     57/**
     58 * Helper function to handle differences between Boost Filesystem v2 and v3
     59 * There is no implicit conversion from wpath to std::wstring in v3
     60 */
     61std::wstring GetWstringFromWpath(const fs::wpath& path);
     62
    5763ERROR_GROUP(CVFSFile);
    5864ERROR_TYPE(CVFSFile, LoadFailed);
    5965ERROR_TYPE(CVFSFile, AlreadyLoaded);
  • source/simulation2/components/ICmpAIManager.cpp

     
    5353        fs::wpath components = pathname.string();
    5454        fs::wpath::iterator it = components.begin();
    5555        std::advance(it, 2);
    56         std::wstring dirname = *it;
     56        std::wstring dirname = GetWstringFromWpath(*it);
    5757
    5858        CScriptValRooted ai;
    5959        self->m_ScriptInterface.Eval("({})", ai);