Mercurial > hg > orthanc-stone
annotate Applications/Samples/build-web.sh @ 400:518f680dbf2e
SliceViewerWidget::DisplayedSliceMessage
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 10 Nov 2018 09:58:45 +0100 |
parents | 612238b3f3e8 |
children | e641d3978856 |
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 | |
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
|
5 # 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
|
6 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
7 currentDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
8 samplesRootDir=$(pwd) |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
9 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
10 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
|
11 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
|
12 |
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
|
13 # 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
|
14 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
|
15 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
|
16 |
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
|
17 # build simple-viewer-single-file (obsolete project) |
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 cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir |
326 | 19 tsc --allowJs --project $samplesRootDir/Web/simple-viewer-single-file.tsconfig.json |
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
|
20 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js $outputDir |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
21 cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm $outputDir |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
22 |
326 | 23 # build single-frame |
24 cp $samplesRootDir/Web/single-frame.html $outputDir | |
25 tsc --allowJs --project $samplesRootDir/Web/single-frame.tsconfig.json | |
26 cp $currentDir/build-wasm/OrthancStoneSingleFrame.js $outputDir | |
27 cp $currentDir/build-wasm/OrthancStoneSingleFrame.wasm $outputDir | |
28 | |
29 # build single-frame-editor | |
30 cp $samplesRootDir/Web/single-frame-editor.html $outputDir | |
31 tsc --allowJs --project $samplesRootDir/Web/single-frame-editor.tsconfig.json | |
32 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.js $outputDir | |
33 cp $currentDir/build-wasm/OrthancStoneSingleFrameEditor.wasm $outputDir | |
34 | |
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
|
35 # build simple-viewer project |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
36 mkdir -p $outputDir/simple-viewer/ |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
37 cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/ |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
38 cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/ |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
39 tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
40 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js $outputDir/simple-viewer/ |
daa04d15192c
new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents:
307
diff
changeset
|
41 cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm $outputDir/simple-viewer/ |
295
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
42 |
b04b13810540
unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff
changeset
|
43 cd $currentDir |