Explorar o código

Create a github action to compile under windows

Gavin Halliday %!s(int64=4) %!d(string=hai) anos
pai
achega
eb6a3c4cc7

+ 59 - 0
.github/workflows/build-windows.yml

@@ -0,0 +1,59 @@
+name: Check win32 compiles
+
+on:
+  pull_request:
+    branches:
+      - "master"
+      - "candidate-*"
+      - "!candidate-7.8.*"
+      - "!candidate-7.6.*"
+      - "!candidate-7.4.*"
+      - "!candidate-7.2.*"
+      - "!candidate-7.0.*"
+      - "!candidate-6.*"
+
+jobs:
+  build:
+    runs-on: windows-latest
+    steps:
+      - name: Display build summary
+        env:
+          OPTION: x64
+        working-directory: .
+        run: |
+          $vcpkg_root = $(get-command vcpkg | Select-Object -ExpandProperty Source | Split-Path)
+          echo Option:$Env:OPTION
+          echo "Checkout to $Env:GITHUB_WORKSPACE"
+          echo "vcpkg @$(get-command vcpkg | Select-Object -ExpandProperty Source | Split-Path)"
+          echo "vcpkg @$vcpkg_root"
+      - name: Install bison
+        working-directory: .
+        run: |
+          choco install winflexbison3 -y
+      - name: Check out source code
+        uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Setup msvc environment
+        uses: hpcc-systems/msvc-dev-cmd@v1
+      - name: Windows compilation
+        working-directory: .
+        run: |
+          mkdir build
+          cd build
+          $vcpkg_root = $(get-command vcpkg | Select-Object -ExpandProperty Source | Split-Path)
+          echo "cmake $Env:GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE=$vcpkg_root\scripts\buildsystems\vcpkg.cmake -DUSE_OPENLDAP=0 -DUSE_ICU=0 -DUSE_LIBXSLT=0 -DUSE_CBLAS=0 -DUSE_ZLIB=0 -DUSE_LIBARCHIVE=0 -DUSE_BOOST_REGEX=0 -DUSE_OPENSSL=0 -DUSE_APR=0 -DUSE_AZURE=0 -DUSE_AWS=0 -DSUPPRESS_JAVAEMBED=1 -DWSSQL_SERVICE=0 -DUSE_PYTHON3=0 -DUSE_PYTHON2=0 -DUSE_CASSANDRA=0 -DCMAKE_GENERATOR_PLATFORM=x64"
+          cmake $Env:GITHUB_WORKSPACE  -G "NMake Makefiles" -DUSE_OPENLDAP=0 -DUSE_ICU=0 -DUSE_LIBXSLT=0 -DUSE_CBLAS=0 -DUSE_ZLIB=0 -DUSE_LIBARCHIVE=0 -DUSE_BOOST_REGEX=0 -DUSE_OPENSSL=0 -DUSE_APR=0 -DUSE_AZURE=0 -DUSE_AWS=0 -DSUPPRESS_JAVAEMBED=1 -DWSSQL_SERVICE=0 -DUSE_PYTHON3=0 -DUSE_PYTHON2=0 -DUSE_CASSANDRA=0 -DUSE_TBB=0 -DUSE_JAVA=0 -DUSE_NATIVE_LIBRARIES=1 -DINCLUDE_CONFIG_MANAGER=0 -DINCLUDE_TREEVIEW=0
+          nmake /i
+#          cmake $Env:GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE=$vcpkg_root\scripts\buildsystems\vcpkg.cmake -DUSE_OPENLDAP=0 -DUSE_ICU=0 -DUSE_LIBXSLT=0 -DUSE_CBLAS=0 -DUSE_ZLIB=0 -DUSE_LIBARCHIVE=0 -DUSE_BOOST_REGEX=0 -DUSE_OPENSSL=0 -DUSE_APR=0 -DUSE_AZURE=0 -DUSE_AWS=0 -DSUPPRESS_JAVAEMBED=1 -DWSSQL_SERVICE=0 -DUSE_PYTHON3=0 -DUSE_PYTHON2=0 -DUSE_CASSANDRA=0 -DCMAKE_GENERATOR_PLATFORM=x64
+#          cmake .. -DUSE_TBB=0
+#          nmake
+#      - name: Install node
+#        working-directory: .
+#        run: |
+#          choco install nodejs -y
+#      - name: Install vcpkg dependencies
+#        working-directory: . 
+#        run: |
+#          echo install packages
+#          vcpkg install zlib

