# HG changeset patch # User Sebastien Jodogne # Date 1794751778 -3600 # Node ID 364b3b7e6fedf859af5f3a6b5e093481e9a5b8a1 # Parent 50384488da51071b74b9b256cd37ad1ad8d12fce fix build of sample plugins diff -r 50384488da51 -r 364b3b7e6fed Applications/Samples/RtViewerPlugin/CMakeLists.txt --- a/Applications/Samples/RtViewerPlugin/CMakeLists.txt Sun Nov 15 14:13:05 2026 +0100 +++ b/Applications/Samples/RtViewerPlugin/CMakeLists.txt Sun Nov 15 15:09:38 2026 +0100 @@ -112,7 +112,7 @@ # RtViewer individual files RT_VIEWER_WASM_JS ${ORTHANC_STONE_BINARIES}/RtViewerWasm.js RT_VIEWER_WASM ${ORTHANC_STONE_BINARIES}/RtViewerWasm.wasm - RT_VIEWER_WASM_APP_JS ${ORTHANC_STONE_BINARIES}/RtViewerWasmApp.js + RT_VIEWER_APP_JS ${ORTHANC_STONE_BINARIES}/app.js RT_VIEWER_INDEX_HTML ${ORTHANC_STONE_BINARIES}/index.html ) diff -r 50384488da51 -r 364b3b7e6fed Applications/Samples/RtViewerPlugin/Plugin.cpp --- a/Applications/Samples/RtViewerPlugin/Plugin.cpp Sun Nov 15 14:13:05 2026 +0100 +++ b/Applications/Samples/RtViewerPlugin/Plugin.cpp Sun Nov 15 15:09:38 2026 +0100 @@ -109,7 +109,11 @@ { OrthancPlugins::SetGlobalContext(context); - OrthancStone::InitializeStone(context); +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2) + Orthanc::Logging::InitializePluginContext(context); +#else + Orthanc::Logging::Initialize(context); +#endif /* Check the version of the Orthanc core */ if (OrthancPluginCheckVersion(context) == 0) @@ -146,8 +150,8 @@ ("/stone-rtviewer/RtViewerWasm.wasm", true); OrthancPlugins::RegisterRestCallback - > - ("/stone-rtviewer/RtViewerWasmApp.js", true); + > + ("/stone-rtviewer/app.js", true); OrthancPlugins::RegisterRestCallback > diff -r 50384488da51 -r 364b3b7e6fed OrthancStone/Sources/Platforms/Native/ThreadedOracle.cpp --- a/OrthancStone/Sources/Platforms/Native/ThreadedOracle.cpp Sun Nov 15 14:13:05 2026 +0100 +++ b/OrthancStone/Sources/Platforms/Native/ThreadedOracle.cpp Sun Nov 15 15:09:38 2026 +0100 @@ -160,6 +160,7 @@ threadPool_.SetThreadsCount(configuration.GetOracleThreadsCount()); threadPool_.SetDequeueTimeout(configuration.GetWorkersTimeResolution()); +#if ORTHANC_ENABLE_DCMTK == 1 if (configuration.GetDicomCacheSize() == 0) { LOG(WARNING) << "The DICOM cache is disabled"; @@ -170,6 +171,7 @@ << (static_cast(configuration.GetDicomCacheSize()) / static_cast(1024 * 1024)) << " MB"; dicomCache_.reset(new ParsedDicomCache(configuration.GetDicomCacheSize())); } +#endif } diff -r 50384488da51 -r 364b3b7e6fed RenderingPlugin/CMakeLists.txt --- a/RenderingPlugin/CMakeLists.txt Sun Nov 15 14:13:05 2026 +0100 +++ b/RenderingPlugin/CMakeLists.txt Sun Nov 15 15:09:38 2026 +0100 @@ -37,6 +37,9 @@ set(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") include(${CMAKE_SOURCE_DIR}/../OrthancStone/Resources/CMake/OrthancStoneParameters.cmake) + +set(ENABLE_WEB_CLIENT ON) + include(${CMAKE_SOURCE_DIR}/../OrthancStone/Resources/CMake/OrthancStoneConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake) @@ -60,8 +63,9 @@ -DHAS_ORTHANC_EXCEPTION=1 -DPLUGIN_VERSION="${PLUGIN_VERSION}" -DPLUGIN_NAME="stone-rendering" - -DORTHANC_ENABLE_SDL=OFF - -DORTHANC_ENABLE_WASM=OFF + -DORTHANC_ENABLE_SDL=0 + -DORTHANC_ENABLE_WASM=0 + -DORTHANC_STONE_TARGET_PLATFORM_NATIVE=1 ) @@ -87,6 +91,9 @@ add_library(StoneRendering SHARED Sources/OrthancPluginConnection.cpp Sources/Plugin.cpp + ../../OrthancStone/Sources/Platforms/Native/NativeEnvironment.cpp + ../../OrthancStone/Sources/Platforms/Native/GenericOracleRunner.cpp + ../../OrthancStone/Sources/Platforms/Native/ThreadedOracle.cpp ${AUTOGENERATED_SOURCES} ${CMAKE_SOURCE_DIR}/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp diff -r 50384488da51 -r 364b3b7e6fed RenderingPlugin/Sources/Plugin.cpp --- a/RenderingPlugin/Sources/Plugin.cpp Sun Nov 15 14:13:05 2026 +0100 +++ b/RenderingPlugin/Sources/Plugin.cpp Sun Nov 15 15:09:38 2026 +0100 @@ -23,6 +23,7 @@ #include "OrthancPluginConnection.h" #include "../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h" +#include "../../OrthancStone/Sources/StoneInitialization.h" #include "../../OrthancStone/Sources/Toolbox/AffineTransform2D.h" #include "../../OrthancStone/Sources/Toolbox/DicomInstanceParameters.h" #include "../../OrthancStone/Sources/Toolbox/DicomStructureSet.h" @@ -959,7 +960,7 @@ { OrthancPlugins::SetGlobalContext(context); - OrthancStone::InitializeStone(context); + OrthancStone::StoneInitialize(context); /* Check the version of the Orthanc core */ if (OrthancPluginCheckVersion(context) == 0) @@ -996,6 +997,7 @@ ORTHANC_PLUGINS_API void OrthancPluginFinalize() { + OrthancStone::StoneFinalize(); }