Mercurial > hg > orthanc-object-storage
changeset 146:5decdf0f0ef7
trying to build aws for windows
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 20 Jun 2024 18:15:26 +0200 |
parents | 3c7e0374f28e |
children | d2ebeaa18db2 |
files | Aws/AwsStaticConfiguration.cmake Aws/CMakeLists.txt Aws/README.txt Aws/aws-sdk-cpp-1.11.178.patch Azure/CMakeLists.txt Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Google/CMakeLists.txt |
diffstat | 7 files changed, 79 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Aws/AwsStaticConfiguration.cmake Thu May 30 22:35:35 2024 +0200 +++ b/Aws/AwsStaticConfiguration.cmake Thu Jun 20 18:15:26 2024 +0200 @@ -79,11 +79,29 @@ SET(AWS_CRT_CPP_MD5 "fa2cda44386bd56f1d4609c6a54a59f9") DownloadPackage(${AWS_CRT_CPP_MD5} ${AWS_CRT_CPP_URL} "${AWS_CRT_CPP_SOURCES_DIR}") + SET(AWS_SDK_CPP_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-sdk-cpp-1.11.178) # source = https://github.com/aws/aws-sdk-cpp/archive/refs/tags/1.11.178.tar.gz SET(AWS_SDK_CPP_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-sdk-cpp-1.11.178.tar.gz") SET(AWS_SDK_CPP_MD5 "a3f45888e939bb71506e0f7eaa630e48") + +if (IS_DIRECTORY "${AWS_SDK_CPP_SOURCES_DIR}") + set(FirstRun OFF) +else() + set(FirstRun ON) +endif() + DownloadPackage(${AWS_SDK_CPP_MD5} ${AWS_SDK_CPP_URL} "${AWS_SDK_CPP_SOURCES_DIR}") +if (FirstRun) + # This is a patch for Microsoft Visual Studio 2015 + execute_process( + COMMAND ${PATCH_EXECUTABLE} -p0 -N -i + ${CMAKE_CURRENT_LIST_DIR}/aws-sdk-cpp-1.11.178.patch + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE Failure + ) +endif() + configure_file( ${AWS_SDK_CPP_SOURCES_DIR}/src/aws-cpp-sdk-core/include/aws/core/SDKConfig.h.in @@ -202,6 +220,14 @@ ${AWS_C_IO_SOURCES_DIR}/source/windows/ ${AWS_SDK_CPP_SOURCES_DIR}/src/aws-cpp-sdk-core/source/platform/windows/ ) + + set(AWSSDK_LINK_LIBRARIES + ncrypt + secur32 + shlwapi + userenv + version + ) else() list(APPEND AWS_SOURCES_SUBDIRS #${AWS_C_CAL_SOURCES_DIR}/source/unix/ @@ -223,3 +249,9 @@ ${AWS_C_COMMON_SOURCES_DIR}/source/arch/generic/cpuid.c ${AWS_CHECKSUMS_SOURCES_DIR}/source/generic/crc32c_null.c ) + + +list(REMOVE_ITEM AWS_SOURCES + # WARNING: "//" *is* important (don't replace it with "/") + ${AWS_C_IO_SOURCES_DIR}/source/windows//secure_channel_tls_handler.c + )
--- a/Aws/CMakeLists.txt Thu May 30 22:35:35 2024 +0200 +++ b/Aws/CMakeLists.txt Thu Jun 20 18:15:26 2024 +0200 @@ -27,7 +27,7 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.2") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.4") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() @@ -151,10 +151,6 @@ ${COMMON_SOURCES} ) -if (COMMAND DefineSourceBasenameForTarget) - DefineSourceBasenameForTarget(OrthancAwsS3Storage) -endif() - set_target_properties(OrthancAwsS3Storage PROPERTIES VERSION ${PLUGIN_VERSION} SOVERSION ${PLUGIN_VERSION} @@ -195,3 +191,8 @@ add_dependencies(OrthancAwsS3Storage AwsSdkCpp) add_dependencies(UnitTests AwsSdkCpp) endif() + +if (COMMAND DefineSourceBasenameForTarget) + DefineSourceBasenameForTarget(OrthancAwsS3Storage) + DefineSourceBasenameForTarget(UnitTests) +endif()
--- a/Aws/README.txt Thu May 30 22:35:35 2024 +0200 +++ b/Aws/README.txt Thu Jun 20 18:15:26 2024 +0200 @@ -12,3 +12,10 @@ =============================== # ./holy-build-box-compile.sh Release + + +MinGW +===== + +MinGW is not supported, at least not on Ubuntu <= 22.04, as AWS uses +C++17 constructions that are not available in gcc 10.x.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Aws/aws-sdk-cpp-1.11.178.patch Thu Jun 20 18:15:26 2024 +0200 @@ -0,0 +1,30 @@ +diff -urEb aws-sdk-cpp-1.11.178.orig/src/aws-cpp-sdk-core/source/utils/crypto/openssl/CryptoImpl.cpp aws-sdk-cpp-1.11.178/src/aws-cpp-sdk-core/source/utils/crypto/openssl/CryptoImpl.cpp +--- aws-sdk-cpp-1.11.178.orig/src/aws-cpp-sdk-core/source/utils/crypto/openssl/CryptoImpl.cpp 2024-06-20 17:16:09.512162194 +0200 ++++ aws-sdk-cpp-1.11.178/src/aws-cpp-sdk-core/source/utils/crypto/openssl/CryptoImpl.cpp 2024-06-20 17:16:33.863888288 +0200 +@@ -221,7 +221,7 @@ + EVP_DigestInit_ex(ctx, EVP_md5(), nullptr); + + auto currentPos = stream.tellg(); +- if (currentPos == -1) ++ if (currentPos == std::streampos(-1)) + { + currentPos = 0; + stream.clear(); +@@ -298,7 +298,7 @@ + EVP_DigestInit_ex(ctx, EVP_sha1(), nullptr); + + auto currentPos = stream.tellg(); +- if (currentPos == -1) ++ if (currentPos == std::streampos(-1)) + { + currentPos = 0; + stream.clear(); +@@ -376,7 +376,7 @@ + EVP_DigestInit_ex(ctx, EVP_sha256(), nullptr); + + auto currentPos = stream.tellg(); +- if (currentPos == -1) ++ if (currentPos == std::streampos(-1)) + { + currentPos = 0; + stream.clear();
--- a/Azure/CMakeLists.txt Thu May 30 22:35:35 2024 +0200 +++ b/Azure/CMakeLists.txt Thu Jun 20 18:15:26 2024 +0200 @@ -27,7 +27,7 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.2") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.4") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif()
--- a/Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Thu May 30 22:35:35 2024 +0200 +++ b/Common/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Thu Jun 20 18:15:26 2024 +0200 @@ -163,6 +163,8 @@ set(ORTHANC_FRAMEWORK_MD5 "d2476b9e796e339ac320b5333489bdb3") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.3") set(ORTHANC_FRAMEWORK_MD5 "975f5bf2142c22cb1777b4f6a0a614c5") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.12.4") + set(ORTHANC_FRAMEWORK_MD5 "1e61779ea4a7cd705720bdcfed8a6a73") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc
--- a/Google/CMakeLists.txt Thu May 30 22:35:35 2024 +0200 +++ b/Google/CMakeLists.txt Thu Jun 20 18:15:26 2024 +0200 @@ -27,7 +27,7 @@ set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.2") + set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "1.12.4") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif()