diff Applications/Samples/build-web.sh @ 319:daa04d15192c am-2

new SimpleViewer sample that has been split in multiple files to be able to scale it
author am@osimis.io
date Thu, 11 Oct 2018 13:16:54 +0200
parents be2660b6e40a
children 612238b3f3e8
line wrap: on
line diff
--- a/Applications/Samples/build-web.sh	Mon Oct 08 17:10:08 2018 +0200
+++ b/Applications/Samples/build-web.sh	Thu Oct 11 13:16:54 2018 +0200
@@ -2,7 +2,7 @@
 
 set -e
 
-# this script currently assumes that the wasm code has been built on its side and is availabie in Wasm/build/
+# this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/
 
 currentDir=$(pwd)
 samplesRootDir=$(pwd)
@@ -10,12 +10,22 @@
 outputDir=$samplesRootDir/build-web/
 mkdir -p $outputDir
 
+# files used by all single files samples
 cp $samplesRootDir/Web/index.html $outputDir
 cp $samplesRootDir/Web/samples-styles.css $outputDir
 
-cp $samplesRootDir/Web/simple-viewer.html $outputDir
-tsc --allowJs --project $samplesRootDir/Web/tsconfig-simple-viewer.json
-cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js  $outputDir
-cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm  $outputDir
+# build simple-viewer-single-file (obsolete project)
+cp $samplesRootDir/Web/simple-viewer-single-file.html $outputDir
+tsc --allowJs --project $samplesRootDir/Web/tsconfig-simple-viewer-single-file.json
+cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.js  $outputDir
+cp $currentDir/build-wasm/OrthancStoneSimpleViewerSingleFile.wasm  $outputDir
+
+# build simple-viewer project
+mkdir -p $outputDir/simple-viewer/
+cp $samplesRootDir/SimpleViewer/Wasm/simple-viewer.html $outputDir/simple-viewer/
+cp $samplesRootDir/SimpleViewer/Wasm/styles.css $outputDir/simple-viewer/
+tsc --allowJs --project $samplesRootDir/SimpleViewer/Wasm/tsconfig-simple-viewer.json
+cp $currentDir/build-wasm/OrthancStoneSimpleViewer.js  $outputDir/simple-viewer/
+cp $currentDir/build-wasm/OrthancStoneSimpleViewer.wasm  $outputDir/simple-viewer/
 
 cd $currentDir