wasmbuild.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. @ECHO OFF
  2. CALL :Stage chapter-01-hellorust
  3. CALL :Stage chapter-02-helloecs
  4. CALL :Stage chapter-03-walkmap
  5. CALL :Stage chapter-04-newmap
  6. CALL :Stage chapter-05-fov
  7. CALL :Stage chapter-06-monsters
  8. CALL :Stage chapter-07-damage
  9. CALL :Stage chapter-08-ui
  10. CALL :Stage chapter-09-items
  11. CALL :Stage chapter-10-ranged
  12. CALL :Stage chapter-11-loadsave
  13. CALL :Stage chapter-12-delvingdeeper
  14. CALL :Stage chapter-13-difficulty
  15. CALL :Stage chapter-14-gear
  16. CALL :Stage chapter-16-nicewalls
  17. CALL :Stage chapter-17-blood
  18. CALL :Stage chapter-18-particles
  19. CALL :Stage chapter-19-food
  20. CALL :Stage chapter-20-magicmapping
  21. CALL :Stage chapter-21-rexmenu
  22. CALL :Stage chapter-22-simpletraps
  23. CALL :Stage chapter-23-generic-map
  24. CALL :Stage chapter-24-map-testing
  25. CALL :Stage chapter-25-bsproom-dungeons
  26. CALL :Stage chapter-26-bsp-interiors
  27. CALL :Stage chapter-27-cellular-automota
  28. CALL :Stage chapter-28-drunkards-walk
  29. CALL :Stage chapter-29-mazes
  30. CALL :Stage chapter-30-dla
  31. CALL :Stage chapter-31-symmetry
  32. CALL :Stage chapter-32-voronoi
  33. REM Publish or perish
  34. cd book\book\wasm
  35. pscp -r * herbert@172.16.10.193:/var/www/bfnightly/rustbook/wasm
  36. cd ..\..\..
  37. EXIT /B 0
  38. REM Usage: Stage Chapter
  39. :Stage
  40. cd %~1
  41. cargo build --release --target wasm32-unknown-unknown
  42. wasm-bindgen ..\target\wasm32-unknown-unknown\release\%~1.wasm --out-dir ../book/book/wasm/%~1 --no-modules --no-typescript
  43. cd ..
  44. move .\book\book\wasm\%~1\%~1.js .\book\book\wasm\%~1\myblob.js
  45. move .\book\book\wasm\%~1\%~1_bg.wasm ./book/book/wasm/%~1/myblob_bg.wasm
  46. copy index.html .\book\book\wasm\%~1