Build source for html5 packaging on OSX?

Hello everyone,

I’m pretty new to all this but researching for a project and have to deliver a prototype on html5.
I downloaded sourcecode, all required packs und optional one.
After I build everything with Xcode I was finally able to see tab “html5” in project settings but not in the “package project” menu under “file”.

html5 tab unter project settings has no content by way.

Can someone help me with a kind of “idiot safe” discription how I can get this running on a MAC?

Best Regards and thanks for checking this.

Hey

Have you followed instructions here?

http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

Currently, HTML5 will not show up in Xcode. On Mac, you will only be able to build from Unreal Frontend.

We are working on accessing this in binary version of engine, but that likely will not appear until 4.6.

Hey ,
thanks for reply.
Yes - so I have emscripten installed (I can access emsdk via terminal etc.)
I’m still not able to get html5 showing up - also not in Unreal Frontend
There is just iOS, Mac and Android showing up in list of the. :-/

edit: I made a new build with version 4.5 and now I have html5 option showing up but it opens a browser window which is linked to documentation about html5.

Best

Hey Giraffentoaster. It looks like you’re mostly there. Unreal needs a couple of environment variables set to be able to find Emscripten. Basic steps are:
Open a terminal and enter

sudo nano /etc/launchd.conf
Then in nano add follow to file (file may be blank)

setenv EMSCRIPTEN $EMSDK_PATH/emscripten/1.22.0

setenv EMSCRIPTEN_ROOT $EMSDK_PATH/emscripten/1.22.0

setenv LLVM_ROOT $EMSDK_PATH/clang/e1.22.0_64bit

setenv NODE_JS $EMSDK_PATH/node/0.10.18_64bit

Where $EMSDK_PATH is path to where you’ve installed emscripten sdk :slight_smile:
Ctrl+O to save and Crtl+X to quit nano then in terminal enter:

grep -E “^setenv” /etc/launchd.conf | xargs -t -L 1 launchctrl

Restart your Mac and hopefully you’re good to go… :slight_smile:

Jojo2nd - made my day :slight_smile: thank you so much!

finally packaging for html5 starts but I get error that the “UE4Game-HTML5-Shipping.js” is missing. Now I try a rebuild of Engine. Maybe problem is depending on file naming? because my binarys are called “UE4Editor-Mac-Debug”.

edit: and following “RunUAT ERROR: AutomationTool was unable to run successfully.”

edit2: I’ts getting even worse. Cant run Editor anymore (crashes) after I build it in Xcode for Profiling (was a try because filenaming would be right)

edit3: It seems so, that engine is looking for automationtool.exe file but… why is it looking for an exe if i work on a mac?

I added full output log here:

UPDATE:

I tried project launcher and UAT and cooking was successful. but then I received errors:

LOGFILE PROJECT LAUNCHER

finally I can build html5!
But having some issues with black textures.

Hey

Glad you got it working! Were you able to get past those errors, then? If so, would you mind telling us how so any other users with same errors can see? Thanks!

As for black textures, that sounds like an unrelated issue. If you’re still experiencing that, please open a new post in Bug Reports section and we can take a look at it there.

Hey ,

yes. I really just followed instructions of you really detailed:

  1. I downloaded Engine (4.5 Branch) manually from github.
  2. I downloaded and unpacked all required and optional packes which I copied into my Engine folder (Drag and Drop with ALT-Key pressed, so I was able to keep newer files)
  3. I downloaded emscripten-sdk (emsdk), unpacked it to my documents folder and executed following commands after navigating in folder in terminal
  4. emsdk update
  5. emsdk install latest
  6. emsdk activate latest

Now I have new folders in emsdk folder which I added into my environment variables like JoJo_2nd told me:

run following command

sudo nano /etc/launchd.conf

add this lines (replace $EMSDK_PATH with path on your computer)

setenv EMSCRIPTEN $EMSDK_PATH/emscripten/1.22.0
setenv EMSCRIPTEN_ROOT $EMSDK_PATH/emscripten/1.22.0
setenv LLVM_ROOT $EMSDK_PATH/clang/e1.22.0_64bit
setenv NODE_JS $EMSDK_PATH/node/0.10.18_64bit

(ctrl-o and press enter for saving file - ctrl-x for exit)

run following
grep -E “^setenv” /etc/launchd.conf | xargs -t -L 1 launchctrl (launchctrl didn’t work so I endet after number 1)

after all this I installed also Java (just in case)

RESTARTED MY MAC!

I generated xcode project with GenerateProject in Engine folder.
Build Engine in Xcode from 4.5 Branch (Editor, Frontend, Lightmass, Headertool)

Then I started Editor - when I try to package from editor to html5 - I received all errors I listed above.
Then I tried Frontend and created a custom launchprofile (don’t forget to activate BUILD checkbox in profile)

So like you told me - Packaging from FrontEnd works!

And it worked. I was also able to open html file locally in Firefox (without any server apps like XAMPP)

Glad you got it working. Reading through your error log only bit missing was BUILD step which you figured out :slight_smile: Hopefully, that won’t be needed with next release (4.6)