diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-20 22:39:07 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-20 22:39:07 (GMT) |
commit | 045db3f61f776f8472a6ce7bd2ddbeda77cae872 (patch) | |
tree | e8e93fbdbf2e9ed37af321eb53b7d40399349594 | |
parent | b3f69eb2b306318be73327bf55a7af79e3e2922f (diff) | |
download | uscxml-045db3f61f776f8472a6ce7bd2ddbeda77cae872.zip uscxml-045db3f61f776f8472a6ce7bd2ddbeda77cae872.tar.gz uscxml-045db3f61f776f8472a6ce7bd2ddbeda77cae872.tar.bz2 |
Passing all Lua tests again - might have broken external builds
-rw-r--r-- | contrib/cmake/BuildLibCurl.cmake | 35 | ||||
-rw-r--r-- | contrib/cmake/BuildLibEvent.cmake | 26 | ||||
-rw-r--r-- | contrib/cmake/BuildURIParser.cmake | 105 | ||||
-rw-r--r-- | contrib/patches/uriparser-vs2013/uriparser.vcxproj | 168 | ||||
-rw-r--r-- | contrib/patches/uriparser/CMakeLists.txt | 14 | ||||
-rw-r--r-- | docs/BUILDING.md | 13 | ||||
-rw-r--r-- | src/uscxml/interpreter/BasicContentExecutor.cpp | 6 | ||||
-rw-r--r-- | src/uscxml/interpreter/FastMicroStep.cpp | 19 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 2 |
9 files changed, 144 insertions, 244 deletions
diff --git a/contrib/cmake/BuildLibCurl.cmake b/contrib/cmake/BuildLibCurl.cmake index 61e998a..54bfe4a 100644 --- a/contrib/cmake/BuildLibCurl.cmake +++ b/contrib/cmake/BuildLibCurl.cmake @@ -1,19 +1,10 @@ include(ExternalProject) +if (WIN32) + add_definitions("-DCURL_STATICLIB") +endif() -if (UNIX) - externalproject_add(libcurl - URL https://curl.haxx.se/download/curl-7.48.0.tar.gz - URL_MD5 b2cac71029d28cb989150bac72aafab5 - BUILD_IN_SOURCE 0 - PREFIX ${CMAKE_BINARY_DIR}/deps/libcurl - CONFIGURE_COMMAND - "<SOURCE_DIR>/configure" - "--without-ssl" - "--enable-shared" - "--prefix=<INSTALL_DIR>" - ) -elseif (WIN32) +if (MSVC) # see https://en.wikipedia.org/wiki/Visual_C%2B%2B set(VC_VERSION 14) @@ -34,11 +25,7 @@ elseif (WIN32) elseif (MSVC_VERSION LESS 1900) set(VC_VERSION 12) endif() - - if (WIN32) - add_definitions("-DCURL_STATICLIB") - endif() - + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) externalproject_add(libcurl URL https://curl.haxx.se/download/curl-7.48.0.tar.gz @@ -60,6 +47,18 @@ elseif (WIN32) INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory builds/libcurl-vc${VC_VERSION}-x86-release-static-ipv6-sspi-winssl ${CMAKE_BINARY_DIR}/deps/libcurl/ ) endif() +else() + externalproject_add(libcurl + URL https://curl.haxx.se/download/curl-7.48.0.tar.gz + URL_MD5 b2cac71029d28cb989150bac72aafab5 + BUILD_IN_SOURCE 0 + PREFIX ${CMAKE_BINARY_DIR}/deps/libcurl + CONFIGURE_COMMAND + "<SOURCE_DIR>/configure" + "--without-ssl" + "--enable-shared" + "--prefix=<INSTALL_DIR>" + ) endif() set(LIBCURL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/deps/libcurl/include) diff --git a/contrib/cmake/BuildLibEvent.cmake b/contrib/cmake/BuildLibEvent.cmake index f3bbc66..79fed51 100644 --- a/contrib/cmake/BuildLibEvent.cmake +++ b/contrib/cmake/BuildLibEvent.cmake @@ -2,17 +2,7 @@ # see http://tools.cinemapub.be/opendcp/opendcp-0.19-src/contrib/CMakeLists.txt include(ExternalProject) -if (UNIX) - externalproject_add(libevent - URL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz - URL_MD5 c4c56f986aa985677ca1db89630a2e11 - BUILD_IN_SOURCE 0 - PREFIX ${CMAKE_BINARY_DIR}/deps/libevent - CONFIGURE_COMMAND - CFLAGS=-fPIC <SOURCE_DIR>/configure --enable-static --enable-shared --disable-openssl --prefix=<INSTALL_DIR> - ) - -elseif (WIN32) +if (MSVC) externalproject_add(libevent URL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz @@ -29,6 +19,20 @@ elseif (WIN32) ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/libevent/include && ${CMAKE_COMMAND} -E copy Win32-Code/event2/event-config.h ${CMAKE_BINARY_DIR}/deps/libevent/include/event2/ ) +else () + if (UNIX) + set(FORCE_FPIC "CFLAGS=-fPIC") + endif() + + externalproject_add(libevent + URL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz + URL_MD5 c4c56f986aa985677ca1db89630a2e11 + BUILD_IN_SOURCE 0 + PREFIX ${CMAKE_BINARY_DIR}/deps/libevent + CONFIGURE_COMMAND + ${FORCE_FPIC} <SOURCE_DIR>/configure --enable-static --enable-shared --disable-openssl --prefix=<INSTALL_DIR> + ) + endif() set(LIBEVENT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/deps/libevent/include) diff --git a/contrib/cmake/BuildURIParser.cmake b/contrib/cmake/BuildURIParser.cmake index 4df11ed..b6b228b 100644 --- a/contrib/cmake/BuildURIParser.cmake +++ b/contrib/cmake/BuildURIParser.cmake @@ -1,48 +1,91 @@ include(ExternalProject) + +if (WIN32) + set(URIPARSER_LIBNAME "uriparser.lib") +elseif(UNIX) + set(URIPARSER_LIBNAME "liburiparser.a") +endif() + if (UNIX) + set(FORCE_FPIC "CFLAGS=-fPIC") + externalproject_add(uriparser URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa BUILD_IN_SOURCE 0 PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser - CONFIGURE_COMMAND - "CFLAGS=-fPIC" - "<SOURCE_DIR>/configure" + CONFIGURE_COMMAND + ${FORCE_FPIC} + "<SOURCE_DIR>/configure" "--disable-test" "--disable-doc" "--enable-static" "--prefix=<INSTALL_DIR>" ) -elseif(WIN32) - - if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - externalproject_add(uriparser - URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip - URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa - BUILD_IN_SOURCE 1 - PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser - PATCH_COMMAND - ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/contrib/patches/uriparser-vs2013 <SOURCE_DIR>/win32/uriparser-vs2013 - CONFIGURE_COMMAND "" - BUILD_COMMAND cd win32/uriparser-vs2013 && devenv /Upgrade uriparser.vcxproj && msbuild /p:Configuration=Release /p:Platform=x64 /t:build uriparser.vcxproj - INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include - ) - else() - set(VSPROJECT_PATH "win32/Visual_Studio_2005") - - externalproject_add(uriparser - URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip - URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa - BUILD_IN_SOURCE 1 - PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser - CONFIGURE_COMMAND "" - BUILD_COMMAND cd ${VSPROJECT_PATH} && devenv /Upgrade uriparser.vcproj && msbuild /p:Configuration=Release /p:Platform=Win32 /t:build uriparser.vcxproj - INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include - ) - endif() - +else() + externalproject_add(uriparser + URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip + URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa + BUILD_IN_SOURCE 1 + PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser + PATCH_COMMAND + ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/contrib/patches/uriparser/CMakeLists.txt <SOURCE_DIR> + INSTALL_COMMAND + ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && + ${CMAKE_COMMAND} -E copy ${URIPARSER_LIBNAME} ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && + ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include + ) endif() + +# +# if(MSVC) +# +# if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) +# externalproject_add(uriparser +# URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip +# URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa +# BUILD_IN_SOURCE 1 +# PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser +# PATCH_COMMAND +# ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/contrib/patches/uriparser-vs2013 <SOURCE_DIR>/win32/uriparser-vs2013 +# CONFIGURE_COMMAND "" +# BUILD_COMMAND cd win32/uriparser-vs2013 && devenv /Upgrade uriparser.vcxproj && msbuild /p:Configuration=Release /p:Platform=x64 /t:build uriparser.vcxproj +# INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include +# ) +# else() +# set(VSPROJECT_PATH "win32/Visual_Studio_2005") +# +# externalproject_add(uriparser +# URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip +# URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa +# BUILD_IN_SOURCE 1 +# PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser +# CONFIGURE_COMMAND "" +# BUILD_COMMAND cd ${VSPROJECT_PATH} && devenv /Upgrade uriparser.vcproj && msbuild /p:Configuration=Release /p:Platform=Win32 /t:build uriparser.vcxproj +# INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include +# ) +# endif() +# +# elseif(MINGW) +# # MinGW +# +# externalproject_add(uriparser +# URL http://ufpr.dl.sourceforge.net/project/uriparser/Sources/0.8.4/uriparser-0.8.4.zip +# URL_MD5 a24c9ba0fd1a2c6c75d02859bf337cfa +# BUILD_IN_SOURCE 1 +# PREFIX ${CMAKE_BINARY_DIR}/deps/uriparser +# CONFIGURE_COMMAND "" +# BUILD_COMMAND +# cd win32/MinGW && +# mingw32-make.exe +# INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/deps/uriparser/lib && ${CMAKE_COMMAND} -E copy win32/uriparser.lib ${CMAKE_BINARY_DIR}/deps/uriparser/lib/ && ${CMAKE_COMMAND} -E copy_directory include ${CMAKE_BINARY_DIR}/deps/uriparser/include +# ) +# +# else () +# +# endif() + set(URIPARSER_INCLUDE_DIR ${CMAKE_BINARY_DIR}/deps/uriparser/include) if (UNIX) diff --git a/contrib/patches/uriparser-vs2013/uriparser.vcxproj b/contrib/patches/uriparser-vs2013/uriparser.vcxproj deleted file mode 100644 index f115185..0000000 --- a/contrib/patches/uriparser-vs2013/uriparser.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{8E2F76A2-59B5-4DF7-8062-EBD6FCF0C8B3}</ProjectGuid>
- <RootNamespace>uriparser</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir>$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir>$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader />
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>..\uriparser.lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>..\uriparser.lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader />
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>..\uriparser.lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Lib>
- <OutputFile>..\uriparser.lib</OutputFile>
- </Lib>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="..\..\include\uriparser\Uri.h" />
- <ClInclude Include="..\..\include\uriparser\UriBase.h" />
- <ClInclude Include="..\..\include\uriparser\UriDefsAnsi.h" />
- <ClInclude Include="..\..\include\uriparser\UriDefsConfig.h" />
- <ClInclude Include="..\..\include\uriparser\UriDefsUnicode.h" />
- <ClInclude Include="..\..\include\uriparser\UriIp4.h" />
- <ClInclude Include="..\..\src\UriCommon.h" />
- <ClInclude Include="..\..\src\UriIp4Base.h" />
- <ClInclude Include="..\..\src\UriNormalizeBase.h" />
- <ClInclude Include="..\..\src\UriParseBase.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\src\UriCommon.c" />
- <ClCompile Include="..\..\src\UriCompare.c" />
- <ClCompile Include="..\..\src\UriEscape.c" />
- <ClCompile Include="..\..\src\UriFile.c" />
- <ClCompile Include="..\..\src\UriIp4.c" />
- <ClCompile Include="..\..\src\UriIp4Base.c" />
- <ClCompile Include="..\..\src\UriNormalize.c" />
- <ClCompile Include="..\..\src\UriNormalizeBase.c" />
- <ClCompile Include="..\..\src\UriParse.c" />
- <ClCompile Include="..\..\src\UriParseBase.c" />
- <ClCompile Include="..\..\src\UriQuery.c" />
- <ClCompile Include="..\..\src\UriRecompose.c" />
- <ClCompile Include="..\..\src\UriResolve.c" />
- <ClCompile Include="..\..\src\UriShorten.c" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/contrib/patches/uriparser/CMakeLists.txt b/contrib/patches/uriparser/CMakeLists.txt new file mode 100644 index 0000000..2c76992 --- /dev/null +++ b/contrib/patches/uriparser/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 2.8.4) +project(uriparser) + +set(BUILD_SHARED_LIBS OFF) + +include_directories(${PROJECT_SOURCE_DIR}/include) + +file(GLOB URIPARSER_FILES + ${PROJECT_SOURCE_DIR}/src/*.h + ${PROJECT_SOURCE_DIR}/src/*.c) + +add_library(uriparser ${URIPARSER_FILES}) + +# set_target_properties(uriparser PROPERTIES PREFIX "") diff --git a/docs/BUILDING.md b/docs/BUILDING.md index cf504c3..690d98e 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -20,15 +20,11 @@ For **Makefiles on Unices**, these steps essentially boil down to: $ git clone git://github.com/tklab-tud/uscxml.git $ mkdir uscxml/build && cd uscxml/build - $ cmake .. - $ make + $ cmake .. && make -On **NMake on Windows**, you may have luck to run the following from a VS2013 or VS2015 command prompt: +For **MSVC on Windows**, run form a developer command-prompt and substitute the last line above by: - $ git clone git://github.com/tklab-tud/uscxml.git - $ mkdir uscxml/build && cd uscxml/build - $ cmake -G"NMake Makefiles" .. - $ nmake + $ cmake -G "NMake Makefiles" .. && nmake <b>Note:</b> If you want to build for another IDE or build-system, just create a new *out-of-source* build directory and start over with CMake. To get an idea @@ -44,6 +40,9 @@ directory anywhere else. This only applies to the Eclipse CDT project generator. generator as it croaks when calling SWIG, just have another build directory with the "NMake Makefiles" project generator. +<b>Note:</b> In order to compile with `MinGW` on windows you will ave to adapt the build scripts in `contrib/cmake/Build*`. If you succeed, a pull request would be most appreciated. + + \section deps Build Dependencies Overview of the uSCXML dependencies. See the [Platform Notes](#platform-notes) for details. diff --git a/src/uscxml/interpreter/BasicContentExecutor.cpp b/src/uscxml/interpreter/BasicContentExecutor.cpp index 2010ae2..c1eb8f6 100644 --- a/src/uscxml/interpreter/BasicContentExecutor.cpp +++ b/src/uscxml/interpreter/BasicContentExecutor.cpp @@ -444,6 +444,9 @@ void BasicContentExecutor::invoke(XERCESC_NS::DOMElement* element) { // content std::list<DOMElement*> contents = DOMUtils::filterChildElements(XML_PREFIX(element).str() + "content", element); if (contents.size() > 0) { +#if 1 + invokeEvent.data.node = contents.front(); +#else Data d = elementAsData(contents.front()); if (d.type == Data::INTERPRETED && d.atom.size() > 0) { // immediately evaluate! @@ -451,9 +454,10 @@ void BasicContentExecutor::invoke(XERCESC_NS::DOMElement* element) { } else { invokeEvent.data = d; } +#endif } } catch (Event e) { - ERROR_EXECUTION_THROW2("Syntax error in send element content", element); + ERROR_EXECUTION_THROW2("Syntax error in invoke element content", element); } // autoforward diff --git a/src/uscxml/interpreter/FastMicroStep.cpp b/src/uscxml/interpreter/FastMicroStep.cpp index fd9f1a9..bf58f7b 100644 --- a/src/uscxml/interpreter/FastMicroStep.cpp +++ b/src/uscxml/interpreter/FastMicroStep.cpp @@ -289,19 +289,24 @@ void FastMicroStep::init(XERCESC_NS::DOMElement* scxml) { DOMNode* parent = _states[i]->element->getParentNode(); if (parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { State* uscxmlState = (State*)parent->getUserData(X("uscxmlState")); - // parent - _states[i]->parent = uscxmlState->documentOrder; + // parent maybe a content element + if (uscxmlState != NULL) { + _states[i]->parent = uscxmlState->documentOrder; + } } while(parent && parent->getNodeType() == DOMNode::ELEMENT_NODE) { State* uscxmlState = (State*)parent->getUserData(X("uscxmlState")); - // ancestors - BIT_SET_AT(uscxmlState->documentOrder, _states[i]->ancestors); + if (uscxmlState == NULL) + break; - // children - BIT_SET_AT(i, uscxmlState->children); - parent = parent->getParentNode(); + // ancestors + BIT_SET_AT(uscxmlState->documentOrder, _states[i]->ancestors); + + // children + BIT_SET_AT(i, uscxmlState->children); + parent = parent->getParentNode(); } } diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index f80d427..885f70d 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -146,7 +146,7 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) // std::cout << *document << std::endl; // TODO: where do we get the namespace from? - _invokedInterpreter = Interpreter::fromDocument(document, _interpreter->getBaseURL()); + _invokedInterpreter = Interpreter::fromDocument(document, _interpreter->getBaseURL(), false); } else { _isActive = false; |