ufna / UE-HTML5

HTML5 platform support for Unreal Engine development tracker
https://github.com/ufna/UE-HTML5-DEV
MIT License
61 stars 9 forks source link

HTML5Setup.sh isn't setting all of the environment variables or setting up all the tools #32

Closed tgraupmann closed 2 years ago

tgraupmann commented 2 years ago

I've tried several branches but I'm running into the same issue. The emscripten path does not exist... Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\upstream\emscripten

I may just need some emsdk commands to get the missing tools installed to the expected paths.

These are my steps on Windows 10.

git clone https://github.com/ufna/UnrealEngine -b 4.27-html5_dev UnrealEngineHtml_4_27
cd UnrealEngineHtml_4_27/
./Setup.bat
cd Engine/Platforms/HTML5/
./HTML5Setup.sh
cd ../../../

Generating the project files reveals some paths and missing tool issues.

$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Source\Programs\UnrealBuildTool\UEBuildHTML5.cs(14,3): warning CS1587: XML comment is not placed on a valid language element [D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
ERROR: EMSCRIPTEN NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\emscripten
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
ERROR: NODEJS NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\node\14.18.2_64bit\bin\node.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
ERROR: LLVM NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\bin
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
Binding IntelliSense data... 100%
Writing project files... 100%

Building the solution:

ERROR: EMSCRIPTEN NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\emscripten
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
ERROR: NODEJS NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\node\14.18.2_64bit\bin\node.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
ERROR: LLVM NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\bin
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** LLVMROOT directory NOT FOUND: error_llvm_not_found

If I run Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\emsdk_env.bat before invoking Engine\Platforms\HTML5\HTML5Setup.sh from bash, I get the following error output.

$ ./HTML5Setup.sh
/d/UnrealEngine/UnrealEngineHtml_4_27
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:9: trailing whitespace.
; @ufnadev UDeviceProfileManager::FindProfile bCreateProfileOnFail is false by default
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:157: trailing whitespace.

Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:895: trailing whitespace.
        //      && GPixelFormats[PF_G32R32F].Supported
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:896: trailing whitespace.
        //      && GSupportsTexture3D
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:1060: trailing whitespace.

warning: squelched 10 whitespace errors
warning: 15 lines add whitespace errors.
/d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5
Cloning into 'emsdk-3.0.0'...
remote: Enumerating objects: 3152, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 3152 (delta 0), reused 4 (delta 0), pack-reused 3147
Receiving objects: 100% (3152/3152), 1.67 MiB | 8.22 MiB/s, done.
Resolving deltas: 100% (2049/2049), done.
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Disable Python in App Execution Aliases...

image

$ python --version
Python 3.8.2

I get more errors when I rerun the ./HTML5Setup,sh bash script.

$ ./HTML5Setup.sh
/d/UnrealEngine/UnrealEngineHtml_4_27
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:9: trailing whitespace.
; @ufnadev UDeviceProfileManager::FindProfile bCreateProfileOnFail is false by default
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:157: trailing whitespace.

Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:895: trailing whitespace.
        //      && GPixelFormats[PF_G32R32F].Supported
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:896: trailing whitespace.
        //      && GSupportsTexture3D
Engine/Platforms/HTML5/Build/PatchFiles/4.27.2.engine.patch:1060: trailing whitespace.

error: patch failed: Engine/Config/BaseDeviceProfiles.ini:104
error: Engine/Config/BaseDeviceProfiles.ini: patch does not apply
error: patch failed: Engine/Config/ConsoleVariables.ini:33
error: Engine/Config/ConsoleVariables.ini: patch does not apply
error: patch failed: Engine/Shaders/Private/EyeAdaptationCommon.ush:3
error: Engine/Shaders/Private/EyeAdaptationCommon.ush: patch does not apply
error: patch failed: Engine/Shaders/Private/PageTableUpdate.usf:6
error: Engine/Shaders/Private/PageTableUpdate.usf: patch does not apply
error: patch failed: Engine/Shaders/Private/PostProcessMobile.usf:1238
error: Engine/Shaders/Private/PostProcessMobile.usf: patch does not apply
error: patch failed: Engine/Source/Developer/ShaderCompilerCommon/Private/ShaderCompilerCommon.cpp:2691
error: Engine/Source/Developer/ShaderCompilerCommon/Private/ShaderCompilerCommon.cpp: patch does not apply
error: patch failed: Engine/Source/Developer/ShaderFormatOpenGL/Private/GlslBackend.cpp:880
error: Engine/Source/Developer/ShaderFormatOpenGL/Private/GlslBackend.cpp: patch does not apply
error: patch failed: Engine/Source/Developer/ShaderFormatOpenGL/Private/OpenGLShaderCompiler.cpp:71
error: Engine/Source/Developer/ShaderFormatOpenGL/Private/OpenGLShaderCompiler.cpp: patch does not apply
error: patch failed: Engine/Source/Developer/ShaderFormatOpenGL/Public/GlslBackend.h:92
error: Engine/Source/Developer/ShaderFormatOpenGL/Public/GlslBackend.h: patch does not apply
error: patch failed: Engine/Source/Developer/ShaderFormatOpenGL/Public/ShaderFormatOpenGL.h:90
error: Engine/Source/Developer/ShaderFormatOpenGL/Public/ShaderFormatOpenGL.h: patch does not apply
error: patch failed: Engine/Source/Programs/TestPAL/Private/Parent.cpp:13
error: Engine/Source/Programs/TestPAL/Private/Parent.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Core/Private/HAL/ConsoleManager.cpp:2603
error: Engine/Source/Runtime/Core/Private/HAL/ConsoleManager.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformProcess.h:6
error: Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformProcess.h: patch does not apply
error: patch failed: Engine/Source/Runtime/Core/Public/HAL/Platform.h:31
error: Engine/Source/Runtime/Core/Public/HAL/Platform.h: patch does not apply
error: patch failed: Engine/Source/Runtime/Core/Public/Serialization/MemoryLayout.h:33
error: Engine/Source/Runtime/Core/Public/Serialization/MemoryLayout.h: patch does not apply
error: patch failed: Engine/Source/Runtime/CoreUObject/Public/UObject/UnrealType.h:2767
error: Engine/Source/Runtime/CoreUObject/Public/UObject/UnrealType.h: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp:41
error: Engine/Source/Runtime/Engine/Private/GPUSkinCache.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/GPUSkinVertexFactory.cpp:108
error: Engine/Source/Runtime/Engine/Private/GPUSkinVertexFactory.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/GeometryCollectionRendering.cpp:10
error: Engine/Source/Runtime/Engine/Private/GeometryCollectionRendering.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/MeshParticleVertexFactory.cpp:267
error: Engine/Source/Runtime/Engine/Private/MeshParticleVertexFactory.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/Particles/ParticleGpuSimulation.cpp:117
error: Engine/Source/Runtime/Engine/Private/Particles/ParticleGpuSimulation.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:2992
error: Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/Texture.cpp:138
error: Engine/Source/Runtime/Engine/Private/Texture.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/Texture2D.cpp:627
error: Engine/Source/Runtime/Engine/Private/Texture2D.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Private/TextureDerivedDataTask.cpp:619
error: Engine/Source/Runtime/Engine/Private/TextureDerivedDataTask.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Engine/Public/FXSystem.h:101
error: Engine/Source/Runtime/Engine/Public/FXSystem.h: patch does not apply
error: patch failed: Engine/Source/Runtime/ImageWrapper/Private/Formats/PngImageWrapper.cpp:148
error: Engine/Source/Runtime/ImageWrapper/Private/Formats/PngImageWrapper.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp:719
error: Engine/Source/Runtime/Landscape/Private/LandscapeEditLayers.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLCommands.cpp:40
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLCommands.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDevice.cpp:713
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDevice.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDrvPrivate.h:515
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLDrvPrivate.h: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLES.cpp:12
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLES.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLShaders.cpp:504
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLShaders.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp:379
error: Engine/Source/Runtime/OpenGLDrv/Private/OpenGLTexture.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Public/OpenGL.h:135
error: Engine/Source/Runtime/OpenGLDrv/Public/OpenGL.h: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLDrv.h:1185
error: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLDrv.h: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLES.h:114
error: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLES.h: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLShaderResources.h:107
error: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLShaderResources.h: patch does not apply
error: patch failed: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLUtil.h:21
error: Engine/Source/Runtime/OpenGLDrv/Public/OpenGLUtil.h: patch does not apply
error: patch failed: Engine/Source/Runtime/RHI/Public/RHIDefinitions.h:1829
error: Engine/Source/Runtime/RHI/Public/RHIDefinitions.h: patch does not apply
error: patch failed: Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1074
error: Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/RenderCore/Private/UnifiedBuffer.cpp:42
error: Engine/Source/Runtime/RenderCore/Private/UnifiedBuffer.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/RenderCore/Public/ClearReplacementShaders.h:136
error: Engine/Source/Runtime/RenderCore/Public/ClearReplacementShaders.h: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessAA.cpp:41
error: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessAA.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessAmbientOcclusionMobile.cpp:36
error: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessAmbientOcclusionMobile.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMobile.cpp:1949
error: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessMobile.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessPixelProjectedReflectionMobile.cpp:74
error: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessPixelProjectedReflectionMobile.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp:1524
error: Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingAmbientOcclusion.cpp:62
error: Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingAmbientOcclusion.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:2808
error: Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/SceneTextureReductions.cpp:73
error: Engine/Source/Runtime/Renderer/Private/SceneTextureReductions.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSpace.cpp:177
error: Engine/Source/Runtime/Renderer/Private/VT/VirtualTextureSpace.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/TraceLog/Private/Trace/Writer.cpp:151
error: Engine/Source/Runtime/TraceLog/Private/Trace/Writer.cpp: patch does not apply
error: patch failed: Engine/Source/Runtime/TraceLog/Public/Trace/Detail/Atomic.h:4
error: Engine/Source/Runtime/TraceLog/Public/Trace/Detail/Atomic.h: patch does not apply
error: patch failed: Engine/Source/ThirdParty/ICU/icu4c-64_1/include/unicode/rep.h:207
error: Engine/Source/ThirdParty/ICU/icu4c-64_1/include/unicode/rep.h: patch does not apply
error: patch failed: Engine/Source/ThirdParty/ICU/icu4c-64_1/include/unicode/unistr.h:2927
error: Engine/Source/ThirdParty/ICU/icu4c-64_1/include/unicode/unistr.h: patch does not apply
error: patch failed: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unicode/rep.h:207
error: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unicode/rep.h: patch does not apply
error: patch failed: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unicode/unistr.h:2927
error: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unicode/unistr.h: patch does not apply
error: patch failed: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unistr.cpp:101
error: Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/unistr.cpp: patch does not apply

Enscripten is still not found.

$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
ERROR: EMSCRIPTEN NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\emscripten
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
ERROR: NODEJS NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\node\14.18.2_64bit\bin\node.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
ERROR: LLVM NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\upstream\bin
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\python\3.9.2\python.exe
*** EMSCRIPTEN_ROOT directory NOT FOUND: error_emscripten_not_found
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\python\3.9.2\python.exe
Binding IntelliSense data... 100%
Writing project files... 100%

Let's install some of the missing tools...

$ cd Build/emsdk/emsdk-3.0.0
$ ./emsdk install latest
Resolving SDK alias 'latest' to '3.1.5'
Resolving SDK version '3.1.5' to 'sdk-releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'
Installing SDK 'sdk-releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'..
Installing tool 'node-14.18.2-64bit'..
Downloading: D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/node-v14.18.2-win-x64.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v14.18.2-win-x64.zip, 30570907 Bytes
 [----------------------------------------------------------------------------]
Unpacking 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/node-v14.18.2-win-x64.zip' to 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/node/14.18.2_64bit'
Done installing tool 'node-14.18.2-64bit'.
Installing tool 'python-3.9.2-64bit'..
Downloading: D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/python-3.9.2-1-embed-amd64+pywin32.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/python-3.9.2-1-embed-amd64+pywin32.zip, 16982397 Bytes
 [----------------------------------------------------------------------------]
Unpacking 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/python-3.9.2-1-embed-amd64+pywin32.zip' to 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/python/3.9.2_64bit'
Done installing tool 'python-3.9.2-64bit'.
Installing tool 'java-8.152-64bit'..
Downloading: D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/portable_jre_8_update_152_64bit.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/portable_jre_8_update_152_64bit.zip, 69241499 Bytes
 [----------------------------------------------------------------------------]
Unpacking 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/portable_jre_8_update_152_64bit.zip' to 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/java/8.152_64bit'
Done installing tool 'java-8.152-64bit'.
Installing tool 'releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'..
Downloading: D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/2dee36c7163f7394ab9341854ef5281501dd97d0-wasm-binaries.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/2dee36c7163f7394ab9341854ef5281501dd97d0/wasm-binaries.zip, 386296556 Bytes
 [----------------------------------------------------------------------------]
Unpacking 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/zips/2dee36c7163f7394ab9341854ef5281501dd97d0-wasm-binaries.zip' to 'D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/upstream'
Done installing tool 'releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'.
Done installing SDK 'sdk-releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'.

Activate the tools:

$ ./emsdk activate latest
Adding directories to PATH:
PATH += /d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0
PATH += /d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/node/14.18.2_64bit/bin
PATH += /d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/upstream/emscripten

Setting environment variables:
PATH = /d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0:/d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/node/14.18.2_64bit/bin:/d/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/upstream/emscripten:/c/Users/timot/bin:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/local/bin:/c/Program Files/Git/usr/bin:/c/Users/timot/AppData/Local/Programs/Python/Python38/Scripts:/c/Users/timot/AppData/Local/Programs/Python/Python38:/c/Program Files/Eclipse Foundation/jdk-16.0.2.7-hotspot/bin:/c/Program Files (x86)/Razer/ChromaBroadcast/bin:/c/Program Files/Razer/ChromaBroadcast/bin:/c/Program Files (x86)/Razer Chroma SDK/bin:/c/Program Files/Razer Chroma SDK/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files (x86)/GtkSharp/2.12/bin:/c/Users/timot/AppData/Local/Microsoft/WindowsApps:/c/Program Files/PuTTY:/c/php:/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Users/linae/.dnx/bin:/c/Program Files/Microsoft DNX/Dnvm:/c/Program Files (x86)/Microsoft Emulator Manager/1.0:/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/c/Program Files/dotnet:/c/NVPACK/gradle-2.9/bin:/c/NVPACK/apache-ant-1.8.2/bin:/c/NVPACK/jdk1.8.0_77/bin:/c/NVPACK/android-ndk-r12b:/c/NVPACK/android-sdk-windows/extras/android/support:/c/NVPACK/android-sdk-windows/build-tools:/c/NVPACK/android-sdk-windows/platform-tools:/c/NVPACK/android-sdk-windows/tools:/c/Users/timot/AppData/Local/Android/sdk/platform-tools:/c/Users/timot/AppData/Local/atom/bin:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files/GGP SDK/dev/bin:/c/Program Files (x86)/Yarn/bin:/c/Program Files/nodejs:/c/Program Files (x86)/dotnet:/c/Program Files/Docker/Docker/resources/bin:/c/ProgramData/DockerDesktop/version-bin:/c/Program Files/CMake/bin:/c/Program Files/Git/cmd:/c/Users/timot/AppData/Local/Programs/Microsoft VS Code/bin:/c/Users/timot/AppData/Local/Yarn/bin:/c/Users/timot/AppData/Local/GitHubDesktop/bin:/c/Users/timot/AppData/Roaming/npm:/c/Users/timot/.dotnet/tools:/c/Program Files/Git/usr/bin/vendor_perl:/c/Program Files/Git/usr/bin/core_perl
EMSDK = D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0
EM_CONFIG = D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\.emscripten
EMSDK_NODE = D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/node/14.18.2_64bit/bin/node.exe
EMSDK_PYTHON = D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/python/3.9.2_64bit/python.exe
JAVA_HOME = D:/UnrealEngine/UnrealEngineHtml_4_27/Engine/Platforms/HTML5/Build/emsdk/emsdk-3.0.0/java/8.152_64bit
The changes made to environment variables only apply to the currently running shell instance. Use the 'emsdk_env.bat' to re-enter this environment later, or if you'd like to register this environment permanently, rerun this command with the option --permanent.
Resolving SDK alias 'latest' to '3.1.5'
Resolving SDK version '3.1.5' to 'sdk-releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit'
Setting the following tools as active:
   node-14.18.2-64bit
   python-3.9.2-64bit
   java-8.152-64bit
   releases-upstream-2dee36c7163f7394ab9341854ef5281501dd97d0-64bit

And regenerate the project files.

$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Source\Programs\UnrealBuildTool\UEBuildHTML5.cs(14,3): warning CS1587: XML comment is not placed on a valid language element [D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\python\3.9.2\python.exe
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHtml_4_27\Engine\Platforms\HTML5\Build\emsdk\emsdk-3.0.0\python\3.9.2\python.exe
Binding IntelliSense data... 100%
Writing project files... 100%

Still can't find Python. So I'll copy and paste the folder and give it the expected name. image

One last time, regenerate the project files.

$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 100%

And walla. I'll build the solution and check for errors.

ufna commented 2 years ago

Hi @tgraupmann ,

  1. please use latest version of 4.24-html5 branch. 4.27 is not supported and won't work right now, it's very raw experiment files that I just want to keep. Also some paths are changed in Emscripten now, so it should be patched even to compile.
  2. make a clean checkout (or remove Platforms/HTML5 and then revert to HEAD)
  3. check that you have cmake installed (cmake --version in git bash) and python --version and also python3 --version commands run good.
  4. run HTML5Setup.sh and check its result
tgraupmann commented 2 years ago

Now to get the tool versions to match?

EMSDK = D:/UnrealEngine/UnrealEngineHTML5_4_24/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.0
EM_CONFIG = D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\.emscripten
EMSDK_NODE = D:/UnrealEngine/UnrealEngineHTML5_4_24/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.0/node/14.18.2_64bit/bin/node.exe
EMSDK_PYTHON = D:/UnrealEngine/UnrealEngineHTML5_4_24/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.0/python/3.9.2_64bit/python.exe
JAVA_HOME = D:/UnrealEngine/UnrealEngineHTML5_4_24/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.0/java/8.152_64bit

timot@polaris MINGW64 /d/UnrealEngine/UnrealEngineHTML5_4_24 (4.24-html5)
$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
ERROR: NODEJS NOT FOUND: D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\node\12.18.1_64bit\bin\node.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
ERROR: LLVM NOT FOUND: D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\upstream\fastcomp\bin
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\python\3.7.4_64bit\python.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** LLVMROOT directory NOT FOUND: error_llvm_not_found
*** PYTHON NOT FOUND: D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.0\python\3.7.4_64bit\python.exe
Binding IntelliSense data... 100%
Writing project files... 100%

Install and activate the expected versions.

cd Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.0/

./emsdk install node-12.18.1-64bit
./emsdk activate node-12.18.1-64bit

./emsdk install python-3.7.4-64bit
./emsdk activate python-3.7.4-64bit

./emsdk install sdk-1.39.0
./emsdk activate sdk-1.39.0

./emsdk install mingw-7.1.0-64bit
./emsdk activate mingw-7.1.0-64bit

With that setup ready to run:

$ ./HTML5Setup.sh

(20 minutes of compiling...)

[ 71%] Linking CXX static library SimulationController.bc
[ 72%] Linking CXX static library PhysX3Vehicle.bc
[ 72%] Linking CXX static library PhysX3Common.bc
[100%] Linking C static library libz.bc
[100%] Linking C static library libz.bc
[100%] Linking C static library libz.bc
Success!

That seems to have done it.

$ ./GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 100%
ufna commented 2 years ago

@tgraupmann , there is no emsdk-1.39.0 version mentioned or used in https://github.com/ufna/UnrealEngine/tree/4.24-html5 branch. And you definitely shouldn't run emsdk installation manually.

It's either not a clean checkout, or wrong is repo used. It seemed that you're using https://github.com/UnrealEngineHTML5/UnrealEngine instead of my fork.

tgraupmann commented 2 years ago

Oops, on one machine yeah I was using the https://github.com/UnrealEngineHTML5/UnrealEngine fork and 4.24-html branch. Doing an empty level test export, that fork gets a build error.

UATHelper: Packaging (HTML5):     shared:ERROR: D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Source\ThirdParty\PhysX3\PhysX_3.4\lib-1.39.0-fc-mt\PhysX3_O2.bc: No such file or directory ("D:\UnrealEngine\UnrealEngineHTML5_4_24\Engine\Platforms\HTML5\Source\ThirdParty\PhysX3\PhysX_3.4\lib-1.39.0-fc-mt\PhysX3_O2.bc" was expected to be an input 
file, based on the commandline arguments provided)

On my other machine, the https://github.com/ufna/UnrealEngine/ fork and 4.24-html5 branch build successfully!

UATHelper: Packaging (HTML5): BUILD SUCCESSFUL
UATHelper: Packaging (HTML5): AutomationTool exiting with ExitCode=0 (Success)