237
|
1 #!/bin/bash
|
|
2
|
|
3 # this script currently assumes that the wasm code has been built on its side and is availabie in Wasm/build/
|
|
4
|
|
5 currentDir=$(pwd)
|
|
6 wasmRootDir=$(pwd)
|
|
7 samplesRootDir=$(pwd)/../../Applications/Samples/
|
|
8
|
|
9 outputDir=$wasmRootDir/build-web/
|
|
10 mkdir -p $outputDir
|
|
11
|
|
12 cp $samplesRootDir/Web/index.html $outputDir
|
|
13 cp $samplesRootDir/Web/samples-styles.css $outputDir
|
|
14
|
|
15 cp $samplesRootDir/Web/simple-viewer.html $outputDir
|
|
16 tsc --allowJs --project $samplesRootDir/Web/tsconfig-simple-viewer.json
|
|
17 cp $currentDir/build/OrthancStoneSimpleViewer.js $outputDir
|
|
18 cp $currentDir/build/OrthancStoneSimpleViewer.wasm $outputDir
|
|
19
|
|
20
|
|
21 # cat ../wasm/build/wasm-app.js $currentDir/../../../orthanc-stone/Platforms/WebAssembly/defaults.js > $outputDir/app.js
|
|
22
|
|
23 cd $currentDir
|
|
24
|