# HG changeset patch # User Alain Mazy # Date 1588179630 -7200 # Node ID dd2b75ee644bde890ca56982b59d4a31138f69ef # Parent 62dc0d737e7bea0bf2b73841e4888d8e1f7568cc cleanup + build script for RtViewer diff -r 62dc0d737e7b -r dd2b75ee644b Resources/CMake/OrthancStoneConfiguration.cmake --- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 18:11:49 2020 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Wed Apr 29 19:00:30 2020 +0200 @@ -258,19 +258,6 @@ set(PLATFORM_SOURCES ${ORTHANC_STONE_ROOT}/Framework/Loaders/GenericLoadersContext.cpp ${ORTHANC_STONE_ROOT}/Framework/Loaders/GenericLoadersContext.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/DelayedCallCommand.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/DelayedCallCommand.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/Oracle.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/Oracle.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleDelayedCallExecutor.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceCommandBase.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceCommandBase.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceDeleteCommand.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceDeleteCommand.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceGetCommand.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServiceGetCommand.h - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServicePostCommand.cpp - ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServicePostCommand.h ) if (ENABLE_SDL) @@ -495,14 +482,6 @@ ) endif() -if (ENABLE_SDL OR ENABLE_WASM) -list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.cpp - ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.h - ) -endif() - - list(APPEND ORTHANC_STONE_SOURCES #${ORTHANC_STONE_ROOT}/Framework/Layers/SeriesFrameRendererFactory.cpp #${ORTHANC_STONE_ROOT}/Framework/Layers/SingleFrameRendererFactory.cpp diff -r 62dc0d737e7b -r dd2b75ee644b Samples/build-wasm-RtViewer.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Samples/build-wasm-RtViewer.sh Wed Apr 29 19:00:30 2020 +0200 @@ -0,0 +1,47 @@ +#!/bin/bash +# +# usage: +# to build the sample in Debug: +# ./build-wasm-SingleFrameViewer.sh +# +# to build the sample in Debug: +# ./build-wasm-SingleFrameViewer.sh Release + +set -e + +if [ ! -d "WebAssembly" ]; then + echo "This script must be run from the Samples folder one level below orthanc-stone" + exit 1 +fi + + +currentDir=$(pwd) +samplesRootDir=$(pwd) +devrootDir=$(pwd)/../../ + +buildType=${1:-RelWithDebInfo} +buildFolderName="$devrootDir/out/build-stone-wasm-RtViewer-$buildType" +installFolderName="$devrootDir/out/install-stone-wasm-RtViewer-$buildType" + +mkdir -p $buildFolderName +# change current folder to the build folder +pushd $buildFolderName + +# configure the environment to use Emscripten +source ~/apps/emsdk/emsdk_env.sh + +emcmake cmake -G "Ninja" \ + -DCMAKE_BUILD_TYPE=$buildType \ + -DCMAKE_INSTALL_PREFIX=$installFolderName \ + -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON \ + $samplesRootDir/WebAssembly/RtViewer + +# perform build + installation +ninja install + +# restore the original working folder +popd + +echo "If all went well, the output files can be found in $installFolderName:" + +ls $installFolderName \ No newline at end of file diff -r 62dc0d737e7b -r dd2b75ee644b Samples/build-wasm-SingleFrameViewer.sh --- a/Samples/build-wasm-SingleFrameViewer.sh Wed Apr 29 18:11:49 2020 +0200 +++ b/Samples/build-wasm-SingleFrameViewer.sh Wed Apr 29 19:00:30 2020 +0200 @@ -33,7 +33,7 @@ emcmake cmake -G "Ninja" \ -DCMAKE_BUILD_TYPE=$buildType \ -DCMAKE_INSTALL_PREFIX=$installFolderName \ - -DSTATIC_BUILD=ON -DOPENSSL_NO_CAPIENG=ON -DALLOW_DOWNLOADS=ON \ + -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON \ $samplesRootDir/WebAssembly/SingleFrameViewer # perform build + installation