emscripten.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.36 recommended
  5. - Install CMake (don't forget add it to PATH)
  6. - if you are Windows user you need also install Make tool:
  7. - Install GnuMake (http://gnuwin32.sourceforge.net/packages/make.htm) or any other
  8. - add it to PATH environment variable
  9. - Open Folder explorer > This PC > System Properties > Advanced Settings > Environmental Variables > Go to PATH > Click Edit > Add ";/your/path/here"
  10. - Add necessary paths to environment variable PATH:
  11. Emscripten
  12. example: d:\emsdk\
  13. - Select any example from examples folder. For example "Demo"
  14. - Go to folder oxygine-framework/examples/Demo/proj.cmake
  15. - run: build_emsc.bat
  16. - Go to new created "build_emsc" folder and open Demo.html with Browser
  17. *emsc slow performance bug workaround (https://github.com/kripken/emscripten/issues/4730):
  18. open file emsdk\emscripten\1.37.36\src\library_egl.js
  19. find line:
  20. _glutInitDisplayMode(displayMode);
  21. and replace it with:
  22. displayMode = 0x32; _glutInitDisplayMode(displayMode);
  23. 2b. You could generate your own emscipten build configuration
  24. =================================================================================================
  25. - You need python 2.7 installed
  26. - You need to run this script
  27. oxygine-framework\tools\gen_template.py
  28. example:
  29. python gen_template.py MyProject -t cmake -d path/to/MyProject/