emscripten.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 1. Start from readme.txt
  2. 2. emscripten build configured with CMakeFiles
  3. How to build. Steps:
  4. - Install Emscripten SDK and setup it. Latest tested version 1.37.22 required
  5. - Install CMake
  6. - Install JDK version 7/8
  7. - if you are Windows user you need also install Make tool:
  8. - Install GnuMake (http://gnuwin32.sourceforge.net/packages/make.htm) or any other
  9. - add it to PATH environment variable
  10. - Open Folder explorer > This PC > System Properties > Advanced Settings > Environmental Variables > Go to PATH > Click Edit > Add ";/your/path/here"
  11. - Configure environment variables properly:
  12. JAVA_HOME points to JDK
  13. example: c:\Program Files (x86)\Java\jdk1.6.0_26\
  14. - Add necessary paths to environment variable PATH:
  15. Emscripten
  16. example: d:\Emscripten\
  17. JDK
  18. example: "c:\Program Files (x86)\Java\jdk1.6.0_26\bin\"
  19. - *emsc bug and workaround http://oxygine.org/forum/viewtopic.php?f=6&t=3295
  20. - Select any example from examples folder. For example "Demo"
  21. - Go to folder oxygine-framework/examples/Demo/proj.cmake
  22. - run: build_emsc.bat
  23. - Go to new created "build_emsc" folder and open Demo.html with Browser
  24. emsc bug:
  25. https://github.com/kripken/emscripten/issues/4730
  26. change
  27. _glutInitDisplayMode(0xB2 /* GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_MULTISAMPLE | GLUT_STENCIL */);
  28. to
  29. _glutInitDisplayMode(0x32 /* GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL */);
  30. 2b. You could generate your own emscipten build configuration
  31. =================================================================================================
  32. - You need python 2.7 installed
  33. - You need to run this script
  34. oxygine-framework\tools\gen_template.py
  35. example:
  36. python gen_template.py MyProject -t cmake -d path/to/MyProject/