Description:Setting up for development for the HTML5 platform.
[TOC(start:2 end:3)]
## Disclaimer
[REGION:todo]
The HTML5 pipeline is currently experimental. Some projects may not run properly when built for the HTML5 platform. Expect some rough edges.
[/REGION:todo]
%Globals:BinarySourceSelectVar%
[OBJECT:ToggleButtonContent]
[PARAMLITERAL:category]
BinarySourceSelect
[/PARAMLITERAL]
[PARAMLITERAL:id]
binaryinstall
[/PARAMLITERAL]
[PARAMLITERAL:active]
active_button_content
[/PARAMLITERAL]
[PARAM:content]
%binary%
[/PARAM]
[/OBJECT]
[OBJECT:ToggleButtonContent]
[PARAMLITERAL:category]
BinarySourceSelect
[/PARAMLITERAL]
[PARAMLITERAL:id]
sourceinstall
[/PARAMLITERAL]
[PARAMLITERAL:active]
[/PARAMLITERAL]
[PARAM:content]
%source%
[/PARAM]
[/OBJECT]
[VAR:source]
## Source and Github Users
Building HTML5 platform as a target platform is supported on both Windows and Mac Host platforms.
HTML5 uses the [**emscripten**](https://github.com/kripken/emscripten) tool chain from [Mozilla](https://www.mozilla.org/en-US/) to cross compile C++ into javascript. It is distributed in source form, published SDKs or portable distributions. UE4 build system supports all of them with few steps.
* Clone **Fastcomp** repository and build it \[[howto](http://kripken.github.io/emscripten-site/docs/building_from_source/building_fastcomp_manually_from_source.html)\]
### .emscripten Config File Setup
The **emscripten** tool chain a needs a config file .emscripten to function properly. Follow this emscripten [document](http://kripken.github.io/emscripten-site/docs/building_from_source/configuring_emscripten_settings.html) to setup the file correctly.
### Installing from SDK.
Follow instructions on emscripten [website](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html). It’s normally best to install the latest SDK version.
### Unreal Engine 4 Setup.
* Fork and clone the Unreal Engine 4 repository \[[UnrealEngine](https://github.com/EpicGames/UnrealEngine)\]
* Within a shell run `Setup.bat -include=HTML5`
* Edit `Engine\Config\HTML5\HTML5Engine.ini` and setup path to the SDK for your OS under `\[HTML5SDkPaths\]` section. Add the section if required. Also add the path to your Python install, normally this is included in you emscripten SDK install. If Python is on your PATH you can skip this step. It should look like:
Make sure you have major browsers installed and links in `HTML5Engine.ini` under `\[HTML5DevicesWindows\]` section point to the right browser binaries.
Follow the instructions on [https://github.com/EpicGames/UnrealEngine](https://github.com/EpicGames/UnrealEngine) to build the editor. Set your solution configuration to **Development** and your solution platform to **HTML5** to build HTML5.
Please refer to [http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#verifying-the-installation](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#verifying-the-installation) for emscripten on Mac OS issues. And follow the above steps to setup UE4. Right now there’s no way to build HTML5 within xcode - however you can build HTML5 from command line using existing scripts which are invoked by xcode. e.g.
Engine\Build\Batchfiles\Mac\Build.sh UE4Game HTML5 Development
[/VAR]
[VAR:binary]
## Binary and Launcher Users
1. [Install emscripten](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html). For Windows users, it's advised to simply use the [emscripten SDK Web Installer](https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-1.29.0-web-64bit.exe).
[REGION:note]
Though the web installer for emscripten will append its path to the System Path environment variable, just check to make sure it was.