Unable to package HTML5 w/ 4.9 Source build

Using a Source build of 4.9, I am completely unable to package projects for HTML5.

If I create a new BP project and attempt to package, I get this error:

57099-error1.png

If I add a C++ class and build with the “Development”+“Win64” configuration from within Visual Studio, the build succeeds. However, if I then try to package from the editor, I get to the final step (packaging Project-HTML5-Shipping.js) before failing with a WindowsError about "incorrect parameters.

If I add a C++ class and build with the “Development”+“HTML5” configuration from within Visual Studio, the VS build fails with an error about being unable to produce Project-HTML5.js / UE4Game.js.

Anyone else run into these issues?

Hi!

For packaging project to the HTML5, your should install Emscripten and UE4 should be compiled not only in Development Editor / Win64 configuration. After compiling UE4 in this configuration, you need switch to Development / HTML5 configuration and create additional Build. If you want package for shipping too, you need additional compile UE4 in Shipping / HTML5 config.

Thank you for your help, !

A couple questions:

  • Unreal 4.9 comes bundled with Emscripten, so my understanding is that I shouldn’t have to install separately (which I already did for 4.8). Maybe having 2 versions of Emscripten on my machine is actually causing the issues though…
  • In VS, should I be compiling the UE4 solution w/ Shipping+HTML5, or the project solution? I’ve tried both, but got build errors. I’ll try again today and report back with more specifics.

Thank you again!

Update: I’ve managed to successfully build/package a Code project.

However, Blueprint-only projects still fail.

Looking at the logs, the UBTManifest for BP-only projects assumes that my engine folder contains HTML5 Binaries and Receipts which don’t actually exist in my source version of the engine (although they do in the Binary 4.9 release):

<BuildManifest>
  <BuildProducts>
    <string>C:\Program Files\Epic Games\GithubSourceNew\Engine\Binaries\HTML5\UE4Game-HTML5-Shipping.js</string>
    <string>C:\Program Files\Epic Games\GithubSourceNew\Engine\Binaries\HTML5\UE4Game-HTML5-Shipping.js.mem</string>
    <string>C:\Program Files\Epic Games\GithubSourceNew\Engine\Binaries\HTML5\UE4Game-HTML5-Shipping.js.symbols</string>
    <string>C:\Program Files\Epic Games\GithubSourceNew\Engine\Build\Receipts\UE4Game-HTML5-Shipping.target.xml</string>
  </BuildProducts>
</BuildManifest>

I compiled the UE4 from master branch. And I have created HTML5 package from BP version of TP_Template, without starter content. All working normally.

When I Build the UE4 VS solution in Development/HTML5 configuration, I get this error:

Failed to produce item: C:\Program Files\Epic Games\GithubSourceNew\Engine\Binaries\HTML5\UE4Game.js C:\Program Files\Epic Games\GithubSourceNew\Engine\Intermediate\ProjectFiles\ERROR UE4

When I Build the BP_ThirdPerson VS solution in Development/HTML5 configuratiuon, I get this error:

Failed to produce item: C:\Users\Documents\Unreal Projects\BPTPTest1\Binaries\HTML5\BPTPTest1.js C:\Users\Documents\Unreal Projects\BPTPTest1\Intermediate\ProjectFiles\ERROR BPTPTest1

When I attempt to Package the BP_ThirdPerson project from within the Editor, I get the “Missing UE4Game Binary” message I posted in my original question.