mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-27 01:09:17 -05:00
Updated Working for Web (HTML5) (markdown)
@ -175,12 +175,12 @@ raylib examples [`Makefile`](https://github.com/raysan5/raylib/blob/master/examp
|
|||||||
|
|
||||||
To compile raylib game directly from the command line, those are the commands to run:
|
To compile raylib game directly from the command line, those are the commands to run:
|
||||||
|
|
||||||
* Without `ASINCIFY`
|
* Without `ASYNCIFY`
|
||||||
```
|
```
|
||||||
emcc -o game.html game.c -Os -Wall ./path-to/libraylib.a -I. -Ipath-to-raylib-h -L. -Lpath-to-libraylib-a -s USE_GLFW=3 --shell-file path-to/shell.html -DPLATFORM_WEB
|
emcc -o game.html game.c -Os -Wall ./path-to/libraylib.a -I. -Ipath-to-raylib-h -L. -Lpath-to-libraylib-a -s USE_GLFW=3 --shell-file path-to/shell.html -DPLATFORM_WEB
|
||||||
```
|
```
|
||||||
|
|
||||||
* With `ASINCIFY`
|
* With `ASYNCIFY`
|
||||||
```
|
```
|
||||||
emcc -o game.html game.c -Os -Wall ./path-to/libraylib.a -I. -Ipath-to-raylib-h -L. -Lpath-to-libraylib-a -s USE_GLFW=3 -s ASYNCIFY --shell-file path-to/shell.html -DPLATFORM_WEB
|
emcc -o game.html game.c -Os -Wall ./path-to/libraylib.a -I. -Ipath-to-raylib-h -L. -Lpath-to-libraylib-a -s USE_GLFW=3 -s ASYNCIFY --shell-file path-to/shell.html -DPLATFORM_WEB
|
||||||
```
|
```
|
||||||
@ -193,7 +193,7 @@ The compilation line is quite standard, similar to any other compiler and platfo
|
|||||||
-Ipath // Include path to look for additional #include .h files (if required)
|
-Ipath // Include path to look for additional #include .h files (if required)
|
||||||
-Lpath // Library path to look for additional library .a files (if required)
|
-Lpath // Library path to look for additional library .a files (if required)
|
||||||
-s USE_GLFW=3 // We tell the linker that the game/library uses GLFW3 library internally, it must be linked automatically (emscripten provides the implementation)
|
-s USE_GLFW=3 // We tell the linker that the game/library uses GLFW3 library internally, it must be linked automatically (emscripten provides the implementation)
|
||||||
-s ASINCIFY // Add this flag ONLY in case we are using ASYNCIFY code
|
-s ASYNCIFY // Add this flag ONLY in case we are using ASYNCIFY code
|
||||||
--shell-file path-to/shell.html // All webs need a "shell" structure to load and run the game, by default emscripten has a `shell.html` but we can provide or own
|
--shell-file path-to/shell.html // All webs need a "shell" structure to load and run the game, by default emscripten has a `shell.html` but we can provide or own
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user