annotate Applications/Samples/build-web-ext.sh @ 845:cdba0dbb4682

removed some c++11 for older compilers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Jun 2019 14:46:16 +0200
parents 4eccf698e52f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
653
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
1 #!/bin/bash
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
2
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
3 set -e
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
4
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
5 target=${1:-all}
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
6 # this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
7
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
8 currentDir=$(pwd)
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
9
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
10 scriptDirRel=$(dirname $0)
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
11 #echo $scriptDirRel
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
12 scriptDirAbs=$(realpath $scriptDirRel)
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
13 echo $scriptDirAbs
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
14
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
15 samplesRootDir=scriptDirAbs
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
16
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
17 outputDir=$samplesRootDir/build-web/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
18 mkdir -p $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
19
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
20 # files used by all single files samples
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
21 cp $samplesRootDir/Web/index.html $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
22 cp $samplesRootDir/Web/samples-styles.css $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
23
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
24 # build simple-viewer-single-file (obsolete project)
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
25 if [[ $target == "all" || $target == "OrthancStoneSimpleViewerSingleFile" ]]; then
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
26 cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
27 tsc --allowJs --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
28 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
29 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
30 fi
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
31
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
32 # build single-frame
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
33 if [[ $target == "all" || $target == "OrthancStoneSingleFrame" ]]; then
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
34 cp $samplesRootDir/Web/single-frame.html $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
35 tsc --allowJs --project $samplesRootDir/Web/single-frame.tsconfig.json
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
36 cp $currentDir/build-wasm/OrthancStoneSingleFrame.js $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
37 cp $currentDir/build-wasm/OrthancStoneSingleFrame.wasm $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
38 fi
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
39
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
40 # build single-frame-editor
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
41 if [[ $target == "all" || $target == "OrthancStoneSingleFrameEditor" ]]; then
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
42 cp $samplesRootDir/Web/single-frame-editor.html $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
43 tsc --allowJs --project $samplesRootDir/Web/single-frame-editor.tsconfig.json
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
44 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.js $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
45 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm $outputDir
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
46 fi
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
47
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
48 # build simple-viewer project
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
49 if [[ $target == "all" || $target == "OrthancStoneSimpleViewer" ]]; then
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
50 mkdir -p $outputDir/simple-viewer/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
51 cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
52 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
53 tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
54 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js $outputDir/simple-viewer/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
55 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm $outputDir/simple-viewer/
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
56 fi
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
57
4eccf698e52f Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 445
diff changeset
58 cd $currentDir