Mercurial > hg > orthanc-stone
annotate Applications/Samples/build-wasm.sh @ 441:56ddca73396c am-vsol-upgrade
allow null callbacks for HTTP requests
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 14 Jan 2019 11:27:26 +0100 |
parents | e641d3978856 |
children | ee41b6a017d7 3fd8e4e5f93e |
rev | line source |
---|---|
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
1 #!/bin/bash |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
2 # |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
3 # usage: |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
4 # to build all targets: |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
5 # ./build-wasm.sh |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
6 # |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
7 # to build a single target: |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
8 # ./build-wasm.sh OrthancStoneSingleFrameEditor |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
9 |
307 | 10 set -e |
11 | |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
12 target=${1:-all} |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
13 |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
14 currentDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
15 samplesRootDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
16 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
17 mkdir -p $samplesRootDir/build-wasm |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
18 cd $samplesRootDir/build-wasm |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
19 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
20 source ~/Downloads/emsdk/emsdk_env.sh |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
21 cmake -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc -DALLOW_DOWNLOADS=ON .. -DENABLE_WASM=ON |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
307
diff
changeset
|
22 make -j 5 $target |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
23 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
24 echo "-- building the web application -- " |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
25 cd $currentDir |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
26 ./build-web.sh |