Mercurial > hg > orthanc-stone
comparison Resources/CodeGeneration/runts.ps1 @ 494:fc17251477d6 bgo-commands-codegen
TS and CPP tests OK. Ongoing code for C++ program that reads list of serialized messages in N files. Requires conan
author | bgo-osimis |
---|---|
date | Sat, 23 Feb 2019 10:18:13 +0100 |
parents | 6470248790db |
children |
comparison
equal
deleted
inserted
replaced
493:6fbf2eae7c88 | 494:fc17251477d6 |
---|---|
2 # echo "| template.in.ts |" | 2 # echo "| template.in.ts |" |
3 # echo "+----------------------+" | 3 # echo "+----------------------+" |
4 | 4 |
5 # tsc -t ES2015 .\template.in.ts; node .\template.in.js | 5 # tsc -t ES2015 .\template.in.ts; node .\template.in.js |
6 | 6 |
7 # echo "+----------------------+" | |
8 # echo "| playground.ts |" | |
9 # echo "+----------------------+" | |
10 | |
11 # tsc -t ES2015 .\playground.ts; node .\playground.js | |
12 | |
13 # echo "+----------------------+" | |
14 # echo "| playground3.ts |" | |
15 # echo "+----------------------+" | |
16 | |
17 # tsc -t ES2015 .\playground3.ts; node .\playground3.js | |
18 | |
7 echo "+----------------------+" | 19 echo "+----------------------+" |
8 echo "| playground.ts |" | 20 echo "| stonegen |" |
9 echo "+----------------------+" | 21 echo "+----------------------+" |
10 | 22 |
11 tsc -t ES2015 .\playground.ts; node .\playground.js | 23 if(-not (test-Path "build")) { |
24 mkdir "build" | |
25 } | |
12 | 26 |
13 echo "+----------------------+" | 27 echo "Generate the TS and CPP wrapper... (to build/)" |
14 echo "| playground3.ts |" | 28 python stonegentool.py -o "." test_data/test1.yaml |
15 echo "+----------------------+" | 29 if($LASTEXITCODE -ne 0) { |
30 Write-Error ("Code generation failed!") | |
31 exit $LASTEXITCODE | |
32 } | |
16 | 33 |
17 tsc -t ES2015 .\playground3.ts; node .\playground3.js | 34 echo "Compile the TS wrapper to JS... (in build/)" |
35 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" VsolMessages_generated.ts | |
36 if($LASTEXITCODE -ne 0) { | |
37 Write-Error ("Code compilation failed!") | |
38 exit $LASTEXITCODE | |
39 } | |
40 | |
41 echo "Compile the test app..." | |
42 tsc --module commonjs --sourceMap -t ES2015 --outDir "build/" test_stonegen.ts | |
43 if($LASTEXITCODE -ne 0) { | |
44 Write-Error ("Code compilation failed!") | |
45 exit $LASTEXITCODE | |
46 } | |
47 | |
48 browserify "build/test_stonegen.js" "build/VsolMessages_generated.js" -o "build_browser/test_stonegen_fused.js" | |
49 | |
50 cp .\test_stonegen.html .\build_browser\ | |
51 | |
52 echo "Run the test app..." | |
53 Push-Location | |
54 cd build_browser | |
55 node .\test_stonegen_fused.js | |
56 Pop-Location | |
57 if($LASTEXITCODE -ne 0) { | |
58 Write-Error ("Code execution failed!") | |
59 exit $LASTEXITCODE | |
60 } | |
18 | 61 |
19 | 62 |
63 |