# HG changeset patch # User Sebastien Jodogne # Date 1597683503 -7200 # Node ID b894072b9e2f2c0078290aff2f0ff120694bede6 # Parent 6d14ed6163b18d48ca0260e58a91bb7e17ee3309 static JavaScript resources diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/Plugin/CMakeLists.txt --- a/Applications/StoneWebViewer/Plugin/CMakeLists.txt Mon Aug 17 16:10:00 2020 +0200 +++ b/Applications/StoneWebViewer/Plugin/CMakeLists.txt Mon Aug 17 18:58:23 2020 +0200 @@ -71,6 +71,9 @@ # Folders IMAGES ${ORTHANC_STONE_BINARIES}/img/ WEB_APPLICATION ${CMAKE_SOURCE_DIR}/../WebApplication + LIBRARIES_CSS ${ORTHANC_STONE_BINARIES}/css/ + LIBRARIES_JS ${ORTHANC_STONE_BINARIES}/js/ + LIBRARIES_WEBFONTS ${ORTHANC_STONE_BINARIES}/webfonts/ # Individual files ORTHANC_EXPLORER ${CMAKE_SOURCE_DIR}/OrthancExplorer.js diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/Plugin/Plugin.cpp --- a/Applications/StoneWebViewer/Plugin/Plugin.cpp Mon Aug 17 16:10:00 2020 +0200 +++ b/Applications/StoneWebViewer/Plugin/Plugin.cpp Mon Aug 17 18:58:23 2020 +0200 @@ -206,6 +206,18 @@ OrthancPlugins::RegisterRestCallback > ("/stone-webviewer/img/(.*)", true); + + OrthancPlugins::RegisterRestCallback + > + ("/stone-webviewer/css/(.*)", true); + + OrthancPlugins::RegisterRestCallback + > + ("/stone-webviewer/js/(.*)", true); + + OrthancPlugins::RegisterRestCallback + > + ("/stone-webviewer/webfonts/(.*)", true); OrthancPlugins::RegisterRestCallback > diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Mon Aug 17 16:10:00 2020 +0200 +++ b/Applications/StoneWebViewer/WebApplication/index.html Mon Aug 17 18:58:23 2020 +0200 @@ -8,9 +8,11 @@ - - + + + + @@ -310,19 +312,19 @@
@@ -546,10 +548,10 @@ - - - - + + + + diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/WebAssembly/CMakeLists.txt --- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Mon Aug 17 16:10:00 2020 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Mon Aug 17 18:58:23 2020 +0200 @@ -117,6 +117,8 @@ # section above: it is considered to be the binary output of # the linker. # --------------------------------------------------------------- +include(${CMAKE_SOURCE_DIR}/JavaScriptLibraries.cmake) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/StoneWebViewer.wasm diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/WebAssembly/JavaScriptLibraries.cmake --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Applications/StoneWebViewer/WebAssembly/JavaScriptLibraries.cmake Mon Aug 17 18:58:23 2020 +0200 @@ -0,0 +1,63 @@ +set(BASE_URL "http://orthanc.osimis.io/ThirdPartyDownloads") + +DownloadPackage( + "f9746611d1d77072f5ce5a1d9e915c42" + "${BASE_URL}/fontawesome-free-5.14.0-web.zip" + "${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web") + +DownloadPackage( + "b40f2ec8769ebee23a395fa2b907e4b4" + "${BASE_URL}/bootstrap-3.4.1-dist.zip" + "${CMAKE_CURRENT_BINARY_DIR}/bootstrap-3.4.1-dist") + +DownloadPackage( + "8242afdc5bd44105d9dc9e6535315484" + "${BASE_URL}/dicom-web/vuejs-2.6.10.tar.gz" + "${CMAKE_CURRENT_BINARY_DIR}/vue-2.6.10") + +DownloadPackage( + "3e2b4e1522661f7fcf8ad49cb933296c" + "${BASE_URL}/dicom-web/axios-0.19.0.tar.gz" + "${CMAKE_CURRENT_BINARY_DIR}/axios-0.19.0") + +DownloadFile( + "220afd743d9e9643852e31a135a9f3ae" + "${BASE_URL}/jquery-3.4.1.min.js") + + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/css/all.css + ${CMAKE_CURRENT_BINARY_DIR}/bootstrap-3.4.1-dist/css/bootstrap.css + DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/css + ) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/bootstrap-3.4.1-dist/js/bootstrap.min.js + ${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/jquery-3.4.1.min.js + ${CMAKE_CURRENT_BINARY_DIR}/vue-2.6.10/dist/vue.min.js + ${CMAKE_CURRENT_BINARY_DIR}/axios-0.19.0/dist/axios.min.js + ${CMAKE_CURRENT_BINARY_DIR}/axios-0.19.0/dist/axios.min.map + DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/js + ) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-brands-400.eot + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-brands-400.svg + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-brands-400.ttf + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-brands-400.woff + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-brands-400.woff2 + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-regular-400.eot + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-regular-400.svg + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-regular-400.ttf + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-regular-400.woff + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-regular-400.woff2 + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-solid-900.eot + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-solid-900.svg + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-solid-900.ttf + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-solid-900.woff + ${CMAKE_CURRENT_BINARY_DIR}/fontawesome-free-5.14.0-web/webfonts/fa-solid-900.woff2 + DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/webfonts + ) diff -r 6d14ed6163b1 -r b894072b9e2f Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt --- a/Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt Mon Aug 17 16:10:00 2020 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt Mon Aug 17 18:58:23 2020 +0200 @@ -44,6 +44,7 @@ include(${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Resources/Orthanc/CMake/Compiler.cmake) +include(${CMAKE_SOURCE_DIR}/../../../../OrthancStone/Resources/Orthanc/CMake/DownloadPackage.cmake) add_definitions( -DORTHANC_STONE_MAX_TAG_LENGTH=256 # TODO => share with OrthancStone