comparison Applications/Samples/build-web.sh @ 435:e641d3978856 am-vsol-upgrade

WasmWebService now using BaseWebService and supporting cache
author am@osimis.io
date Tue, 04 Dec 2018 11:52:43 +0100
parents 612238b3f3e8
children 5055031f4a06
comparison
equal deleted inserted replaced
434:3a8bcc45c221 435:e641d3978856
1 #!/bin/bash 1 #!/bin/bash
2 2
3 set -e 3 set -e
4 4
5 target=${1:-all}
5 # this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/ 6 # this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/
6 7
7 currentDir=$(pwd) 8 currentDir=$(pwd)
8 samplesRootDir=$(pwd) 9 samplesRootDir=$(pwd)
9 10
13 # files used by all single files samples 14 # files used by all single files samples
14 cp $samplesRootDir/Web/index.html $outputDir 15 cp $samplesRootDir/Web/index.html $outputDir
15 cp $samplesRootDir/Web/samples-styles.css $outputDir 16 cp $samplesRootDir/Web/samples-styles.css $outputDir
16 17
17 # build simple-viewer-single-file (obsolete project) 18 # build simple-viewer-single-file (obsolete project)
18 cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir 19 if [[ $target == "all" || $target == "OrthancStoneSimpleViewerSingleFile" ]]; then
19 tsc --allowJs --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json 20 cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir
20 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js $outputDir 21 tsc --allowJs --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json
21 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm $outputDir 22 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js $outputDir
23 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm $outputDir
24 fi
22 25
23 # build single-frame 26 # build single-frame
24 cp $samplesRootDir/Web/single-frame.html $outputDir 27 if [[ $target == "all" || $target == "OrthancStoneSingleFrame" ]]; then
25 tsc --allowJs --project $samplesRootDir/Web/single-frame.tsconfig.json 28 cp $samplesRootDir/Web/single-frame.html $outputDir
26 cp $currentDir/build-wasm/OrthancStoneSingleFrame.js $outputDir 29 tsc --allowJs --project $samplesRootDir/Web/single-frame.tsconfig.json
27 cp $currentDir/build-wasm/OrthancStoneSingleFrame.wasm $outputDir 30 cp $currentDir/build-wasm/OrthancStoneSingleFrame.js $outputDir
31 cp $currentDir/build-wasm/OrthancStoneSingleFrame.wasm $outputDir
32 fi
28 33
29 # build single-frame-editor 34 # build single-frame-editor
30 cp $samplesRootDir/Web/single-frame-editor.html $outputDir 35 if [[ $target == "all" || $target == "OrthancStoneSingleFrameEditor" ]]; then
31 tsc --allowJs --project $samplesRootDir/Web/single-frame-editor.tsconfig.json 36 cp $samplesRootDir/Web/single-frame-editor.html $outputDir
32 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.js $outputDir 37 tsc --allowJs --project $samplesRootDir/Web/single-frame-editor.tsconfig.json
33 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm $outputDir 38 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.js $outputDir
39 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm $outputDir
40 fi
34 41
35 # build simple-viewer project 42 # build simple-viewer project
36 mkdir -p $outputDir/simple-viewer/ 43 if [[ $target == "all" || $target == "OrthancStoneSimpleViewer" ]]; then
37 cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/ 44 mkdir -p $outputDir/simple-viewer/
38 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/ 45 cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/
39 tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json 46 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/
40 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js $outputDir/simple-viewer/ 47 tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json
41 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm $outputDir/simple-viewer/ 48 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js $outputDir/simple-viewer/
49 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm $outputDir/simple-viewer/
50 fi
42 51
43 cd $currentDir 52 cd $currentDir