annotate Applications/Samples/build-wasm.sh @ 506:801d2697a1b1 bgo-commands-codegen

Merge with am-touch-events
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 26 Feb 2019 21:33:16 +0100
parents 7cdb4634846c 33983c2178ba
children 40bb5eb247a5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
be2660b6e40a wip: commands + status update
am@osimis.io
parents: 295
diff changeset
10 set -e
be2660b6e40a wip: commands + status update
am@osimis.io
parents: 295
diff changeset
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
446
3fd8e4e5f93e changed path to emsdk (it shall now be in ~/apps instead of ~/Downloads)
Alain Mazy <alain@mazy.be>
parents: 435
diff changeset
20 source ~/apps/emsdk/emsdk_env.sh
466
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
21 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
22 -DCMAKE_BUILD_TYPE=Release \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
23 -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
24 -DORTHANC_FRAMEWORK_SOURCE=path \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
25 -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
26 -DALLOW_DOWNLOADS=ON .. \
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
27 -DENABLE_WASM=ON
5055031f4a06 - Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents: 445
diff changeset
28
461
593b8c3c02fb fix build setting + build with ninja
Alain Mazy <alain@mazy.be>
parents: 446
diff changeset
29 ninja $target
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
30
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
31 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
32 cd $currentDir
445
ee41b6a017d7 dumb change
bgo-osimis
parents: 435
diff changeset
33 ./build-web.sh