Mercurial > hg > orthanc-stone
comparison Applications/Samples/build-wasm-ext.sh @ 445:ee41b6a017d7 bgo-commands-codegen
dumb change
author | bgo-osimis |
---|---|
date | Wed, 16 Jan 2019 16:24:45 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
440:a750f11892ec | 445:ee41b6a017d7 |
---|---|
1 #!/bin/bash | |
2 # | |
3 # usage: | |
4 # to build all targets: | |
5 # ./build-wasm.sh | |
6 # | |
7 # to build a single target: | |
8 # ./build-wasm.sh OrthancStoneSingleFrameEditor | |
9 | |
10 set -e | |
11 | |
12 target=${1:-all} | |
13 | |
14 # we will create the output files in a "build-wasm" folder in current location | |
15 | |
16 # let's save current dir | |
17 currentDir=$(pwd) | |
18 | |
19 scriptDirRel=$(dirname $0) | |
20 #echo $scriptDirRel | |
21 scriptDirAbs=$(realpath $scriptDirRel) | |
22 echo $scriptDirAbs | |
23 | |
24 pushd | |
25 # echo "$0" | |
26 # echo $BASH_SOURCE | |
27 # echo "$BASH_SOURCE" | |
28 # scriptDir=dirname $0 | |
29 # echo "***********" | |
30 # echo "***********" | |
31 | |
32 #echo "Script folder is" | |
33 #echo "$(cd "$(dirname "$BASH_SOURCE")"; pwd)/$(basename ""$BASH_SOURCE")" | |
34 | |
35 #samplesRootDir=$(pwd) | |
36 samplesRootDir=${scriptDirAbs} | |
37 echo "samplesRootDir = " ${samplesRootDir} | |
38 | |
39 mkdir -p build-wasm | |
40 cd build-wasm | |
41 | |
42 source ~/apps/emsdk/emsdk_env.sh | |
43 cmake -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DSTONE_SOURCES_DIR=$samplesRootDir/../.. -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$samplesRootDir/../../../orthanc -DALLOW_DOWNLOADS=ON $samplesRootDir -DENABLE_WASM=ON | |
44 make -j 5 $target | |
45 | |
46 echo "-- building the web application -- " | |
47 cd ${samplesRootDir} | |
48 ./build-web-ext.sh | |
49 | |
50 popd |