annotate Samples/build-wasm-RtViewer.sh @ 1415:998697c5ec74

Added useProgressiveQuality flag to LoaderCache ctor
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 11 May 2020 09:50:02 +0200
parents 5d7ee14dc1eb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1396
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 #!/bin/bash
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2 #
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 # usage:
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4 # to build the sample in Debug:
1406
5d7ee14dc1eb Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents: 1396
diff changeset
5 # ./build-wasm-RtViewer.sh
1396
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6 #
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7 # to build the sample in Debug:
1406
5d7ee14dc1eb Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents: 1396
diff changeset
8 # ./build-wasm-RtViewer.sh Release
1396
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10 set -e
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
12 if [ ! -d "WebAssembly" ]; then
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
13 echo "This script must be run from the Samples folder one level below orthanc-stone"
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
14 exit 1
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
15 fi
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
16
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
17
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
18 currentDir=$(pwd)
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
19 samplesRootDir=$(pwd)
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
20 devrootDir=$(pwd)/../../
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
21
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
22 buildType=${1:-RelWithDebInfo}
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
23 buildFolderName="$devrootDir/out/build-stone-wasm-RtViewer-$buildType"
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
24 installFolderName="$devrootDir/out/install-stone-wasm-RtViewer-$buildType"
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
25
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26 mkdir -p $buildFolderName
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
27 # change current folder to the build folder
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28 pushd $buildFolderName
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
30 # configure the environment to use Emscripten
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31 source ~/apps/emsdk/emsdk_env.sh
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
33 emcmake cmake -G "Ninja" \
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
34 -DCMAKE_BUILD_TYPE=$buildType \
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
35 -DCMAKE_INSTALL_PREFIX=$installFolderName \
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
36 -DSTATIC_BUILD=ON -DALLOW_DOWNLOADS=ON \
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37 $samplesRootDir/WebAssembly/RtViewer
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39 # perform build + installation
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40 ninja install
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42 # restore the original working folder
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
43 popd
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
44
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
45 echo "If all went well, the output files can be found in $installFolderName:"
dd2b75ee644b cleanup + build script for RtViewer
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46
1406
5d7ee14dc1eb Mouse wheel handler is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents: 1396
diff changeset
47 ls $installFolderName