foreignsasquatch / raylib-hx

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming
https://raylib.com
zlib License
55 stars 13 forks source link

wasm sample #36

Closed profelis closed 1 year ago

profelis commented 1 year ago

Hi! can you please update wasm build config and wasm sample? I tried to use current wasm config from Web.xml with config from this commit

https://github.com/foreignsasquatch/raylib-hx/commit/17e69ceaa7148108974ba2dcd06972c5490b3832#diff-5469ce10da37fb1a0de753a53e529b132ebe1f9e097a0ed958f164b4e2c66a4c

but I just got strange errors

Link: BasicWindow.html
error: bin does not exist
em++: error: '/opt/homebrew/Cellar/emscripten/3.1.31/libexec/tools/file_packager BasicWindow.data --from-emcc --preload bin' failed (returned 1)
Error: Build failed
profelis commented 1 year ago

Ok, I found solution, problem was in ASSETS_PATH define, here is my hxml file


-m BasicWindow
-cpp test
-lib raylib-hx

## wasm
-D wasm
-D emscripten
-D HXCPP_LINK_EMSCRIPTEN_EXT=.html
-D ASSET_PATH=<full path>/raylib-hx/examples/assets@assets