diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b218ae..b1c1993 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ file(GLOB stddatabase_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/STLDatabase/
file(GLOB stderrplugin_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/stdErrPlugin/*.cpp)
set(COLLADA_BASE_SOURCES ${dae_files} ${libxmlplugin_files} ${stddatabase_files} ${stderrplugin_files})
-set(COLLADA_LIBS minizip ${libpcrecpp_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-set(COLLADA_COMPILE_FLAGS "${libpcrecpp_CFLAGS_OTHERS} ${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS} -DDOM_INCLUDE_LIBXML")
+set(COLLADA_LIBS minizip ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+set(COLLADA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS} -DDOM_INCLUDE_LIBXML")
if( OPT_COLLADA15 )
add_subdirectory(src/1.5)
diff --git a/autobuild.xml b/autobuild.xml
index 4bbe6c3..c7b6d16 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -226,80 +226,6 @@
version
3.0.2.3e9876e
- pcre
-
zlib-ng
canonical_repo
diff --git a/make/dom.mk b/make/dom.mk
index 16b06bb..1da0f2b 100644
--- a/make/dom.mk
+++ b/make/dom.mk
@@ -10,7 +10,6 @@ src += $(wildcard src/$(colladaVersion)/dom/*.cpp)
includeOpts := -Istage/packages/include \
-Istage/packages/include/zlib-ng \
- -Istage/packages/include/pcre \
-Istage/packages/include/libxml2 \
-Istage/packages/include/minizip-ng \
-Iinclude \
@@ -46,14 +45,6 @@ includeOpts += -Iexternal-libs/tinyxml/
libOpts += external-libs/tinyxml/lib/$(buildID)/libtinyxml.a
endif
-# On Mac, Windows and PS3 we need to be told where to find pcre
-ifeq ($(os),windows)
-ccFlags += -DPCRE_STATIC
-else
-includeOpts += -Istage/packages/include/pcre
-libOpts += $(addprefix stage/packages/lib/release/,libpcrecpp.a libpcre.a )
-endif
-
# For mingw: add boost
ifneq ($(findstring $(os),linux mac),)
includeOpts += -Istage/packages/include
@@ -66,6 +57,7 @@ endif
# errors about missing libboost_[file]system-mt.a. Hence $(archsupport).
libOpts += stage/packages/lib/$(conf)/libboost_system-mt$(archsupport)$(debug_suffix).a
libOpts += stage/packages/lib/$(conf)/libboost_filesystem-mt$(archsupport)$(debug_suffix).a
+libOpts += stage/packages/lib/$(conf)/libboost_regex-mt$(archsupport)$(debug_suffix).a
endif
# minizip
diff --git a/make/domTest.mk b/make/domTest.mk
index e5405dd..2148a07 100644
--- a/make/domTest.mk
+++ b/make/domTest.mk
@@ -33,7 +33,6 @@ endif
includeOpts += -Istage/packages/include \
-Istage/packages/include/zlib-ng \
- -Istage/packages/include/pcre \
-Istage/packages/include/libxml2 \
-Istage/packages/include/minizip-ng
libOpts += -Lstage/packages/lib/$(conf)/
@@ -47,11 +46,6 @@ includeOpts += -I$(installPrefix)/$(domFramework)/Headers
endif
dependentLibs += $(domName)
-# PCRE defs
-ifeq ($(os),ps3)
-libOpts += $(addprefix external-libs/pcre/lib/$(os)/,libpcrecpp.a libpcre.a)
-endif
-
# TinyXml defs
ifneq ($(findstring tinyxml,$(xmlparsers)),)
# Notify domTest.cpp if we're supposed to do TinyXml tests
@@ -62,16 +56,17 @@ endif
endif
# Boost defs
-# Test programs use some deprecated interfaces...
-ccFlags += -DBOOST_FILESYSTEM_DEPRECATED
ifeq ($(os),linux)
libOpts += -lboost_filesystem-mt$(archsupport)$(debugSuffix)
+libOpts += -lboost_regex-mt$(archsupport)$(debugSuffix)
else ifeq ($(os),mac)
libOpts += -lboost_filesystem-mt$(archsupport)$(debugSuffix)
+libOpts += -lboost_regex-mt$(archsupport)$(debugSuffix)
else
includeOpts += -Iexternal-libs/boost
libOpts += external-libs/boost/lib/$(buildID)/libboost_system$(archsupport).a
libOpts += external-libs/boost/lib/$(buildID)/libboost_filesystem$(archsupport).a
+libOpts += external-libs/boost/lib/$(buildID)/libboost_regex$(archsupport).a
endif
ifeq ($(os),ps3)
# PS3 doesn't support C++ locales, so tell boost not to use them
diff --git a/make/readme b/make/readme
index 91c41c9..e2b1bbf 100644
--- a/make/readme
+++ b/make/readme
@@ -101,12 +101,12 @@ Linux Notes
-----------
The Linux build has been tested with Ubuntu Gutsy. You need to have libxml,
-PCRE, and boost filesystem development files installed on your machine to build
-the DOM. The Ubuntu packages are named libxml2-dev, libpcre3-dev, and
+boost regex, and boost filesystem development files installed on your machine to build
+the DOM. The Ubuntu packages are named libxml2-dev, libboost-regex-dev, and
libboost-filesystem-dev.
It should be easy to get the DOM building on other versions of Linux, but you'll
-need to figure out what packages to install for libxml, PCRE, and boost filesystem.
+need to figure out what packages to install for libxml, boost regex, and boost filesystem.
Windows Notes
diff --git a/projects/vc142-1.4/dom-static.vcxproj b/projects/vc142-1.4/dom-static.vcxproj
index 74dc3c1..2c7809b 100644
--- a/projects/vc142-1.4/dom-static.vcxproj
+++ b/projects/vc142-1.4/dom-static.vcxproj
@@ -77,8 +77,8 @@
Disabled
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
false
EnableFastChecks
MultiThreadedDebugDLL
@@ -88,6 +88,7 @@
Level3
OldStyle
false
+ true
$(OutDir)libcollada14dom23-sd.lib
@@ -96,8 +97,8 @@
Disabled
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
false
EnableFastChecks
MultiThreadedDebugDLL
@@ -107,6 +108,7 @@
Level3
OldStyle
false
+ true
$(OutDir)libcollada14dom23-sd.lib
@@ -115,8 +117,8 @@
false
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDLL
false
@@ -124,6 +126,7 @@
Level3
OldStyle
false
+ true
$(OutDir)libcollada14dom23-s.lib
@@ -134,8 +137,8 @@
false
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDLL
false
@@ -143,6 +146,7 @@
Level3
OldStyle
false
+ true
$(OutDir)libcollada14dom23-s.lib
@@ -577,4 +581,4 @@
-
+
\ No newline at end of file
diff --git a/projects/vc142-1.4/dom.vcxproj b/projects/vc142-1.4/dom.vcxproj
index cecdc55..06275ea 100644
--- a/projects/vc142-1.4/dom.vcxproj
+++ b/projects/vc142-1.4/dom.vcxproj
@@ -80,22 +80,23 @@
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
EnableFastChecks
OldStyle
false
false
Disabled
- WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDebugDLL
Level3
$(IntDir)
false
+ true
- libxml2_a.lib;wsock32.lib;pcred.lib;pcrecppd.lib;libminizip.lib;libboost_filesystem-mt-x32-gd.lib;libboost_system-mt-x32-gd.lib;zlib.lib;%(AdditionalDependencies)
+ libxml2_a.lib;wsock32.lib;libminizip.lib;libboost_regex-mt-x32-gd.lib;libboost_filesystem-mt-x32-gd.lib;libboost_system-mt-x32-gd.lib;zlib.lib;%(AdditionalDependencies)
..\..\stage\packages\lib\debug;..\..\external-libs\tinyxml\lib\vc10;%(AdditionalLibraryDirectories)
@@ -113,22 +114,23 @@
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
EnableFastChecks
OldStyle
false
false
Disabled
- WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDebugDLL
Level3
$(IntDir)
false
+ true
- libxml2_a.lib;wsock32.lib;pcred.lib;pcrecppd.lib;libminizip.lib;libboost_filesystem-mt-x64-gd.lib;libboost_system-mt-x64-gd.lib;zlib.lib;%(AdditionalDependencies)
+ libxml2_a.lib;wsock32.lib;libminizip.lib;libboost_regex-mt-x64-gd.lib;libboost_filesystem-mt-x64-gd.lib;libboost_system-mt-x64-gd.lib;zlib.lib;%(AdditionalDependencies)
..\..\stage\packages\lib\debug;..\..\external-libs\tinyxml\lib\vc10;%(AdditionalLibraryDirectories)
@@ -145,20 +147,21 @@
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
false
- WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDLL
Level3
true
false
+ true
- libxml2_a.lib;zlib.lib;wsock32.lib;pcre.lib;pcrecpp.lib;libminizip.lib;libboost_filesystem-mt-x32.lib;libboost_system-mt-x32.lib;%(AdditionalDependencies)
+ libxml2_a.lib;zlib.lib;wsock32.lib;libminizip.lib;libboost_regex-mt-x32.lib;libboost_filesystem-mt-x32.lib;libboost_system-mt-x32.lib;%(AdditionalDependencies)
..\..\stage\packages\lib\release;..\..\external-libs\tinyxml\lib\vc10;%(AdditionalLibraryDirectories)
@@ -176,20 +179,21 @@
- ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\pcre;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
+ ..\..\include;..\..\include\1.4;..\..\stage\packages\include;..\..\stage\packages\include\libxml2;..\..\stage\packages\include\minizip-ng;..\..\stage\packages\include\zlib-ng;..\..\external-libs\tinyxml;%(AdditionalIncludeDirectories)
false
- WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;PCRE_STATIC;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;DOM_EXPORT;DOM_INCLUDE_LIBXML;%(PreprocessorDefinitions)
MultiThreadedDLL
Level3
true
false
+ true
- libxml2_a.lib;zlib.lib;wsock32.lib;pcre.lib;pcrecpp.lib;libminizip.lib;libboost_filesystem-mt-x64.lib;libboost_system-mt-x64.lib;%(AdditionalDependencies)
+ libxml2_a.lib;zlib.lib;wsock32.lib;libminizip.lib;libboost_regex-mt-x64.lib;libboost_filesystem-mt-x64.lib;libboost_system-mt-x64.lib;%(AdditionalDependencies)
..\..\stage\packages\lib\release;..\..\external-libs\tinyxml\lib\vc10;%(AdditionalLibraryDirectories)
@@ -633,4 +637,4 @@
-
+
\ No newline at end of file
diff --git a/projects/vc142-1.4/domTest.vcxproj b/projects/vc142-1.4/domTest.vcxproj
index 1585278..86161b3 100644
--- a/projects/vc142-1.4/domTest.vcxproj
+++ b/projects/vc142-1.4/domTest.vcxproj
@@ -89,6 +89,7 @@
Level3
$(IntDir)
false
+ true
libcollada14dom23-sd.lib;libboost_filesystem-mt-x32-gd.lib;libboost_system-mt-x32-gd.lib;%(AdditionalDependencies)
@@ -116,6 +117,7 @@
Level3
$(IntDir)
false
+ true
libcollada14dom23-sd.lib;libboost_filesystem-mt-x64-gd.lib;libboost_system-mt-x64-gd.lib;%(AdditionalDependencies)
@@ -133,13 +135,14 @@
false
- WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;BOOST_FILESYSTEM_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;%(PreprocessorDefinitions)
MultiThreadedDLL
Level3
true
false
+ true
libcollada14dom23.lib;libboost_filesystem-mt-x32.lib;libboost_system-mt-x32.lib;%(AdditionalDependencies)
@@ -161,13 +164,14 @@
false
- WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;BOOST_FILESYSTEM_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;DOM_DYNAMIC;%(PreprocessorDefinitions)
MultiThreadedDLL
Level3
true
false
+ true
libcollada14dom23.lib;libboost_filesystem-mt-x64.lib;libboost_system-mt-x64.lib;%(AdditionalDependencies)
@@ -193,4 +197,4 @@
-
+
\ No newline at end of file
diff --git a/src/1.4/CMakeLists.txt b/src/1.4/CMakeLists.txt
index e49a51a..17fbaea 100644
--- a/src/1.4/CMakeLists.txt
+++ b/src/1.4/CMakeLists.txt
@@ -4,7 +4,6 @@ add_library(collada14dom SHARED ${COLLADA_BASE_SOURCES} ${dom_files})
target_link_libraries(collada14dom ${COLLADA_LIBS})
set_target_properties(collada14dom PROPERTIES
COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS}"
- LINK_FLAGS "${libpcrecpp_LDFLAGS_OTHERS}"
CLEAN_DIRECT_OUTPUT 1
SOVERSION ${COLLADA_DOM_SOVERSION}
VERSION ${COLLADA_DOM_VERSION})
diff --git a/src/1.5/CMakeLists.txt b/src/1.5/CMakeLists.txt
index fe2d729..e061a01 100644
--- a/src/1.5/CMakeLists.txt
+++ b/src/1.5/CMakeLists.txt
@@ -4,7 +4,6 @@ add_library(collada15dom SHARED ${COLLADA_BASE_SOURCES} ${dom_files})
target_link_libraries(collada15dom ${COLLADA_LIBS})
set_target_properties(collada15dom PROPERTIES
COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS}"
- LINK_FLAGS "${libpcrecpp_LDFLAGS_OTHERS}"
CLEAN_DIRECT_OUTPUT 1
SOVERSION ${COLLADA_DOM_SOVERSION}
VERSION ${COLLADA_DOM_VERSION})
diff --git a/src/dae/daeURI.cpp b/src/dae/daeURI.cpp
index 5f0e034..b318bdb 100644
--- a/src/dae/daeURI.cpp
+++ b/src/dae/daeURI.cpp
@@ -13,7 +13,8 @@
#include
#include
#include
-#include
+
+#include
using namespace std;
using namespace cdom;
@@ -140,12 +141,31 @@ namespace {
//dir = baseName = extension = "";
//re.FullMatch(path, &dir, &baseName, &extension);
+#if 0 // Original Impl
static pcrecpp::RE findDir("(.*/)?(.*)?");
static pcrecpp::RE findExt("([^.]*)?(\\..*)?");
string tmpFile;
dir = baseName = extension = tmpFile = "";
findDir.PartialMatch(path, &dir, &tmpFile);
findExt.PartialMatch(tmpFile, &baseName, &extension);
+#else
+ static boost::regex findDir("(.*/)?(.*)?", boost::regex::perl | boost::regex::icase);
+ static boost::regex findExt("([^.]*)?(\\..*)?", boost::regex::perl | boost::regex::icase);
+ boost::smatch matches;
+ string tmpFile;
+ dir = tmpFile = baseName = extension = "";
+ if (boost::regex_search(path, matches, findDir))
+ {
+ dir.assign(matches[1].first, matches[1].second);
+ tmpFile.assign(matches[2].first, matches[2].second);
+ }
+
+ if (boost::regex_search(tmpFile, matches, findExt))
+ {
+ baseName.assign(matches[1].first, matches[1].second);
+ extension.assign(matches[2].first, matches[2].second);
+ }
+#endif
}
}
@@ -702,13 +722,28 @@ bool cdom::parseUriRef(const string& uriRef,
string& path,
string& query,
string& fragment) {
+#if 0
// This regular expression for parsing URI references comes from the URI spec:
// http://tools.ietf.org/html/rfc3986#appendix-B
static pcrecpp::RE re("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?");
string s1, s3, s6, s8;
if (re.FullMatch(uriRef, &s1, &scheme, &s3, &authority, &path, &s6, &query, &s8, &fragment))
return true;
-
+#else
+ // This regular expression for parsing URI references comes from the URI spec:
+ // http://tools.ietf.org/html/rfc3986#appendix-B
+ static boost::regex re("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?", boost::regex::perl | boost::regex::icase);
+ boost::smatch matches;
+ if (boost::regex_match(uriRef, matches, re))
+ {
+ scheme.assign(matches[2].first, matches[2].second);
+ authority.assign(matches[4].first, matches[4].second);
+ path.assign(matches[5].first, matches[5].second);
+ query.assign(matches[7].first, matches[7].second);
+ fragment.assign(matches[9].first, matches[9].second);
+ return true;
+ }
+#endif
return false;
}
diff --git a/src/dae/daeUtils.cpp b/src/dae/daeUtils.cpp
index 47598a9..682692c 100644
--- a/src/dae/daeUtils.cpp
+++ b/src/dae/daeUtils.cpp
@@ -18,7 +18,7 @@
#endif
#ifndef NO_BOOST
-#include // THIS WAS NOT COMMENTED.
+#include // THIS WAS NOT COMMENTED.
#endif
#include // for tmpnam
diff --git a/src/dae/daeZAEUncompressHandler.cpp b/src/dae/daeZAEUncompressHandler.cpp
index e8c1755..21fdc9b 100644
--- a/src/dae/daeZAEUncompressHandler.cpp
+++ b/src/dae/daeZAEUncompressHandler.cpp
@@ -268,7 +268,7 @@ bool daeZAEUncompressHandler::checkAndExtractInternalArchive( const std::string&
bool error = false;
boost::filesystem::path archivePath(filePath);
- std::string dir = archivePath.branch_path().string();
+ std::string dir = archivePath.parent_path().string();
const std::string& randomSegment = cdom::getRandomFileName();
std::string tmpDir = dir + cdom::getFileSeparator() + randomSegment + cdom::getFileSeparator();
diff --git a/test/1.4/domTest.cpp b/test/1.4/domTest.cpp
index 02dc65d..954acce 100644
--- a/test/1.4/domTest.cpp
+++ b/test/1.4/domTest.cpp
@@ -281,7 +281,7 @@ DefineTest(writeCamera) {
string getRoundTripFile(const string& name) {
- return getTmpFile(fs::basename(fs::path(name)) + "_roundTrip.dae");
+ return getTmpFile(fs::path(name).stem().string() + "_roundTrip.dae");
}
bool roundTrip(const string& file) {
@@ -717,7 +717,7 @@ DefineTest(genericOps) {
any->setAttribute(name.str().c_str(), value.str().c_str());
}
- CheckResult(dae.writeTo(file, getTmpFile(fs::basename(fs::path(file)) + "_genericOps.dae")));
+ CheckResult(dae.writeTo(file, getTmpFile(fs::path(file).stem().string() + "_genericOps.dae")));
return testResult(true);
}
@@ -1466,7 +1466,7 @@ bool printTestResults(const map& failedTests) {
iter++) {
cout << " " << iter->first;
if (!iter->second.file.empty()) {
- cout << " (file " << fs::path(iter->second.file).leaf();
+ cout << " (file " << fs::path(iter->second.file).filename();
if (iter->second.line != -1)
cout << ", line " << iter->second.line << ")";
else
@@ -1541,9 +1541,9 @@ int main(int argc, char* argv[]) {
// Shut the DOM up
daeErrorHandler::setErrorHandler(&quietErrorHandler::getInstance());
- dataPath() = (fs::path(argv[0]).branch_path()/"domTestData/").normalize();
+ dataPath() = (fs::path(argv[0]).parent_path()/"domTestData/").lexically_normal();
if (!fs::exists(dataPath()))
- dataPath() = (fs::path(argv[0]).branch_path()/"../../test/1.4/data/").normalize();
+ dataPath() = (fs::path(argv[0]).parent_path()/"../../test/1.4/data/").lexically_normal();
tmpPath() = dataPath() / "tmp";
tmpDir tmp(tmpPath(), !leaveTmpFiles);