+ 13 - 7
cmake_modules/commonSetup.cmake

@@ -106,6 +106,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
   option(GENERATE_COVERAGE_INFO "Generate coverage info for gcov" OFF)
   option(USE_SIGNED_CHAR "Build system with default char type is signed" OFF)
   option(USE_UNSIGNED_CHAR "Build system with default char type is unsigned" OFF)
+  option(USE_JAVA "Include support for components that require java" ON)
   option(USE_MYSQL "Enable mysql support" ON)
   option(USE_LIBMEMCACHED "Enable libmemcached support" ON)
   option(USE_PYTHON2 "Enable python2 language support for platform build" OFF)
@@ -129,6 +130,8 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
   option(WSSQL_SERVICE "Configure use of ws_sql service" ON)
   option(USE_DIGISIGN "Use digisign" ON)
   option(INCLUDE_EE_PLUGINS "Install EE Plugins in Clienttool" OFF)
+  option(INCLUDE_TREEVIEW "Build legacy treeview" OFF)
+  option(INCLUDE_CONFIG_MANAGER "Build config manager" ON)
   set(CUSTOM_PACKAGE_SUFFIX "" CACHE STRING "Custom package suffix to differentiate development builds")
 
      MACRO(SET_PLUGIN_PACKAGE plugin)
@@ -381,16 +384,14 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
     endif ()
 
     if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
-      if (${ARCH64BIT} EQUAL 0)
-        add_definitions(/ZI)
-      else()
-        add_definitions(/Zi)
-      endif ()
+      add_definitions(/Zi)
     endif ()
     if ("${GIT_COMMAND}" STREQUAL "")
         set ( GIT_COMMAND "git.cmd" )
     endif ()
 
