Add pre/post js stub files and expand the emscripten options
authorfrd
Tue, 03 May 2016 01:07:26 -0400
changeset 11796 50a462b9454a
parent 11795 2028bd2a6c5b
child 11797 d9d48143dcbe
Add pre/post js stub files and expand the emscripten options
project_files/hwc/CMakeLists.txt
project_files/web/post.js
project_files/web/pre.js
--- a/project_files/hwc/CMakeLists.txt	Tue May 03 00:55:46 2016 -0400
+++ b/project_files/hwc/CMakeLists.txt	Tue May 03 01:07:26 2016 -0400
@@ -86,7 +86,7 @@
 
 
 if(BUILD_ENGINE_JS)
-    add_flag_append(CMAKE_C_FLAGS "-s ABORTING_MALLOC=0")
+    add_flag_append(CMAKE_C_FLAGS "--memory-init-file 0 -O0 --js-opts 0 -g4 --use-preload-plugins -s ASSERTIONS=2 -s USE_SDL=2 -s USE_SDL_IMAGE=1 -s USE_LIBPNG=1 -s USE_SDL_TTF=2 -s USE_VORBIS=1 -s USE_OGG=1 -s TOTAL_MEMORY=100000000 -s GL_UNSAFE_OPTS=0 -s EXPORTED_FUNCTIONS=\"['_hwengine_RunEngine', '_hwengine_MainLoop']\" --post-js ${CMAKE_SOURCE_DIR}/project_files/web/post.js --pre-js ${CMAKE_SOURCE_DIR}/project_files/web/pre.js")
 endif()
 
 #compile the c files