Updated Working for Web (HTML5) (markdown)

Ray
2022-01-20 21:07:49 +01:00
parent d8b6b98e3f
commit bc4e166a64

@ -75,6 +75,8 @@ NOTE: `mingw32-make.exe` is provided by MinGW toolchain, other compiler toolchai
If you are using the provided raylib installer with Notepad++, it comes with a Notepad++ script ready to compile raylib library using makefile, the script configures required paths and calls required `Makefile`. To do this, start up Notepad++ for raylib, open the `raylib.h` file, press F6, choose `raylib_makefile`, verify that in the script the web platform is set (`SET PLATFORM=PLATFORM_WEB`) and click OK to run the script. If you are using the provided raylib installer with Notepad++, it comes with a Notepad++ script ready to compile raylib library using makefile, the script configures required paths and calls required `Makefile`. To do this, start up Notepad++ for raylib, open the `raylib.h` file, press F6, choose `raylib_makefile`, verify that in the script the web platform is set (`SET PLATFORM=PLATFORM_WEB`) and click OK to run the script.
Note that current raylib/src/Makefile just adds/replace the compiled modules to any existing `libraylib.a` (instead of recreating it) so, if you had a previously compiled `libraylib.a` for desktop and you recompile raylib src for web, old modules are still inside `libraylib.a`. Solution: just delete `libraylib.a` and recompile it for `PLATFORM_WEB` or the new platform.
* For Linux/macOS users : * For Linux/macOS users :
Before compiling raylib, make sure all paths to emscripten installation (`EMSDK_PATH`) and emscripten required tools (Clang, Python, Node) are correctly configured on `raylib/src/Makefile`, you must verify [these lines](https://github.com/raysan5/raylib/blob/master/src/Makefile#L156). Before compiling raylib, make sure all paths to emscripten installation (`EMSDK_PATH`) and emscripten required tools (Clang, Python, Node) are correctly configured on `raylib/src/Makefile`, you must verify [these lines](https://github.com/raysan5/raylib/blob/master/src/Makefile#L156).