comparison Resources/CodeGeneration/testWasmIntegrated/build.sh @ 495:6405435480ae bgo-commands-codegen

Fixed template to add dump capabilities + started work on an integrated TS/WASM test
author bgo-osimis
date Sat, 23 Feb 2019 14:14:32 +0100
parents
children 8b6ceae45ba0
comparison
equal deleted inserted replaced
494:fc17251477d6 495:6405435480ae
1 #!/bin/bash
2
3 set -e
4
5 mkdir -p build-wasm
6 cd build-wasm
7
8 # shellcheck source="$HOME/apps/emsdk/emsdk_env.sh"
9 source "$HOME/apps/emsdk/emsdk_env.sh"
10 cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_WASM=ON ..
11
12 ninja
13
14 echo
15
16 cd ..
17
18 mkdir -p
19
20 # compile TS to JS
21 tsc --module commonjs --sourceMap -t ES2015 --outDir "build-tsc/" build-wasm/testWasmIntegratedCpp_generated.ts testWasmIntegrated.ts
22
23 # bundle all JS files to final build dir
24 browserify "build-wasm/testWasmIntegratedCpp.js" "build-tsc/testWasmIntegratedCpp_generated.js" "build-tsc/testWasmIntegrated.js" -o "testWasmIntegratedApp.js"
25
26 # copy HTML start page to output dir
27 cp index.html build-final/
28
29 # copy WASM binary to output dir
30 cp build-wasm/testWasmIntegratedCpp.wasm build-final/
31
32
33