Mercurial > hg > orthanc-stone
annotate Applications/Samples/build-web.sh @ 462:d93aff4e602a am-touch-events
fix for include not found in Orthanc
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 06 Feb 2019 23:41:42 +0100 |
parents | e641d3978856 |
children | 5055031f4a06 |
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 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
2 |
307 | 3 set -e |
4 | |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
5 target=${1:-all} |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
6 # this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/ |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
7 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
8 currentDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
9 samplesRootDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
10 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
11 outputDir=$samplesRootDir/build-web/ |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
12 mkdir -p $outputDir |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
13 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
14 # files used by all single files samples |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
15 cp $samplesRootDir/Web/index.html $outputDir |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
16 cp $samplesRootDir/Web/samples-styles.css $outputDir |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
17 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
18 # build simple-viewer-single-file (obsolete project) |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
19 if [[ $target == "all" || $target == "OrthancStoneSimpleViewerSingleFile" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
20 cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
21 tsc --allowJs --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
22 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
23 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
24 fi |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
25 |
326 | 26 # build single-frame |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
27 if [[ $target == "all" || $target == "OrthancStoneSingleFrame" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
28 cp $samplesRootDir/Web/single-frame.html $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
29 tsc --allowJs --project $samplesRootDir/Web/single-frame.tsconfig.json |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
30 cp $currentDir/build-wasm/OrthancStoneSingleFrame.js $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
31 cp $currentDir/build-wasm/OrthancStoneSingleFrame.wasm $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
32 fi |
326 | 33 |
34 # build single-frame-editor | |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
35 if [[ $target == "all" || $target == "OrthancStoneSingleFrameEditor" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
36 cp $samplesRootDir/Web/single-frame-editor.html $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
37 tsc --allowJs --project $samplesRootDir/Web/single-frame-editor.tsconfig.json |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
38 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.js $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
39 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm $outputDir |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
40 fi |
326 | 41 |
319
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
42 # build simple-viewer project |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
43 if [[ $target == "all" || $target == "OrthancStoneSimpleViewer" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
44 mkdir -p $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
45 cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
46 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
47 tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
48 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
49 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
50 fi |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
51 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
52 cd $currentDir |