annotate Applications/Samples/rt-viewer-demo/build-wasm.sh @ 1224:37bc7f115f81 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Dec 2019 18:45:37 +0100
parents 1d9deb4ee84c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
549
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 #!/bin/bash
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 #
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 # usage:
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 # build-wasm BUILD_TYPE
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
5 # where BUILD_TYPE is Debug, RelWithDebInfo or Release
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
6
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 set -e
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9 buildType=${1:-Debug}
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 currentDir=$(pwd)
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 currentDirAbs=$(realpath $currentDir)
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 mkdir -p build-wasm
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 cd build-wasm
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 source ~/apps/emsdk/emsdk_env.sh
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake \
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19 -DCMAKE_BUILD_TYPE=$buildType -DSTONE_SOURCES_DIR=$currentDirAbs/../../../../orthanc-stone \
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20 -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$currentDirAbs/../../../../orthanc \
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 -DALLOW_DOWNLOADS=ON .. -DENABLE_WASM=ON
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 ninja $target
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 echo "-- building the web application -- "
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26 cd $currentDir
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27 ./build-web.sh
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28
1d9deb4ee84c Added RTSTRUCT demo viewer based on captain + fix in dev.h (wrong override signature)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 echo "Launch start-serving-files.sh to access the web sample application locally"