Mercurial > hg > orthanc-stone
annotate Applications/Samples/build-web.sh @ 1327:4f8db2d202c8 broker
OrthancSeriesProgressiveLoader now has two modes that
can be selected at object creation :
- progressive (will first load jpeg50, then jpeg90 then PAM)
- non-progressive (will directly load PAM (uncompressed))
Please note that the slice loading order remains dynamic
and depending upon the slice that the client code wishes
to extract from the volume.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 25 Mar 2020 14:34:27 +0100 |
parents | f417a0ae282b |
children |
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 |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
11 echo "*************************************************************************" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
12 echo "samplesRootDir = $samplesRootDir" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
13 echo "*************************************************************************" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
14 |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
15 outputDir=$samplesRootDir/build-web/ |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
16 mkdir -p "$outputDir" |
295
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 # files used by all single files samples |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
19 cp "$samplesRootDir/Web/index.html" "$outputDir" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
20 cp "$samplesRootDir/Web/samples-styles.css" "$outputDir" |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
21 |
1190 | 22 # # build simple-viewer-single-file (obsolete project) |
23 # if [[ $target == "all" || $target == "OrthancStoneSimpleViewerSingleFile" ]]; then | |
24 # cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir | |
25 # tsc --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json --outDir "$outputDir" | |
26 # browserify \ | |
27 # "$outputDir/Platforms/Wasm/wasm-application-runner.js" \ | |
28 # "$outputDir/Applications/Samples/Web/simple-viewer-single-file.js" \ | |
29 # -o "$outputDir/app-simple-viewer-single-file.js" | |
30 # cp "$currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js" $outputDir | |
31 # cp "$currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm" $outputDir | |
32 # 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
|
33 |
1190 | 34 # # build single-frame |
35 # if [[ $target == "all" || $target == "OrthancStoneSingleFrame" ]]; then | |
36 # cp $samplesRootDir/Web/single-frame.html $outputDir | |
37 # tsc --project $samplesRootDir/Web/single-frame.tsconfig.json --outDir "$outputDir" | |
38 # browserify \ | |
39 # "$outputDir/Platforms/Wasm/wasm-application-runner.js" \ | |
40 # "$outputDir/Applications/Samples/Web/single-frame.js" \ | |
41 # -o "$outputDir/app-single-frame.js" | |
42 # cp "$currentDir/build-wasm/OrthancStoneSingleFrame.js" $outputDir | |
43 # cp "$currentDir/build-wasm/OrthancStoneSingleFrame.wasm" $outputDir | |
44 # fi | |
326 | 45 |
46 # build single-frame-editor | |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
47 if [[ $target == "all" || $target == "OrthancStoneSingleFrameEditor" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
48 cp $samplesRootDir/Web/single-frame-editor.html $outputDir |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
49 tsc --project $samplesRootDir/Web/single-frame-editor.tsconfig.json --outDir "$outputDir" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
50 browserify \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
51 "$outputDir/Platforms/Wasm/wasm-application-runner.js" \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
52 "$outputDir/Applications/Samples/Web/single-frame-editor.js" \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
53 -o "$outputDir/app-single-frame-editor.js" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
54 cp "$currentDir/build-wasm/OrthancStoneSingleFrameEditor.js" $outputDir |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
55 cp "$currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm" $outputDir |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
56 fi |
326 | 57 |
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
|
58 # build simple-viewer project |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
59 if [[ $target == "all" || $target == "OrthancStoneSimpleViewer" ]]; then |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
60 mkdir -p $outputDir/simple-viewer/ |
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
61 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
|
62 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/ |
466
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
63 |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
64 # the root dir must contain all the source files for the whole project |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
65 tsc --module commonjs --allowJs --project "$samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json" --rootDir "$samplesRootDir/../.." --outDir "$outputDir/simple-viewer/" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
66 browserify \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
67 "$outputDir/simple-viewer/Platforms/Wasm/wasm-application-runner.js" \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
68 "$outputDir/simple-viewer/Applications/Samples/SimpleViewer/Wasm/simple-viewer.js" \ |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
69 -o "$outputDir/simple-viewer/app-simple-viewer.js" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
70 cp "$currentDir/build-wasm/OrthancStoneSimpleViewer.js" "$outputDir/simple-viewer/" |
5055031f4a06
- Added browserify to build. This allows using require calls for modules that
bgo-osimis
parents:
435
diff
changeset
|
71 cp "$currentDir/build-wasm/OrthancStoneSimpleViewer.wasm" "$outputDir/simple-viewer/" |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
326
diff
changeset
|
72 fi |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
73 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
74 cd $currentDir |