diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-05-13 20:41:10 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-05-13 20:41:10 (GMT) |
commit | f8e0c96fddfdd5f086e1bd973d6b0a19c39c93da (patch) | |
tree | b0f5564f4f4b5cb743d402c656986fbfa586b1a2 | |
parent | 3bf5ef5f882b9ff743deb3d821834e471354128a (diff) | |
download | uscxml-f8e0c96fddfdd5f086e1bd973d6b0a19c39c93da.zip uscxml-f8e0c96fddfdd5f086e1bd973d6b0a19c39c93da.tar.gz uscxml-f8e0c96fddfdd5f086e1bd973d6b0a19c39c93da.tar.bz2 |
Make install will work again
-rw-r--r-- | CMakeLists.txt | 255 | ||||
-rw-r--r-- | TODO.txt | 6 | ||||
-rw-r--r-- | apps/uscxml-browser.vbs | 177 | ||||
-rw-r--r-- | contrib/cmake/BuildLibCurl.cmake | 2 | ||||
-rw-r--r-- | contrib/cmake/CPackUSCXML.cmake | 186 | ||||
-rw-r--r-- | installer/description.txt | 2 | ||||
-rw-r--r-- | installer/license.txt | 36 | ||||
-rw-r--r-- | installer/nsis/uscxml-logo.bmp | bin | 0 -> 25818 bytes | |||
-rw-r--r-- | installer/packageMaker/readme.txt | 2 | ||||
-rw-r--r-- | installer/packageMaker/welcome.txt | 3 | ||||
-rw-r--r-- | src/uscxml/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/w3c/TEST-MATRIX.md | 1 |
14 files changed, 630 insertions, 54 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fd9c84..757aece 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,23 +15,77 @@ PROJECT(uscxml) # General Setup ################################################# +# where to find more cmake scripts +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/contrib/cmake) +include("${CMAKE_MODULE_PATH}/USCXMLMacros.cmake") + +# use folders in the IDEs for the various targets +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# use rpath with MacOSX +set(CMAKE_MACOSX_RPATH 1) + # specify USCXML version SET(USCXML_VERSION_MAJOR "2") SET(USCXML_VERSION_MINOR "0") SET(USCXML_VERSION_PATCH "0") SET(USCXML_VERSION ${USCXML_VERSION_MAJOR}.${USCXML_VERSION_MINOR}.${USCXML_VERSION_PATCH}) -set(CMAKE_MACOSX_RPATH 1) +# Normalize CMAKE_SYSTEM_PROCESSOR for build target +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(64BIT_HOST ON) + set(64BIT_SUFFIX "_64") +endif() + +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64") + set(CMAKE_SYSTEM_PROCESSOR "x86${64BIT_SUFFIX}") +endif() +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") + set(CMAKE_SYSTEM_PROCESSOR "x86${64BIT_SUFFIX}") +endif() +if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") + set(CMAKE_SYSTEM_PROCESSOR "x86${64BIT_SUFFIX}") +endif() + + +# determine platform id +SET(USCXML_PLATFORM_ID) +string(TOLOWER ${CMAKE_SYSTEM_NAME} CMAKE_SYSTEM_NAME_LC) +string(TOLOWER ${CMAKE_CXX_COMPILER_ID} CMAKE_CXX_COMPILER_ID_LC) +string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC) +set(USCXML_PLATFORM_ID "${CMAKE_SYSTEM_NAME_LC}-${CMAKE_SYSTEM_PROCESSOR_LC}-${CMAKE_CXX_COMPILER_ID_LC}") + +# figure out MacOSX version and C++ library +if (APPLE) + set(LIBCPP_NAME "libstdc++") # before mavericks + # get MacOSX version + execute_process( + COMMAND /usr/bin/sw_vers -productVersion + OUTPUT_VARIABLE MACOSX_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (MACOSX_VERSION) + THREE_PART_VERSION_TO_VARS( + ${MACOSX_VERSION} + MACOSX_VERSION_MAJOR + MACOSX_VERSION_MINOR + MACOSX_VERSION_PATCH) + endif() + if (MACOSX_VERSION VERSION_GREATER "10.8.99") + set(LIBCPP_NAME "libc++") # mavericks and above + # set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_FIND_ROOT_PATH}) + endif() + set(USCXML_PLATFORM_ID "${USCXML_PLATFORM_ID}-${LIBCPP_NAME}") +endif() + +if (MSVC) + set(USCXML_PLATFORM_ID "${USCXML_PLATFORM_ID}-${MSVC_VERSION}") +endif() # where do libraries and binaries go set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -# where to find more cmake scripts -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/contrib/cmake) -include("${CMAKE_MODULE_PATH}/USCXMLMacros.cmake") - # setup header include paths include_directories(src) include_directories(contrib/src) @@ -41,17 +95,9 @@ include_directories(${PROJECT_SOURCE_DIR}/contrib/src/evws) if (WIN32) include_directories(${PROJECT_SOURCE_DIR}/contrib/src/getopt) include_directories(${PROJECT_SOURCE_DIR}/contrib/src/inttypes) + set(GETOPT_FILES ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) endif() -# various options -# OPTION(BUILD_MINIMAL "Build only features mandated by specification" OFF) -# OPTION(BUILD_DM_ECMA "Build with ECMAScript datamodel" ON) -# OPTION(BUILD_DM_XPATH "Build with XPath datamodel" OFF) -# OPTION(BUILD_DM_PROLOG "Build with Prolog datamodel" OFF) -# OPTION(BUILD_DM_PROMELA "Build with Promela datamodel" OFF) -# OPTION(BUILD_DM_LUA "Build with Lua datamodel" OFF) - - ################################ # Compiler Features and Flags @@ -101,6 +147,14 @@ check_cxx_source_compiles(" check_cxx_source_compiles(" int main(){ []{}(); } " CXX_HAS_LAMBDAS) +check_cxx_source_compiles(" + class Foo { int x = 8; }; int main(){} +" CXX_HAS_MEMBER_INIT) +check_cxx_source_compiles(" + #include <list> + #include <string> + int main(){ std::list<std::string> foo = {\"a\", \"b\"}; } +" CXX_HAS_INLINE_INIT) set(CXX_MISSING_FEATURES "") if (NOT CXX_HAS_LAMBDAS) @@ -115,6 +169,13 @@ endif() if(NOT CXX_HAS_SHARED_PTR) set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} shared_ptr") endif() +if(NOT CXX_HAS_MEMBER_INIT) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} member_init") +endif() +if(NOT CXX_HAS_INLINE_INIT) + set(CXX_MISSING_FEATURES "${CXX_MISSING_FEATURES} inline_init") +endif() + if (CXX_MISSING_FEATURES) message(FATAL_ERROR "Compiler is missing required C++11 features: ${CXX_MISSING_FEATURES}") @@ -138,7 +199,6 @@ endif() # Dependent Libraries ################################################# - ################################ # Required set(USCXML_PREREQS) @@ -229,28 +289,60 @@ endif() ################################ # Optional +#swig +if (WIN32) + if(EXISTS "${PROJECT_BINARY_DIR}/../swig/") + LIST(APPEND CMAKE_PROGRAM_PATH "${PROJECT_BINARY_DIR}/../swig/") + elseif(EXISTS "${PROJECT_BINARY_DIR}/../../swig/") + LIST(APPEND CMAKE_PROGRAM_PATH "${PROJECT_BINARY_DIR}/../../swig/") + endif() + + file(GLOB POTENTIAL_SWIG "C:/Program Files/swig*" "C:/Program Files (x86)/swig*") + LIST(APPEND CMAKE_PROGRAM_PATH ${POTENTIAL_SWIG}) # swig.exe + # message(FATAL_ERROR "POTENTIAL_SWIG: ${POTENTIAL_SWIG}") + +endif() +LIST(APPEND CMAKE_PROGRAM_PATH $ENV{SWIG_DIR}) +find_package(SWIG) + + # JavaScriptCore -find_package(JSC) -if (JSC_FOUND) - set(ECMA_FOUND ON) - if (NOT APPLE) - include_directories(${JSC_INCLUDE_DIR}) +OPTION(IGNORE_JSC "Do not search for JavaScriptCore" OFF) +if (NOT IGNORE_JSC) + find_package(JSC) + if (JSC_FOUND) + set(ECMA_FOUND ON) + if (NOT APPLE) + include_directories(${JSC_INCLUDE_DIR}) + endif() + list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) endif() - list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) endif() -find_package(V8) -if (V8_FOUND) - set(ECMA_FOUND ON) - include_directories(${V8_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) +# V8 +OPTION(IGNORE_V8 "Do not search for the V8 ECMAScript implementation" OFF) +if (NOT IGNORE_V8) + find_package(V8) + if (V8_FOUND) + set(ECMA_FOUND ON) + include_directories(${V8_INCLUDE_DIR}) + list (APPEND USCXML_OPT_LIBS ${V8_LIBRARY}) + endif() endif() -find_package(Lua) -if (LUA_FOUND) - include_directories (${LUA_INCLUDE_DIR}) - include_directories(${PROJECT_SOURCE_DIR}/contrib/src/LuaBridge) - list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARIES}) +# Lua +OPTION(IGNORE_V8 "Do not search for the Lua libraries" OFF) +if (NOT IGNORE_LUA) + if (WIN32) + # LuaForWindows https://code.google.com/archive/p/luaforwindows/downloads + set(ENV{LUA_DIR} "C:/Program Files (x86)/Lua/5.1/") + endif() + find_package(Lua) + if (LUA_FOUND) + include_directories (${LUA_INCLUDE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/contrib/src/LuaBridge) + list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARIES}) + endif() endif() add_subdirectory(src/uscxml) @@ -274,20 +366,16 @@ if (NOT CMAKE_CROSSCOMPILING) add_subdirectory(test) endif() -if (WIN32) - add_executable(uscxml-browser apps/uscxml-browser.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) - add_executable(uscxml-transform apps/uscxml-transform.cpp ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) -else() - add_executable(uscxml-browser apps/uscxml-browser.cpp) - add_executable(uscxml-transform apps/uscxml-transform.cpp) -endif() - +add_executable(uscxml-browser apps/uscxml-browser.cpp ${GETOPT_FILES}) set_property(TARGET uscxml-browser PROPERTY CXX_STANDARD 11) set_property(TARGET uscxml-browser PROPERTY CXX_STANDARD_REQUIRED ON) +install_executable(TARGETS uscxml-browser COMPONENT tools) +target_link_libraries(uscxml-browser uscxml) + +add_executable(uscxml-transform apps/uscxml-transform.cpp ${GETOPT_FILES}) set_property(TARGET uscxml-transform PROPERTY CXX_STANDARD 11) set_property(TARGET uscxml-transform PROPERTY CXX_STANDARD_REQUIRED ON) - -target_link_libraries(uscxml-browser uscxml) +install_executable(TARGETS uscxml-transform COMPONENT tools) target_link_libraries(uscxml-transform uscxml uscxml_transform) @@ -312,7 +400,92 @@ endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/uscxml/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/ctest/CTestCustom.ctest.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest) +# all variables that cmake knows about # get_cmake_property(_variableNames VARIABLES) # foreach (_variableName ${_variableNames}) # message(STATUS "${_variableName}=${${_variableName}}") # endforeach() + +############################################################ +# Some concluding remarks +############################################################ +message(STATUS "") + +set(USCXML_LIBS ${USCXML_OPT_LIBS} ${USCXML_CORE_LIBS}) +list(SORT USCXML_LIBS) +message(STATUS "Linking against libraries (check if you need to export in LD_LIBRARY_PATH or PATH):") +set(SKIP_NEXT OFF) +foreach(LIBRARY ${USCXML_LIBS}) + if (LIBRARY MATCHES "debug") + if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(SKIP_NEXT ON) + endif() + elseif (LIBRARY MATCHES "optimized") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(SKIP_NEXT ON) + endif() + else() + if (NOT SKIP_NEXT) + STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}" "BUILD_DIR" LIBRARY ${LIBRARY}) + STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "SOURCE_DIR" LIBRARY ${LIBRARY}) + message(STATUS " ${LIBRARY}") + else() + set(SKIP_NEXT OFF) + endif() + endif() +endforeach() + +message(STATUS "Targets:") +message(STATUS " Available datamodels ........... : ${USCXML_DATAMODELS}") +message(STATUS " Available invokers ............. : ${USCXML_INVOKERS}") +message(STATUS " Available ioprocessors ......... : ${USCXML_IOPROCESSORS}") +message(STATUS " Available custom elements ...... : ${USCXML_ELEMENTS}") +message(STATUS " Available language bindings .... : ${USCXML_LANGUAGE_BINDINGS}") +if (BUILD_SHARED_LIBS AND BUILD_BINDINGS) + message(STATUS "") + message(STATUS " Warning: Building language bindings BUILD_SHARED_LIBS=ON") + message(STATUS " introduces runtime dependency to libuscxml") + message(STATUS "") +endif() + +message(STATUS "General information:") +message(STATUS " Build type ..................... : ${CMAKE_BUILD_TYPE} for ${USCXML_PLATFORM_ID}") +if (BUILD_SHARED_LIBS) + if (BUILD_AS_PLUGINS) + message(STATUS " Building library as ............ : SHARED with plugins") + else() + message(STATUS " Building library as ............ : SHARED without plugins") + endif() +else() + if (BUILD_AS_PLUGINS) + message(STATUS " Building library as ............ : STATIC with plugins") + else() + message(STATUS " Building library as ............ : STATIC without plugins") + endif() +endif() + +string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC) +message(STATUS " CXX Flags : " ${CMAKE_CXX_FLAGS} " " ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UC}}) +message(STATUS " C Flags : " ${CMAKE_C_FLAGS} " " ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}) + +STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}" "BUILD_DIR" REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) +STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "SOURCE_DIR" REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY}) + +STRING(REGEX REPLACE "${CMAKE_BINARY_DIR}" "BUILD_DIR" REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}" "SOURCE_DIR" REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY ${REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + +message(STATUS " Libraries will end up in ....... : " ${REL_CMAKE_LIBRARY_OUTPUT_DIRECTORY}) +message(STATUS " Binaries will end up in ........ : " ${REL_CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + + +############################################################ +# Installation / Provide package target +############################################################ + +# see contrib/cmake/CPackUSCXML.cmake +include(contrib/cmake/CPackUSCXML.cmake) + +# cmake_policy(POP) + +# This must always be last! +include(CPack) @@ -1,7 +1,9 @@ Doxygen C# / Java Bindings Plugins -Transformers +VHDL Transformer +Installer HTTPS respond element -Arraybuffers
\ No newline at end of file +Arraybuffers +No third-party dependencies in headers (run_header_compiles)
\ No newline at end of file diff --git a/apps/uscxml-browser.vbs b/apps/uscxml-browser.vbs new file mode 100644 index 0000000..fc8ea9a --- /dev/null +++ b/apps/uscxml-browser.vbs @@ -0,0 +1,177 @@ +' +' Description: VBScript/VBS open file dialog +' Compatible with most Windows platforms +' Author: wangye <pcn88 at hotmail dot com> +' Website: http://wangye.org +' +' dir is the initial directory; if no directory is +' specified "Desktop" is used. +' filter is the file type filter; format "File type description|*.ext" +' +Public Function GetOpenFileName(dir, filter) + Const msoFileDialogFilePicker = 3 + + If VarType(dir) <> vbString Or dir="" Then + dir = CreateObject( "WScript.Shell" ).SpecialFolders( "Desktop" ) + End If + + If VarType(filter) <> vbString Or filter="" Then + filter = "All files|*.*" + End If + + Dim i,j, objDialog, TryObjectNames + TryObjectNames = Array( _ + "UserAccounts.CommonDialog", _ + "MSComDlg.CommonDialog", _ + "MSComDlg.CommonDialog.1", _ + "Word.Application", _ + "SAFRCFileDlg.FileOpen", _ + "InternetExplorer.Application" _ + ) + + On Error Resume Next + Err.Clear + + For i=0 To UBound(TryObjectNames) + Set objDialog = WSH.CreateObject(TryObjectNames(i)) + If Err.Number<>0 Then + Err.Clear + Else + Exit For + End If + Next + + Select Case i + Case 0,1,2 + ' 0. UserAccounts.CommonDialog XP Only. + ' 1.2. MSComDlg.CommonDialog MSCOMDLG32.OCX must registered. + If i=0 Then + objDialog.InitialDir = dir + Else + objDialog.InitDir = dir + End If + objDialog.Filter = filter + If objDialog.ShowOpen Then + GetOpenFileName = objDialog.FileName + End If + Case 3 + ' 3. Word.Application Microsoft Office must installed. + objDialog.Visible = False + Dim objOpenDialog, filtersInArray + filtersInArray = Split(filter, "|") + Set objOpenDialog = _ + objDialog.Application.FileDialog( _ + msoFileDialogFilePicker) + With objOpenDialog + .Title = "Open File(s):" + .AllowMultiSelect = False + .InitialFileName = dir + .Filters.Clear + For j=0 To UBound(filtersInArray) Step 2 + .Filters.Add filtersInArray(j), _ + filtersInArray(j+1), 1 + Next + If .Show And .SelectedItems.Count>0 Then + GetOpenFileName = .SelectedItems(1) + End If + End With + objDialog.Visible = True + objDialog.Quit + Set objOpenDialog = Nothing + Case 4 + ' 4. SAFRCFileDlg.FileOpen xp 2003 only + ' See http://www.robvanderwoude.com/vbstech_ui_fileopen.php + If objDialog.OpenFileOpenDlg Then + GetOpenFileName = objDialog.FileName + End If + Case 5 + + Dim IEVersion,IEMajorVersion, hasCompleted + hasCompleted = False + Dim shell + Set shell = CreateObject("WScript.Shell") + ' 下面获取IE版本 + IEVersion = shell.RegRead( _ + "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version") + If InStr(IEVersion,".")>0 Then + ' 获取主版本号 + IEMajorVersion = CInt(Left(IEVersion, InStr(IEVersion,".")-1)) + If IEMajorVersion>7 Then + ' 如果版本号大于7,也就是大于IE7,则采取MSHTA方案 + ' Bypasses c:\fakepath\file.txt problem + ' http://pastebin.com/txVgnLBV + Dim fso + Set fso = CreateObject("Scripting.FileSystemObject") + + Dim tempFolder : Set tempFolder = fso.GetSpecialFolder(2) + Dim tempName : tempName = fso.GetTempName() + Dim tempFile : Set tempFile = tempFolder.CreateTextFile(tempName & ".hta") + Dim tempBaseName + tempBaseName = tempFolder & "\" & tempName + tempFile.Write _ + "<html>" & _ + " <head>" & _ + " <title>Browse</title>" & _ + " </head>" & _ + " <body>" & _ + " <input type='file' id='f'>" & _ + " <script type='text/javascript'>" & _ + " var f = document.getElementById('f');" & _ + " f.click();" & _ + " var fso = new ActiveXObject('Scripting.FileSystemObject');" & _ + " var file = fso.OpenTextFile('" & _ + Replace(tempBaseName,"\", "\\") & ".txt" & "', 2, true);" & _ + " file.Write(f.value);" & _ + " file.Close();" & _ + " window.close();" & _ + " </script>" & _ + " </body>" & _ + "</html>" + tempFile.Close + Set tempFile = Nothing + Set tempFolder = Nothing + shell.Run tempBaseName & ".hta", 1, True + Set tempFile = fso.OpenTextFile(tempBaseName & ".txt", 1) + GetOpenFileName = tempFile.ReadLine + tempFile.Close + fso.DeleteFile tempBaseName & ".hta" + fso.DeleteFile tempBaseName & ".txt" + Set tempFile = Nothing + Set fso = Nothing + hasCompleted = True ' 标记为已完成 + End If + End If + If Not hasCompleted Then + ' 5. InternetExplorer.Application IE must installed + objDialog.Navigate "about:blank" + Dim objBody, objFileDialog + Set objBody = _ + objDialog.document.getElementsByTagName("body")(0) + objBody.innerHTML = "<input type='file' id='fileDialog'>" + while objDialog.Busy Or objDialog.ReadyState <> 4 + WScript.sleep 10 + Wend + Set objFileDialog = objDialog.document.all.fileDialog + objFileDialog.click + GetOpenFileName = objFileDialog.value + End If + objDialog.Quit + Set objFileDialog = Nothing + Set objBody = Nothing + Set shell = Nothing + Case Else + ' Sorry I cannot do that! + End Select + + Set objDialog = Nothing +End Function + +scxmlFile = GetOpenFileName(CreateObject("WScript.Shell").SpecialFolders("MyDocuments"), "All Files|*.*|SCXML Files|*.scxml") + +if scxmlFile <> "" then + set wshShell = WScript.CreateObject("WScript.Shell") + set objFs = WScript.CreateObject("Scripting.FileSystemObject") + wshShell.CurrentDirectory = objFs.GetParentFolderName(Wscript.ScriptFullName) +' WScript.Echo scxmlFile + wshShell.Run("mmi-browser.exe """ & scxmlFile & """") +end if
\ No newline at end of file diff --git a/contrib/cmake/BuildLibCurl.cmake b/contrib/cmake/BuildLibCurl.cmake index 4682a65..61e998a 100644 --- a/contrib/cmake/BuildLibCurl.cmake +++ b/contrib/cmake/BuildLibCurl.cmake @@ -57,7 +57,7 @@ elseif (WIN32) PREFIX ${CMAKE_BINARY_DIR}/deps/libcurl CONFIGURE_COMMAND "" BUILD_COMMAND cd winbuild && nmake /f Makefile.vc mode=static MACHINE=x86 VC=${VC_VERSION} - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory builds/libcurl-vc-x86-release-static-ipv6-sspi-winssl ${CMAKE_BINARY_DIR}/deps/libcurl/ + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory builds/libcurl-vc${VC_VERSION}-x86-release-static-ipv6-sspi-winssl ${CMAKE_BINARY_DIR}/deps/libcurl/ ) endif() endif() diff --git a/contrib/cmake/CPackUSCXML.cmake b/contrib/cmake/CPackUSCXML.cmake new file mode 100644 index 0000000..1e61b1b --- /dev/null +++ b/contrib/cmake/CPackUSCXML.cmake @@ -0,0 +1,186 @@ +# see: http://www.vtk.org/Wiki/CMake:CPackConfiguration + +############################################################################## +# gather host-native libraries +############################################################################## + +# these are all the host-native libraries +file(GLOB_RECURSE PLATFORM_LIBS + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.a + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.so + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.lib + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dylib + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.jnilib + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.dll + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.pdb +# ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*.exp +) + +# sort host-native libraries into installation components +foreach(PLATFORM_LIB ${PLATFORM_LIBS}) +# message("PLATFORM_LIB: ${PLATFORM_LIB}") + install(FILES ${PLATFORM_LIB} DESTINATION lib COMPONENT library) + list (APPEND USCXML_CPACK_COMPONENTS "library") +endforeach() + +############################################################ +# Header Files +############################################################ + +file(GLOB_RECURSE USCXML_HEADERS + ${PROJECT_SOURCE_DIR}/src/*.h + ${PROJECT_SOURCE_DIR}/src/*.hpp) +list(APPEND CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/uscxml/config.h") + +INSTALL_HEADERS(HEADERS ${USCXML_HEADERS} COMPONENT headers) + + +######################################## +# VBS wrappers +######################################## + +if (WIN32) + install( + FILES ${PROJECT_SOURCE_DIR}/apps/uscxml-browser.vbs + DESTINATION bin + COMPONENT tools + PERMISSIONS WORLD_EXECUTE OWNER_EXECUTE GROUP_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ # 755 + ) +endif() + +######################################## +# Include documentation +######################################## + +# file(GLOB_RECURSE HTML_DOCS ${PROJECT_SOURCE_DIR}/docs/html/*) +# foreach(HTML_DOC ${HTML_DOCS}) +# STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/" "" HTML_PATH ${HTML_DOC}) +# STRING(REGEX MATCH "(.*)[/\\]" HTML_PATH ${HTML_PATH}) +# install(FILES ${HTML_DOC} DESTINATION share/uscxml/${HTML_PATH} COMPONENT docs) +# list (APPEND USCXML_CPACK_COMPONENTS "docs") +# # message(STATUS ${HTML_PATH}) +# endforeach() + + +list (APPEND USCXML_CPACK_COMPONENTS "headers") + +if (NOT CMAKE_CROSS_COMPILING) + list (APPEND USCXML_CPACK_COMPONENTS "tools") +endif() +list (REMOVE_DUPLICATES USCXML_CPACK_COMPONENTS) + +# message("USCXML_CPACK_COMPONENTS: ${USCXML_CPACK_COMPONENTS}") + +######################################## +# Configure packagers +######################################## + +if (UNIX) + if (APPLE) + set(CPACK_GENERATOR "PackageMaker;TGZ") + else() + set(CPACK_GENERATOR "DEB;RPM;TGZ") + endif() + set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") +endif() +if (WIN32) + set(CPACK_GENERATOR "NSIS;ZIP") + set(CPACK_PACKAGE_INSTALL_DIRECTORY "uscxml") + # pairs of executables and labels for start menu + set(CPACK_NSIS_MENU_LINKS + " ;uSCXML SDK" + "bin\\\\uscxml-browser.vbs;uSCXML Browser") + +endif() + +set(CPACK_PACKAGE_NAME "uscxml") +set(CPACK_PACKAGE_VENDOR "Telecooperation Group - TU Darmstadt") +set(CPACK_PACKAGE_CONTACT "radomski@tk.tu-darmstadt.de") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "USCXML - state-chart interpreter") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/installer/description.txt") +set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/installer/license.txt") + +set(CPACK_PACKAGE_VERSION "${USCXML_VERSION_MAJOR}.${USCXML_VERSION_MINOR}.${USCXML_VERSION_PATCH}") +set(CPACK_PACKAGE_VERSION_MAJOR ${USCXML_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${USCXML_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${USCXML_VERSION_PATCH}) + +if (64BIT_HOST AND WIN32) + set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME_LC}-${CMAKE_SYSTEM_PROCESSOR}_64-${CPACK_PACKAGE_VERSION}") +else() + set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME_LC}-${CMAKE_SYSTEM_PROCESSOR}-${CPACK_PACKAGE_VERSION}") +endif() + +### +# Configuration for NSIS installer on Win32 +# +# pairs of executables and labels for start menu +#CPACK_PACKAGE_EXECUTABLES +set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "uscxml.telecooperation.tu-darmstadt") +if (WIN32) + set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}\\\\installer\\\\nsis\\\\uscxml-logo.bmp") +else() + set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/installer/nsis/uscxml-logo.bmp") +endif() + +### +# Configuration for PackageMaker on MacOSX +# +set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/installer/packageMaker/readme.txt") +set(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/installer/packageMaker/welcome.txt") + +### +# Configuration for debian packages +# +set(CPACK_DEBIAN_PACKAGE_NAME "uscxml") +# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcurl4-openssl, libxml2") +# set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "swig2.0, protobuf-compiler") + +### +# Configuration for RPM packages +# +set(CPACK_RPM_PACKAGE_NAME "uscxml") +set(CPACK_RPM_PACKAGE_LICENSE "Simplified BSD") + + +######################################## +# Describe layout of package +######################################## + +set(CPACK_COMPONENTS_ALL + ${USCXML_CPACK_COMPONENTS} +) + +### +# Description of components +# + +list(FIND USCXML_CPACK_COMPONENTS "tools" FOUND_ITEM) +if (FOUND_ITEM GREATER -1) + set(CPACK_COMPONENT_TOOLS_DISPLAY_NAME "Command-line Tools") + set(CPACK_COMPONENT_TOOLS_DESCRIPTION "Command-line tools to debug and monitor a uSCXML network.") +endif() + + +list(FIND USCXML_CPACK_COMPONENTS "docs" FOUND_ITEM) +if (FOUND_ITEM GREATER -1) + set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation") + set(CPACK_COMPONENT_DOCS_DESCRIPTION "Auto-generated documentation.") +endif() + + +list(FIND USCXML_CPACK_COMPONENTS "library" FOUND_ITEM) +if (FOUND_ITEM GREATER -1) + # define header description here as well + set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers ") + set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C++ header files for uSCXML and all its components.") + set(CPACK_COMPONENT_HEADERS_GROUP "Development") + + set(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "C++ uSCXML libraries") + set(CPACK_COMPONENT_LIBRARY_DESCRIPTION "Static libraries of the uSCXML components for C++ development.") + set(CPACK_COMPONENT_LIBRARY_GROUP "Development") + set(CPACK_COMPONENT_LIBRARY_DEPENDS headers) + set(CPACK_COMPONENT_LIBRARY_DEPENDS libraryPrebuilt) +endif() + +set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Libraries and Headers for uSCXML.") diff --git a/installer/description.txt b/installer/description.txt new file mode 100644 index 0000000..f66ba41 --- /dev/null +++ b/installer/description.txt @@ -0,0 +1,2 @@ +uSCXML is an SCXML interpreter and transformer written in C/C++. It is standards compliant and easily extended even in C# and Java. The interpreter itself runs on Linux, Windows, Raspberry Pi and Mac OSX, each 32- as well as 64Bits as well as iOS. The generated native code transformed from an SCXML document runs on virtually any platform. + diff --git a/installer/license.txt b/installer/license.txt new file mode 100644 index 0000000..1e4b71f --- /dev/null +++ b/installer/license.txt @@ -0,0 +1,36 @@ +Simplified BSD License + +Copyright (c) 2012-2016, Telecooperation Group - TU Darmstadt All +rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. 2. +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation +are those of the authors and should not be interpreted as representing +official policies, either expressed or implied, of the Telecooperation +Group. + +IMPORTANT! + +Please note that the various implementations used in uSCXML come with +their own licenses and are only packaged as a matter of convenience. diff --git a/installer/nsis/uscxml-logo.bmp b/installer/nsis/uscxml-logo.bmp Binary files differnew file mode 100644 index 0000000..e2375f8 --- /dev/null +++ b/installer/nsis/uscxml-logo.bmp diff --git a/installer/packageMaker/readme.txt b/installer/packageMaker/readme.txt new file mode 100644 index 0000000..42cdae8 --- /dev/null +++ b/installer/packageMaker/readme.txt @@ -0,0 +1,2 @@ +Documentation and guides are available on github at: +https://github.com/tklab-tud/umundo
\ No newline at end of file diff --git a/installer/packageMaker/welcome.txt b/installer/packageMaker/welcome.txt new file mode 100644 index 0000000..039b185 --- /dev/null +++ b/installer/packageMaker/welcome.txt @@ -0,0 +1,3 @@ +This package will install the uMundo publish/subscribe implementation +for MacOSX along with all libraries for cross-compilation on Android +and iOS.
\ No newline at end of file diff --git a/src/uscxml/CMakeLists.txt b/src/uscxml/CMakeLists.txt index 5549b84..3497b18 100644 --- a/src/uscxml/CMakeLists.txt +++ b/src/uscxml/CMakeLists.txt @@ -74,10 +74,10 @@ add_subdirectory(plugins/datamodel) add_subdirectory(plugins/invoker) add_subdirectory(plugins/ioprocessor) -# SET(USCXML_INVOKERS ${USCXML_INVOKERS} PARENT_SCOPE) -# SET(USCXML_IOPROCESSORS ${USCXML_IOPROCESSORS} PARENT_SCOPE) -# SET(USCXML_ELEMENTS ${USCXML_ELEMENTS} PARENT_SCOPE) -# SET(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE) +SET(USCXML_INVOKERS ${USCXML_INVOKERS} PARENT_SCOPE) +SET(USCXML_IOPROCESSORS ${USCXML_IOPROCESSORS} PARENT_SCOPE) +SET(USCXML_ELEMENTS ${USCXML_ELEMENTS} PARENT_SCOPE) +SET(USCXML_DATAMODELS ${USCXML_DATAMODELS} PARENT_SCOPE) # SET(USCXML_LANGUAGE_BINDINGS ${USCXML_LANGUAGE_BINDINGS} PARENT_SCOPE) # # set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) diff --git a/src/uscxml/plugins/datamodel/CMakeLists.txt b/src/uscxml/plugins/datamodel/CMakeLists.txt index b004a33..c597acc 100644 --- a/src/uscxml/plugins/datamodel/CMakeLists.txt +++ b/src/uscxml/plugins/datamodel/CMakeLists.txt @@ -47,8 +47,6 @@ if (LUA_FOUND) list (APPEND USCXML_OPT_LIBS ${LUA_LIBRARY}) endif() - -find_package(SWIG) if (NOT SWIG_FOUND) message(STATUS "No swig binary found, not generating DOM classes") elseif(SWIG_VERSION VERSION_LESS 3.0.8) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 53f2b79..7343809 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,10 +1,6 @@ set(TEST_TIMEOUT 15) set(TEST_BENCHMARK_ITERATIONS 1000) -if (WIN32) - set(GETOPT_FILES ${PROJECT_SOURCE_DIR}/contrib/src/getopt/getopt.c) -endif() - find_program(SPIN spin) find_program(CC gcc) find_program(CXX g++) diff --git a/test/w3c/TEST-MATRIX.md b/test/w3c/TEST-MATRIX.md index 7c8abf0..9fe3509 100644 --- a/test/w3c/TEST-MATRIX.md +++ b/test/w3c/TEST-MATRIX.md @@ -2451,3 +2451,4 @@ <td>`N/A`</td> <td>`N/A`</td> </tr> +</table>
\ No newline at end of file |