From ef4ffa19bafeaaae750f1bc94d0da0eb54e1b519 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 11 Jul 2023 16:51:33 +0000 Subject: [PATCH] Added MAXIMUM_MEMORY flag to emscripten compile for larger projects to run proper Co-authored-by: sigonasr2 --- C++/scripts/md5 | 6 +++--- C++/scripts/web.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C++/scripts/md5 b/C++/scripts/md5 index 5520048..7b5b28a 100644 --- a/C++/scripts/md5 +++ b/C++/scripts/md5 @@ -1,7 +1,7 @@ build.sh:c073187e65d0e23aa77aa94af4ec6382 - commit.sh:1af81bf417dfb932284d8a14fdd10657 - -debug.sh:849488515cab075948653c15eec4177b - +debug.sh:8125f303032b6cbc137223df63d10096 - lines.sh:3b907786f7fc9204025993016c9080de - -release.sh:0ab321c3fa2f1a1b2f03b1aec3bce816 - +release.sh:b1ce8461a303e8e7aa9ed74259db3873 - temp:d41d8cd98f00b204e9800998ecf8427e - -web.sh:4bbe9c5710a0ae4289468c3f7f340ff1 - +web.sh:e196c0bb38ff4cd9428b4a4e56f500a9 - diff --git a/C++/scripts/web.sh b/C++/scripts/web.sh index f04e1de..b575188 100755 --- a/C++/scripts/web.sh +++ b/C++/scripts/web.sh @@ -12,12 +12,12 @@ source ../emsdk/emsdk_env.sh if [ ! -f "pixelGameEngine_wasm.o" ] then printf "Pixel Game Engine compile object missing. Compiling for the first time..." - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o + em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 -c pixelGameEngine.cpp -o pixelGameEngine_wasm.o fi if [ -d "assets" ]; then - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets + em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html --preload-file ./assets else - em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html + em++ -std=c++17 -O2 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s USE_SDL_MIXER=2 -s USE_LIBPNG=1 $(find . -type f -name "*.cpp" -not -path "./test/*" -not -name "pixelGameEngine.cpp") pixelGameEngine_wasm.o -o ${PROJECT_NAME}.html fi cp buildtemplate.html ${PROJECT_NAME}.html