changeset 208:c31fc772599a

merge
author Alain Mazy <am@orthanc.team>
date Wed, 26 Jun 2024 17:56:21 +0200
parents ee2c53ebdf3e (current diff) afc642ccb99c (diff)
children af6b1f52b56d
files
diffstat 5 files changed, 52 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Aws/CMakeLists.txt	Wed Jun 26 17:55:56 2024 +0200
+++ b/Aws/CMakeLists.txt	Wed Jun 26 17:56:21 2024 +0200
@@ -41,6 +41,10 @@
 set(USE_VCPKG_PACKAGES ON CACHE BOOL "Use Microsoft vcpkg to link against crypto++ and AWS SDK")
 set(USE_SYSTEM_CRYPTOPP ON CACHE BOOL "Use the system version of crypto++")
 
+
+set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK")
+set(ORTHANC_SDK_VERSION "1.12.1" CACHE STRING "Version of the Orthanc plugin SDK to use, if not using the system version (can be \"framework\" or \"1.12.1\")")
+
 include(CheckIncludeFileCXX)
 
 # Download and setup the Orthanc framework
@@ -98,6 +102,40 @@
 include(${CMAKE_SOURCE_DIR}/../Common/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake)
 
 
+if (STATIC_BUILD OR NOT USE_SYSTEM_ORTHANC_SDK)
+  if (ORTHANC_SDK_VERSION STREQUAL "1.12.1")
+    include_directories(${CMAKE_SOURCE_DIR}/../Common/Resources/Orthanc/Sdk-1.12.1/)
+  elseif (ORTHANC_SDK_VERSION STREQUAL "framework")
+    include_directories(${ORTHANC_FRAMEWORK_ROOT}/../../OrthancServer/Plugins/Include/)
+  else()
+    message(FATAL_ERROR "Unsupported version of the Orthanc plugin SDK: ${ORTHANC_SDK_VERSION}")
+  endif()
+else ()
+  CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCPlugin.h HAVE_ORTHANC_H)
+  if (NOT HAVE_ORTHANC_H)
+    message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
+  endif()
+endif()
+
+
+if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
+  execute_process(
+    COMMAND
+    ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
+    ${PLUGIN_VERSION} "AWS S3 plugin" OrthancAwsS3Storage.dll
+    "AWS S3 plugin for Orthanc"
+    ERROR_VARIABLE Failure
+    OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/Version.rc
+    )
+
+  if (Failure)
+    message(FATAL_ERROR "Error while computing the version information: ${Failure}")
+  endif()
+
+  list(APPEND AUTOGENERATED_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/Version.rc)
+endif()
+
+
 add_definitions(
   -DHAS_ORTHANC_EXCEPTION=1
   -DORTHANC_ENABLE_LOGGING=1
@@ -107,7 +145,6 @@
 
 include_directories(
   ${CMAKE_SOURCE_DIR}/../Common/Resources/Orthanc/Plugins/
-  ${CMAKE_SOURCE_DIR}/../Common/Resources/Orthanc/Sdk-1.12.1/
   )
 
 
@@ -149,6 +186,7 @@
   ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp
 
   ${COMMON_SOURCES}
+  ${AUTOGENERATED_SOURCES}
   )
 
 set_target_properties(OrthancAwsS3Storage PROPERTIES
--- a/Aws/README.txt	Wed Jun 26 17:55:56 2024 +0200
+++ b/Aws/README.txt	Wed Jun 26 17:56:21 2024 +0200
@@ -4,7 +4,7 @@
 
 # mkdir Build
 # cd Build
-# cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_VCPKG_PACKAGES=OFF -G Ninja
+# cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_VCPKG_PACKAGES=OFF -DUSE_SYSTEM_ORTHANC_SDK=OFF -G Ninja
 # ninja
 
 
--- a/CITATION.cff	Wed Jun 26 17:55:56 2024 +0200
+++ b/CITATION.cff	Wed Jun 26 17:56:21 2024 +0200
@@ -10,5 +10,5 @@
 doi: "10.1007/s10278-018-0082-y"
 license: "GPL-3.0-or-later"
 repository-code: "https://orthanc.uclouvain.be/hg/orthanc/"
-version: 1.12.3
-date-released: 2024-01-31
+version: 1.12.4
+date-released: 2024-06-05
--- a/Common/StoragePlugin.h	Wed Jun 26 17:55:56 2024 +0200
+++ b/Common/StoragePlugin.h	Wed Jun 26 17:56:21 2024 +0200
@@ -1,5 +1,5 @@
 /**
- * Transfers accelerator plugin for Orthanc
+ * Cloud storage plugins for Orthanc
  * Copyright (C) 2018-2023 Osimis S.A., Belgium
  * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
  * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
--- a/NEWS	Wed Jun 26 17:55:56 2024 +0200
+++ b/NEWS	Wed Jun 26 17:56:21 2024 +0200
@@ -2,6 +2,12 @@
 ===============================
 
 
+2024-06-26 - v 2.4.0
+====================
+
+* Support static build of AWS plugin for GNU/Linux and Microsoft Windows
+
+
 2023-12-20 - v 2.3.1
 ====================
 
@@ -9,6 +15,7 @@
   * New configuration "EnableAwsSdkLogs" to include AWS SDK logs in Orthanc logs.
 * Now displaying size, duration and transfer speed for each read/write operation.
 
+
 2023-10-17 - v 2.3.0
 ====================
 
@@ -26,6 +33,7 @@
 
 * in /move-storage: now detecting if file should be moved or not.
 
+
 2023-07-20 - v 2.2.0
 ====================
 
@@ -35,6 +43,7 @@
 * Google plugin:
   * now using the latest google C++ sdk available with vcpkg tag 2023.06.20.
 
+
 2022-12-19 - v 2.1.2
 ====================