+    #Strip the old flag to avoid warnings about conflicting flags
+    string(REGEX REPLACE "/EH[A-Za-z]*" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
     SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
 
     if (USE_SIGNED_CHAR AND USE_UNSIGNED_CHAR )
@@ -676,8 +677,13 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
 
   IF ( NOT MAKE_DOCS_ONLY )
       IF ("${EXTERNALS_DIRECTORY}" STREQUAL "")
-        SET(bisoncmd "bison")
-        SET(flexcmd "flex")
+        IF (WIN32)
+          SET(bisoncmd "win_bison")
+          SET(flexcmd "win_flex")
+        ELSE()
+          SET(bisoncmd "bison")
+          SET(flexcmd "flex")
+        ENDIF()
       ELSE()
         IF (WIN32)
           SET(bisoncmdprefix "call")

+ 2 - 2
common/thorhelper/persistent.cpp

@@ -207,7 +207,7 @@ public:
 
     virtual void add(ISocket* sock, SocketEndpoint* ep = nullptr, PersistentProtocol proto = PersistentProtocol::ProtoTCP) override
     {
-        if (!sock || sock->OShandle() == INVALID_SOCKET)
+        if (!sock || !sock->isValid())
             return;
         PERSILOG(PersistentLogLevel::PLogMax, "PERSISTENT: adding socket %d to handler %d", sock->OShandle(), m_id);
         CriticalBlock block(m_critsect);
@@ -262,7 +262,7 @@ public:
         {
             info->useCount += usesOverOne;
             bool reachedQuota = m_maxReqs > 0 && m_maxReqs <= info->useCount;
-            if(sock->OShandle() == INVALID_SOCKET)
+            if(!sock->isValid())
                 keep = false;
             if (keep && !reachedQuota)
             {

+ 8 - 1
common/thorhelper/thorralgo.ipp

@@ -21,7 +21,11 @@
 #ifdef _USE_ICU
 #include "unicode/utf.h"
 #else
+#ifdef _WIN32
+typedef wchar_t UChar;
+#else //_WIN32
 typedef unsigned short UChar;
+#endif //_WIN32
 #endif
 #include "thorparse.ipp"
 #include "thorrparse.hpp"
@@ -296,7 +300,7 @@ protected:
     inline bool doMatch(RegexState & state);
 };
 
-
+#ifdef _USE_ICU
 class THORHELPER_API RegexUnicodePattern : public RegexPattern
 {
 public:
@@ -408,6 +412,7 @@ protected:
     MemoryAttr lower;
     MemoryAttr upper;
 };
+#endif
 
 // ---- Simple patterns ------------------------------
 
@@ -460,6 +465,7 @@ public:
 
 // ---- Simple patterns ------------------------------
 
+#ifdef _USE_ICU
 //Handles utf8 and unicode.
 class THORHELPER_API RegexUnicodeSetPattern : public RegexSetBasePattern
 {
@@ -487,6 +493,7 @@ protected:
     bool inverted;
     bool caseSensitive;
 };
+#endif
 
 // ---- Simple patterns ------------------------------
 

+ 3 - 2
common/thorhelper/thorrparse.cpp

@@ -877,6 +877,9 @@ void encodeUnicode(StringBuffer & out, size32_t len, const UChar * text)
 }
 
 
+//---------------------------------------------------------------------------
+
+#ifdef _USE_ICU
 void RegexUnicodePattern::serializePattern(MemoryBuffer & out)
 {
     RegexPattern::serializePattern(out);
@@ -931,9 +934,7 @@ RegexMatchAction RegexUnicodePattern::beginMatch(RegexState & state)
     return RegexMatchBacktrack;
 }
 
-//---------------------------------------------------------------------------
 
-#ifdef _USE_ICU
 RegexUnicodeIPattern::RegexUnicodeIPattern(unsigned _len, const UChar * _text)
 {
     UChar * curLower = (UChar *)lower.allocate(_len*2);

+ 1 - 1
common/thorhelper/thorsoapcall.cpp

@@ -2210,7 +2210,7 @@ public:
                             err.append("Failure to establish secure connection to ");
                             connUrl.getUrlString(err);
                             err.append(": OpenSSL disabled in build");
-                            throw makeStringExceptionDirect(0, err.str());
+                            throw makeStringException(0, err.str());
 #endif
 
                         }

+ 4 - 0
common/thorhelper/thorxmlread.hpp

@@ -196,7 +196,11 @@ extern thorhelper_decl ICsvToRawTransformer * createCsvRawTransformer(ICsvToRowT
 #ifdef _USE_ICU
 #include "unicode/utf.h"
 #else
+#ifdef _WIN32
+typedef wchar_t UChar;
+#else //_WIN32
 typedef unsigned short UChar;
+#endif //_WIN32
 #endif
 #endif
 

+ 4 - 2
configuration/CMakeLists.txt

@@ -14,5 +14,7 @@
 #    limitations under the License.
 ################################################################################
 
-HPCC_ADD_SUBDIRECTORY (configmgr)
-HPCC_ADD_SUBDIRECTORY (cli)
+if (INCLUDE_CONFIG_MANAGER)
+  HPCC_ADD_SUBDIRECTORY (configmgr)
+  HPCC_ADD_SUBDIRECTORY (cli)
+endif()

+ 2 - 2
dali/treeview/CMakeLists.txt

@@ -22,7 +22,7 @@
 #    Cmake Input File for treeview
 #####################################################
 
-if (WIN32)
+if (WIN32 AND INCLUDE_TREEVIEW)
     project( treeview ) 
 
     set (    SRCS 
@@ -53,5 +53,5 @@ if (WIN32)
              remote 
              dalibase 
         )
-endif (WIN32)
+endif (WIN32 AND INCLUDE_TREEVIEW)
 

+ 0 - 5
esp/bindings/http/platform/htmlpage.cpp

@@ -32,11 +32,6 @@
 #include "http/platform/httpservice.hpp"
 #include "SOAP/Platform/soapservice.hpp"
 
-//openssl
-#include <openssl/rsa.h>
-#include <openssl/crypto.h>
-
-
 #ifdef WIN32
 #define HTMLPAGE_EXPORT _declspec(dllexport)
 #else

+ 0 - 17
esp/bindings/http/platform/httpprot.cpp

@@ -34,23 +34,6 @@
 #include "http/platform/httpservice.hpp"
 #include "SOAP/Platform/soapservice.hpp"
 
-//openssl
-#include <openssl/rsa.h>
-#include <openssl/crypto.h>
-#ifndef _WIN32
-//x509.h includes evp.h, which in turn includes des.h which defines
-//crypt() that throws different exception than in unistd.h
-//(this causes build break on linux) so exclude it
-#define crypt DONT_DEFINE_CRYPT
-#include <openssl/x509.h>
-#undef  crypt
-#else
-#include <openssl/x509.h>
-#endif
-#include <openssl/ssl.h>
-#include <openssl/pem.h>
-#include <openssl/err.h>
-
 #include "securesocket.hpp"
 
 #define ESP_FACTORY DECL_EXPORT

+ 8 - 1
esp/bindings/http/platform/httptransport.cpp

@@ -2689,16 +2689,18 @@ inline bool zlibTypeFromHeader(const char* acceptEncodingHeader, int& compressTy
             zlibq = qval;
     }
 
+#ifdef _USE_ZLIB
     if (gzipq > 0 && gzipq >= deflateq && gzipq >= zlibq) //Use gzip as much as possible due to some reported browser issues with deflate
         compressType = static_cast<int>(ZlibCompressionType::GZIP);
     else if (deflateq > 0 && deflateq >= zlibq)
         compressType = static_cast<int>(ZlibCompressionType::DEFLATE);
     else if (zlibq > 0)
         compressType = static_cast<int>(ZlibCompressionType::ZLIB_DEFLATE);
-
+#endif
     return gzipq > 0 || deflateq > 0 || zlibq > 0;
 }
 
+#ifdef _USE_ZLIB
 inline const char* zlibType2Header(ZlibCompressionType zltype)
 {
     if (zltype==ZlibCompressionType::GZIP)
@@ -2710,6 +2712,7 @@ inline const char* zlibType2Header(ZlibCompressionType zltype)
     else
         return "";
 }
+#endif
 
 bool CHttpResponse::shouldCompress(int& compressType)
 {
@@ -2787,6 +2790,8 @@ bool CHttpResponse::compressContent(StringBuffer* originalContent, int compressT
     setContent(zippedContent.length(), zippedContent.toByteArray());
     addHeader(HTTP_HEADER_CONTENT_ENCODING, zlibType2Header(zlibtype));
     return true;
+#else
+    return false;
 #endif
 }
 
@@ -2844,6 +2849,8 @@ bool CHttpResponse::decompressContent(StringBuffer* originalContent, int compres
     m_content_length = m_content.length();
     removeHeader(HTTP_HEADER_CONTENT_ENCODING);
     return true;
+#else
+    return false;
 #endif
 }
 

+ 0 - 5
esp/bindings/http/platform/msgbuilder.cpp

@@ -32,11 +32,6 @@
 #include "http/platform/httpservice.hpp"
 #include "SOAP/Platform/soapservice.hpp"
 
-//openssl
-#include <openssl/rsa.h>
-#include <openssl/crypto.h>
-
-
 #ifdef WIN32
 #define MSGBUILDER_EXPORT _declspec(dllexport)
 #else

+ 1 - 1
esp/platform/espprotocol.cpp

@@ -764,7 +764,7 @@ bool checkEspConnection(IEspContext& ctx)
     ISocket* sock = req->getSocket();
     if (!sock)
         return false;
-    if (sock->OShandle() == INVALID_SOCKET)
+    if (!sock->isValid())
         return false;
     int ret = sock->wait_read(0);
     if (ret < 0)

+ 2 - 1
esp/protocols/http/CMakeLists.txt

@@ -82,7 +82,8 @@ target_link_libraries(
     jlib
     xmllib
     dalibase
-    thorhelper
+    thorhelper      # this should not be dependent on the engine helper dll
+    workunit        # neither should it be dependent on the wokunit dll
     )
 
 if(LIBMEMCACHED_FOUND)

+ 1 - 1
esp/services/ws_sql/CMakeLists.txt

@@ -22,7 +22,7 @@
 
 project(ws_sql)
 
-if(WSSQL_SERVICE)
+if(WSSQL_SERVICE AND USE_JAVA)
     find_package(Java REQUIRED)
     find_package(ANTLR REQUIRED)
 

+ 14 - 12
initfiles/CMakeLists.txt

@@ -52,15 +52,17 @@ endif ()
 
 Install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/examples DESTINATION "." COMPONENT Runtime USE_SOURCE_PERMISSIONS PATTERN ".svn" EXCLUDE )
 
-find_package(Java 1.8 COMPONENTS Development)
-set(example_java_sources examples/embed/JavaCat.java)
-set(example_java_classes ${CMAKE_CURRENT_BINARY_DIR}/JavaCat.class ${CMAKE_CURRENT_BINARY_DIR}/JavaCat\$NestedClass.class)
-add_custom_command ( OUTPUT ${example_java_classes}
-    COMMAND ${Java_JAVAC_EXECUTABLE} ${example_java_sources} -d ${CMAKE_CURRENT_BINARY_DIR} -source 1.8 -target 1.8
-    DEPENDS ${example_java_sources}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-add_custom_target(build-example-java-classes ALL
-  DEPENDS ${example_java_classes}
-)
-Install ( FILES ${example_java_classes} DESTINATION "classes" COMPONENT Runtime )
+if (USE_JAVA)
+  find_package(Java 1.8 COMPONENTS Development)
+  set(example_java_sources examples/embed/JavaCat.java)
+  set(example_java_classes ${CMAKE_CURRENT_BINARY_DIR}/JavaCat.class ${CMAKE_CURRENT_BINARY_DIR}/JavaCat\$NestedClass.class)
+  add_custom_command ( OUTPUT ${example_java_classes}
+      COMMAND ${Java_JAVAC_EXECUTABLE} ${example_java_sources} -d ${CMAKE_CURRENT_BINARY_DIR} -source 1.8 -target 1.8
+      DEPENDS ${example_java_sources}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+  )
+  add_custom_target(build-example-java-classes ALL
+    DEPENDS ${example_java_classes}
+  )
+  Install ( FILES ${example_java_classes} DESTINATION "classes" COMPONENT Runtime )
+endif ()

+ 55 - 35
lib2/CMakeLists.txt

@@ -37,32 +37,47 @@ elseif (WIN32)
     if (NOT USE_NATIVE_LIBRARIES)
       set (BOOST_REGEX_BIN "${BOOST_REGEX_LIBRARY_DIR}/${boost_regex_lib}")
     endif (NOT USE_NATIVE_LIBRARIES)
-    if (${ARCH64BIT} EQUAL 1)
-      find_file (ICU_DT_BIN "icudt57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
-      find_file (ICU_IN_BIN "icuin57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
-      find_file (ICU_UC_BIN "icuuc57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
-      set (LIB_CRYPTO_DLL "libcrypto-1_1-x64.dll")
-      find_file (OPENSSL_LIB_BIN "${LIB_CRYPTO_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win64/lib" NO_DEFAULT_PATH)
-      set (LIB_SSL_DLL "libssl-1_1-x64.dll")
-      find_file (OPENSSL_SSL_BIN "${LIB_SSL_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win64/lib" NO_DEFAULT_PATH)
-      find_file (XALAN_C_BIN "Xalan-C_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win64/bin" NO_DEFAULT_PATH)
-      find_file (XALAN_MESSAGES_BIN "XalanMessages_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win64/bin" NO_DEFAULT_PATH)
-      find_file (XERCES_C_BIN "xerces-c_3_1.dll" "${EXTERNALS_DIRECTORY}/xalan/xerces-c/win64/bin" NO_DEFAULT_PATH)
-      find_file (ZLIB_BIN "zlib.dll" "${EXTERNALS_DIRECTORY}/zlib/1.2.8/lib/Win64" NO_DEFAULT_PATH)
-    else()
-      find_file (ICU_DT_BIN "icudt57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
-      find_file (ICU_IN_BIN "icuin57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
-      find_file (ICU_UC_BIN "icuuc57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
-      set (LIB_CRYPTO_DLL "libcrypto-1_1.dll")
-      find_file (OPENSSL_LIB_BIN "${LIB_CRYPTO_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win32/lib" NO_DEFAULT_PATH)
-      set (LIB_SSL_DLL "libssl-1_1.dll")
-      find_file (OPENSSL_SSL_BIN "${LIB_SSL_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win32/lib" NO_DEFAULT_PATH)
-      find_file (XALAN_C_BIN "Xalan-C_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win32/bin" NO_DEFAULT_PATH)
-      find_file (XALAN_MESSAGES_BIN "XalanMessages_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win32/bin" NO_DEFAULT_PATH)
-      find_file (XERCES_C_BIN "xerces-c_3_1.dll" "${EXTERNALS_DIRECTORY}/xalan/xerces-c/win32/bin" NO_DEFAULT_PATH)
-      find_file (ZLIB_BIN "zlib.dll" "${EXTERNALS_DIRECTORY}/zlib/1.2.8/lib/Win32" NO_DEFAULT_PATH)
-    endif()
-
+    if (USE_NATIVE_LIBRARIES)
+      if ("${BOOST_REGEX_LIBRARIES}" STREQUAL "Boost::regex")
+        set(DYLIBS "${Boost_REGEX_LIBRARY_RELEASE}")
+      else()
+        set(DYLIBS "${BOOST_REGEX_LIBRARIES}")
+      endif()
+      list(APPEND DYLIBS ${ICU_LIBRARIES})
+      list(APPEND DYLIBS ${XALAN_LIBRARIES})
+      list(APPEND DYLIBS ${XERCES_LIBRARIES})
+      list(APPEND DYLIBS ${BINUTILS_LIBRARIES})
+      list(APPEND DYLIBS ${OPENSSL_LIBRARIES})
+      list(APPEND DYLIBS ${ZLIB_LIBRARIES})
+      list(APPEND DYLIBS ${LIBXML2_LIBRARIES})
+      list(APPEND DYLIBS ${CBLAS_LIBRARIES})
+      list(APPEND DYLIBS ${CBLAS_DEPS_LIBS})
+    else ()
+      if (${ARCH64BIT} EQUAL 1)
+        find_file (ICU_DT_BIN "icudt57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
+        find_file (ICU_IN_BIN "icuin57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
+        find_file (ICU_UC_BIN "icuuc57.dll" "${EXTERNALS_DIRECTORY}/icu/bin64" NO_DEFAULT_PATH)
+        set (LIB_CRYPTO_DLL "libcrypto-1_1-x64.dll")
+        find_file (OPENSSL_LIB_BIN "${LIB_CRYPTO_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win64/lib" NO_DEFAULT_PATH)
+        set (LIB_SSL_DLL "libssl-1_1-x64.dll")
+        find_file (OPENSSL_SSL_BIN "${LIB_SSL_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win64/lib" NO_DEFAULT_PATH)
+        find_file (XALAN_C_BIN "Xalan-C_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win64/bin" NO_DEFAULT_PATH)
+        find_file (XALAN_MESSAGES_BIN "XalanMessages_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win64/bin" NO_DEFAULT_PATH)
+        find_file (XERCES_C_BIN "xerces-c_3_1.dll" "${EXTERNALS_DIRECTORY}/xalan/xerces-c/win64/bin" NO_DEFAULT_PATH)
+        find_file (ZLIB_BIN "zlib.dll" "${EXTERNALS_DIRECTORY}/zlib/1.2.8/lib/Win64" NO_DEFAULT_PATH)
+      else()
+        find_file (ICU_DT_BIN "icudt57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
+        find_file (ICU_IN_BIN "icuin57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
+        find_file (ICU_UC_BIN "icuuc57.dll" "${EXTERNALS_DIRECTORY}/icu/bin" NO_DEFAULT_PATH)
+        set (LIB_CRYPTO_DLL "libcrypto-1_1.dll")
+        find_file (OPENSSL_LIB_BIN "${LIB_CRYPTO_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win32/lib" NO_DEFAULT_PATH)
+        set (LIB_SSL_DLL "libssl-1_1.dll")
+        find_file (OPENSSL_SSL_BIN "${LIB_SSL_DLL}" "${EXTERNALS_DIRECTORY}/openssl/1.1/win32/lib" NO_DEFAULT_PATH)
+        find_file (XALAN_C_BIN "Xalan-C_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win32/bin" NO_DEFAULT_PATH)
+        find_file (XALAN_MESSAGES_BIN "XalanMessages_1_11.dll" "${EXTERNALS_DIRECTORY}/xalan/xalan-c/win32/bin" NO_DEFAULT_PATH)
+        find_file (XERCES_C_BIN "xerces-c_3_1.dll" "${EXTERNALS_DIRECTORY}/xalan/xerces-c/win32/bin" NO_DEFAULT_PATH)
+        find_file (ZLIB_BIN "zlib.dll" "${EXTERNALS_DIRECTORY}/zlib/1.2.8/lib/Win32" NO_DEFAULT_PATH)
+      endif()
     set(DYLIBS "")
     if (NOT USE_NATIVE_LIBRARIES AND USE_BOOST_REGEX)
         list(APPEND DYLIBS ${BOOST_REGEX_BIN})
@@ -72,18 +87,23 @@ elseif (WIN32)
     list(APPEND DYLIBS ${XALAN_C_BIN} ${XALAN_MESSAGES_BIN})
     list(APPEND DYLIBS ${XERCES_C_BIN})
     list(APPEND DYLIBS ${ZLIB_BIN})
+  endif()
+
 endif()
 
 if (WIN32)
-
-   set (LIB_CRYPTO_BIN   "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/${LIB_CRYPTO_DLL}")
-   set (LIB_SSL_BIN   "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/${LIB_SSL_DLL}")
-   ADD_CUSTOM_COMMAND(
-       COMMAND ${CMAKE_COMMAND} -E copy  ${OPENSSL_LIB_BIN} ${LIB_CRYPTO_BIN}
-       COMMAND ${CMAKE_COMMAND} -E copy  ${OPENSSL_SSL_BIN} ${LIB_SSL_BIN}
-       OUTPUT  ${LIB_CRYPTO_BIN} ${LIB_SSL_BIN}
-   )
-   ADD_CUSTOM_TARGET(copy_libssl ALL DEPENDS ${LIB_CRYPTO_BIN} ${LIB_SSL_BIN})
+  if (NOT USE_NATIVE_LIBRARIES)
+    set (LIB_CRYPTO_BIN   "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/${LIB_CRYPTO_DLL}")
+    set (LIB_SSL_BIN   "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/${LIB_SSL_DLL}")
+    ADD_CUSTOM_COMMAND(
+      COMMAND ${CMAKE_COMMAND} -E copy  ${OPENSSL_LIB_BIN} ${LIB_CRYPTO_BIN}
+      COMMAND ${CMAKE_COMMAND} -E copy  ${OPENSSL_SSL_BIN} ${LIB_SSL_BIN}
+      OUTPUT  ${LIB_CRYPTO_BIN} ${LIB_SSL_BIN}
+    )
+    ADD_CUSTOM_TARGET(copy_libssl ALL DEPENDS ${LIB_CRYPTO_BIN} ${LIB_SSL_BIN})
+  else()
+    ADD_CUSTOM_TARGET(copy_libssl ALL )
+  endif()
 endif ()
 
 foreach(dylib ${DYLIBS})

+ 1 - 1
plugins/javaembed/CMakeLists.txt

@@ -25,7 +25,7 @@
 
 project(javaembed)
 
-if(JAVAEMBED)
+if(JAVAEMBED AND USE_JAVA)
     ADD_PLUGIN(javaembed PACKAGES JNI)
     if(MAKE_JAVAEMBED)
         find_package(Java 1.8 COMPONENTS Development)

+ 4 - 0
rtl/eclrtl/eclrtl.hpp

@@ -31,7 +31,11 @@
 #ifdef _USE_ICU
 #include "unicode/utf.h"
 #else
+#ifdef _WIN32
+typedef wchar_t UChar;
+#else //_WIN32
 typedef unsigned short UChar;
+#endif //_WIN32
 #endif
 #endif //CHEAP_UCHAR_DEF
 

+ 4 - 0
rtl/include/eclhelper.hpp

@@ -37,7 +37,11 @@ if the supplied pointer was not from the roxiemem heap. Usually an OwnedRoxieStr
 #ifdef _USE_ICU
 #include "unicode/utf.h"
 #else
+#ifdef _WIN32
+typedef wchar_t UChar;
+#else //_WIN32
 typedef unsigned short UChar;
+#endif //_WIN32
 #endif
 #endif
 #include "rtlconst.hpp"

+ 6 - 1
system/jlib/jsocket.cpp

@@ -481,11 +481,16 @@ public:
 
     virtual ~CSocket();
 
-    unsigned OShandle()
+    virtual unsigned OShandle() const
     {
         return (unsigned)sock;
     }
 
+    virtual bool isValid() const
+    {
+        return sock != INVALID_SOCKET;
+    }
+
 private:
 
     int closesock()

+ 2 - 1
system/jlib/jsocket.hpp

@@ -379,7 +379,7 @@ public:
 
     virtual void  close() = 0;
 
-    virtual unsigned OShandle() = 0;              // for internal use
+    virtual unsigned OShandle() const = 0;              // for internal use
     virtual size32_t avail_read() = 0;           // called after wait_read to see how much data available
 
     virtual size32_t write_multiple(unsigned num,void const**buf, size32_t *size) = 0; // same as write except writes multiple blocks
@@ -401,6 +401,7 @@ public:
     virtual bool check_connection() = 0;
 
     virtual bool isSecure() const = 0;
+    virtual bool isValid() const = 0;
 
 /*
 Exceptions raised: (when set_raise_exceptions(TRUE))

+ 6 - 1
system/security/securesocket/securesocket.cpp

@@ -317,11 +317,16 @@ public:
         m_socket->close();  
     }
 
-    virtual unsigned OShandle()              // for internal use
+    virtual unsigned OShandle() const             // for internal use
     {
         return m_socket->OShandle();
     }
 
+    virtual bool isValid() const
+    {
+        return m_socket->isValid();
+    }
+
     virtual size32_t avail_read()            // called after wait_read to see how much data available
     {
         int pending = SSL_pending(m_ssl);

+ 11 - 0
system/xmllib/xmllib_unsupported.cpp

@@ -23,3 +23,14 @@ extern IXpathContext* getXpathContext(const char * xmldoc)
 {
     throw MakeStringException(XMLERR_MissingDependency, "XSLT library unavailable");
 }
+
+extern ICompiledXpath* compileXpath(const char * xpath)
+{
+    UNIMPLEMENTED;
+}
+
+IEsdlScriptContext *createEsdlScriptContext(void * espCtx)
+{
+    UNIMPLEMENTED;
+}
+

+ 1 - 1
thorlcr/activities/piperead/thprslave.cpp

@@ -368,7 +368,7 @@ public:
             {
                 PARENT::verifyPipe();
             }
-            catch (IException *e)
+            catch (IException *)
             {
                 retcode = 0;
                 ::Release(pipeWriter->checkError());

+ 6 - 1
thorlcr/graph/thgraph.hpp

@@ -23,6 +23,11 @@
 #else
     #define graph_decl DECL_IMPORT
 #endif
+#ifdef GRAPHSLAVE_EXPORTS
+    #define graphslave_decl DECL_EXPORT
+#else
+    #define graphslave_decl DECL_IMPORT
+#endif
 
 #undef barrier
 
@@ -1194,7 +1199,7 @@ interface IThorFileCache : extends IInterface
     virtual IFileIO *lookupIFileIO(CActivityBase &activity, const char *logicalFilenae, IPartDescriptor &partDesc, IExpander *expander=nullptr) = 0;
 };
 
-extern graph_decl IDelayedFile *createDelayedFile(IFileIO *iFileIO);
+extern graphslave_decl IDelayedFile *createDelayedFile(IFileIO *iFileIO);
 
 class graph_decl CThorResourceBase : implements IThorResource, public CInterface
 {