# HG changeset patch # User frd # Date 1462252046 14400 # Node ID 50a462b9454a5348b0f2d0d91b2273fe63642981 # Parent 2028bd2a6c5be1885aa9f240602da81a6fed4aa4 Add pre/post js stub files and expand the emscripten options diff -r 2028bd2a6c5b -r 50a462b9454a project_files/hwc/CMakeLists.txt --- 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 diff -r 2028bd2a6c5b -r 50a462b9454a project_files/web/post.js diff -r 2028bd2a6c5b -r 50a462b9454a project_files/web/pre.js