annotate Platforms/Wasm/build-web.sh @ 287:2038d76bf13f am-2

interaction with HTML/JS
author am@osimis.io
date Thu, 30 Aug 2018 11:36:36 +0200
parents b4642964c355
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
237
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
1 #!/bin/bash
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
2
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
3 # this script currently assumes that the wasm code has been built on its side and is availabie in Wasm/build/
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
4
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
5 currentDir=$(pwd)
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
6 wasmRootDir=$(pwd)
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
7 samplesRootDir=$(pwd)/../../Applications/Samples/
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
8
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
9 outputDir=$wasmRootDir/build-web/
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
10 mkdir -p $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
11
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
12 cp $samplesRootDir/Web/index.html $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
13 cp $samplesRootDir/Web/samples-styles.css $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
14
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
15 cp $samplesRootDir/Web/simple-viewer.html $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
16 tsc --allowJs --project $samplesRootDir/Web/tsconfig-simple-viewer.json
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
17 cp $currentDir/build/OrthancStoneSimpleViewer.js $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
18 cp $currentDir/build/OrthancStoneSimpleViewer.wasm $outputDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
19
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
20
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
21 # cat ../wasm/build/wasm-app.js $currentDir/../../../orthanc-stone/Platforms/WebAssembly/defaults.js > $outputDir/app.js
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
22
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
23 cd $currentDir
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents:
diff changeset
24