@@ -36,12 +36,14 @@ export ARCH="wasm32"
3636export CPU_ARCH=" wasm32"
3737export ENDIANESS=" little"
3838
39- export PACKAGE_FLAGS= " '--use-port=sdl2', '--use-port=harfbuzz', '--use-port=freetype', '--use-port=zlib', '--use-port=sdl2_ttf', '--use-port=vorbis', '--use-port=mpg123', '--use-port=ogg', '--use-port=libmodplug', '--use-port=sdl2_mixer', '--use-port=libpng', '--use-port=libjpeg', '--use-port=sdl2_image', '-s SDL2_IMAGE_FORMATS=[ \" png \" , \" jpg \" , \" svg \" ]','--use-port=icu' "
39+ export ROMFS= " platforms/romfs "
4040
41- export COMMON_FLAGS=" '-fexceptions', '-sEXCEPTION_CATCHING_ALLOWED=[..]', $PACKAGE_FLAGS "
41+ export PACKAGE_FLAGS=" '--use-port=sdl2', '--use-port=harfbuzz', '--use-port=freetype', '--use-port=zlib', '--use-port=sdl2_ttf', '--use-port=vorbis', '--use-port=mpg123', '--use-port=ogg', '--use-port=libmodplug', '--use-port=sdl2_mixer', '-sSDL2_MIXER_FORMATS=[\" ogg\" ,\" mp3\" ,\" mod\" ]','--use-port=libpng', '--use-port=libjpeg', '--use-port=sdl2_image', '-sSDL2_IMAGE_FORMATS=[\" png\" ,\" jpg\" ,\" svg\" ]','--use-port=icu'"
42+
43+ export COMMON_FLAGS=" '-fexceptions', '-pthread', '-sEXCEPTION_CATCHING_ALLOWED=[..]', $PACKAGE_FLAGS "
4244
4345# TODO see if ALLOW_MEMORY_GROWTH is needed, but if we load ttf's and music it likely is and we don't have to debug OOm crahses, that aren't handled by some thrid party library, which is painful
44- export LINK_FLAGS=" $COMMON_FLAGS , '-sEXPORT_ALL=1', '-sUSE_WEBGPU=1', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sNO_EXIT_RUNTIME=0', '- sASSERTIONS=1','-sERROR_ON_UNDEFINED_SYMBOLS=1', '-sFETCH=1'"
46+ export LINK_FLAGS=" $COMMON_FLAGS , '-sEXPORT_ALL=1', '-sUSE_WEBGPU=1', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sASSERTIONS=1','-sERROR_ON_UNDEFINED_SYMBOLS=1', '-sFETCH=1'"
4547export COMPILE_FLAGS=" $COMMON_FLAGS ,'-DAUDIO_PREFER_MP3'"
4648
4749export CROSS_FILE=" ./platforms/crossbuild-web.ini"
@@ -88,6 +90,7 @@ cpp_link_args = [$LINK_FLAGS]
8890needs_exe_wrapper = true
8991sys_root = '$EMSCRIPTEN_SYS_ROOT '
9092
93+ APP_ROMFS='$ROMFS '
9194
9295EOF
9396
@@ -118,6 +121,14 @@ else
118121 exit 1
119122fi
120123
124+ if [ ! -d " $ROMFS " ]; then
125+
126+ mkdir -p " $ROMFS "
127+
128+ cp -r assets " $ROMFS /"
129+
130+ fi
131+
121132if [ " $COMPILE_TYPE " == " complete_rebuild" ] || [ ! -e " $BUILD_DIR " ]; then
122133
123134 meson setup " $BUILD_DIR " \
0 commit comments