view Applications/Samples/rt-viewer-demo/build-web.sh @ 959:13e078adfb94 toa2019082301

Better error log in fetch failure callback + timeout 600sec in OrthancRestApiCommand + guard against dead controller access in PanSceneTracker + relaxed DicomStructureSet AddReferenceSlice method to accept extraneous adds of the same slice (while trying to understand how it happens in the first place)
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 23 Aug 2019 14:16:45 +0200
parents 1d9deb4ee84c
children
line wrap: on
line source

#!/bin/bash

set -e

target=${1:-all}
# this script currently assumes that the wasm code has been built on its side and is availabie in build-wasm/

currentDir=$(pwd)
samplesRootDir=$(pwd)

tscOutput=$samplesRootDir/build-tsc-output/
outputDir=$samplesRootDir/build-web/
mkdir -p "$outputDir"

# files used by all single files samples
cp "$samplesRootDir/index.html" "$outputDir"
cp "$samplesRootDir/samples-styles.css" "$outputDir"

# build rt-viewer-demo
cp $samplesRootDir/rt-viewer-demo.html $outputDir
tsc --project $samplesRootDir/rt-viewer-demo.tsconfig.json --outDir "$tscOutput"
browserify \
    "$tscOutput/orthanc-stone/Platforms/Wasm/logger.js" \
    "$tscOutput/orthanc-stone/Platforms/Wasm/stone-framework-loader.js" \
    "$tscOutput/orthanc-stone/Platforms/Wasm/wasm-application-runner.js" \
    "$tscOutput/orthanc-stone/Platforms/Wasm/wasm-viewport.js" \
    "$tscOutput/rt-viewer-sample/rt-viewer-demo.js" \
    -o "$outputDir/app-rt-viewer-demo.js"
cp "$currentDir/build-wasm/RtViewerDemo.js"  $outputDir
cp "$currentDir/build-wasm/RtViewerDemo.wasm"  $outputDir

cd $currentDir