UnrealEngineHTML5 / Documentation

532 stars 183 forks source link

Upgrading Emscripten #40

Closed ZeusLT closed 4 years ago

ZeusLT commented 4 years ago

Hello, I've been making quite large project which require a lot of memory to run, on 4.24 with 1.39 emscripten. So I've been investigating a lot on how to avoid memory limitations. I've found command line arguments which I learned how to apply properly, but some of them or a combination of them do not seem to work properly. The commands are:

-s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=512MB -s WASM_MEM_MAX=4096MB --no-heap-copy

So I've noticed that in newer emscripten versions they have fixed a lot of bugs and even renamed TOTAL_MEMORY to INITIAL_MEMORY WASM_MEM_MAX to MAXIMUM_MEMORY

So I've tried to upgrade emscripten to 1.39.17, I changed version number inside "html4build.sh" and let it generate new files, then it stopped at the EPIC PATCH which I tried to update to a new version, after that I ran "html4build.sh" again and it failed with:

configure: cmake -G MinGW Makefiles -DBUILD_SHARED_LIBS=OFF -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE=-O2 -DNDEBUG -s WASM=1 -Wno-implicit-function-declaration -Wno-shift-negative-value D:/ue4-r424-html5/Engine/P latforms/HTML5/Build/BatchFiles/ThirdParty/zlib/zlib-1.2.8 -DCMAKE_TOOLCHAIN_FILE=D:\ue4-r424-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.17-fastcomp\fastcomp\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR="D:/ue4-r424-html5/En gine/Platforms/HTML5/Build/emsdk/emsdk-1.39.17-fastcomp/node/12.9.1_64bit/bin/node.exe" CMake Error at D:/ue4-r424-html5/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.17-fastcomp/fastcomp/emscripten/cmake/Modules/Platform/Emscripten.cmake:131 (message): Failed to fetch compiler version information with command "'D:/ue4-r424-html5/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.17-fastcomp/fastcomp/emscripten/emcc.bat' -v"! Process returned with error code 1. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:4 (project)

without EPIC PATCH edit, I cannot compile my projects at all, they fail with:

PackagingResults: Error: Unhandled exception: System.IO.FileNotFoundException: Could not find file 'D:\ue4-r424-html5\Engine\Intermediate\Build\HTML5.emscripten'.

Can anyone help me out here? Either with 1.39.0 arguments if there is a solution, or to upgrade to a new version. Thank you