# What to compile for HTML5 packaging?

**URL:** <https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612>\
**Category:** Platform & Builds\
**Tags:** HTML5, unreal-engine, package-project, question\
**Created:** [August 21, 2014, 3:52pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612 "2014-08-21T15:52:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexstoinescu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alexstoinescu](https://forums.unrealengine.com/u/alexstoinescu)\
**Post date:** [August 21, 2014, 3:52pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/1 "2014-08-21T15:52:14Z")

</div>

I would like to package my project for HTML5, but I do not know what it is that I need to compile and in what order. Every time I try to package, the process ends with an error saying that AutomationTool failed to execute, which I assume is because I didn’t compile everything that was needed.

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [August 21, 2014, 7:14pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/2 "2014-08-21T19:14:41Z")

</div>

Im having the same issue, but I think it may be because I forgot to extract the optional.zip onto my 4.4 branch. Im doing a full project rebuild right now and I’ll let you know if that fixes the html automation tool failure im getting.

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [August 21, 2014, 9:01pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/3 "2014-08-21T21:01:50Z")

</div>

**Here is what I did to get it working**

**Build tools:**

1. I checked out the 4.4 branch from github
2. Downloaded and extracted the required1, required2, and optional zip files into the engine folder
3. Generated project files with GernerateProjectFiles.bat
4. Opened UE4.sln
5. Built the solution
6. Built the UnrealFrontend program
7. Built the UnrealHeaderTool program

The HTML5 documentation fails to mention a few key parts of the process that you need to set on your project

Firstly, you will need to set a default game mode in your project settings

![13379-projectsettingspng.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/d/29dafd1f07837f02cdbb59eb75ae3cec49c9ece6.png)

Take note of your game default map, as this will be the map that starts up first.

**Next you will need to open up the unreal frontend launcher (Engine/Binaries/Win64/UnrealFrontend.exe) and do the following:**

1. Switch to ‘Game Launcher’ tab
2. Choose ‘Advanced…’ at the left
3. Create a new profile (if one does not already exist) by clicking the ‘+’ button in the upper-right
4. Build: Do you wish to build? (tick this checkbox)
5. Cook: By the book (selected any maps you want to cook under the Cooked Maps group)
6. Package: Package & store locally (fields can be blank)
7. Deploy: Copy to device (add a new group and tick item with HTML5 icon if its there)
8. You can now ‘Launch’ the build process

If you hit the preview settings button before you press launch, it should look something like this:

 ![13380-launchersettingspng.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/0/410495e5789d1abfdd0351429923c1507a765ec4.png)

If all goes well, you’ll end up with a working HTML5 build in Unreal Projects//Binaries/HTML5

**Just a few things to remember:**

- You need a 64bit nightly build of FireFox or Chrome to test it out
- If you select the shipping build configuration on step 3 it will make your download much small (and maybe work w/ 32bit browsers)
- You will need to ‘host’ these files and open them in the browser vs just file-\>opening them. I recommend XAMPP for your local hosting. Just copy all the files to the proper htdocs directory in XAMPP.

---

<div class="post-metadata">

**Author:** ![alexstoinescu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alexstoinescu](https://forums.unrealengine.com/u/alexstoinescu)\
**Post date:** [August 22, 2014, 3:13pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/4 "2014-08-22T15:13:27Z")

</div>

Thank you, your instructions helped me get the project to build but still I’m not able to play the game in my browser. I did move all the generated files to XAMPP. When I open the HTML file (through localhost) there’s a loading bar at the top that’s stuck on ‘Downloading…’ and after a while a console appears at the bottom that shows just the number 113. I opened the HTML file through Firefox Nightly. Here’s a screenshot of the console: [http://i.imgur.com/sJXk0bo.jpg](http://i.imgur.com/sJXk0bo.jpg)

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [August 23, 2014, 5:56pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/5 "2014-08-23T17:56:38Z")

</div>

Not sure exactly what that is. Did you build with shipping? If you did, try building w/ development and it may give you some more ideas as to what is causing the issue.

---

<div class="post-metadata">

**Author:** ![alexstoinescu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alexstoinescu](https://forums.unrealengine.com/u/alexstoinescu)\
**Post date:** [August 26, 2014, 12:35pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/6 "2014-08-26T12:35:56Z")

</div>

I managed to get it to work by following your instructions, but only under 4.3. In 4.4 I got an error saying that HTML5 is an invalid target platform during the cook phase.

---

<div class="post-metadata">

**Author:** ![Reality-X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reality-X](https://forums.unrealengine.com/u/Reality-X)\
**Post date:** [August 27, 2014, 8:06pm UTC](https://forums.unrealengine.com/t/what-to-compile-for-html5-packaging/291612/7 "2014-08-27T20:06:16Z")

</div>

Thats interesting, maybe had to regen project files for the 4.4 branch?
