From 8692847973803f5b6631a322cad6b6df56a84b8e Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 10 Feb 2023 19:00:07 +0000 Subject: [PATCH] docs: Make emscripten path warning more obvious. --- docs/Emscripten.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/Emscripten.md b/docs/Emscripten.md index 42c20cf9a..21492a2ab 100644 --- a/docs/Emscripten.md +++ b/docs/Emscripten.md @@ -4,7 +4,7 @@ Building in Emscripten - asm.js/WebAssembly - works on Linux and WSL. You will need to install the emscripten compiler. See https://emscripten.org/docs/getting_started/downloads.html for complete instructions, but generally you should just browse to your desired directory and: -``` +```shell git clone https://github.com/emscripten-core/emsdk.git cd emsdk ./emsdk install latest @@ -14,16 +14,21 @@ source ./emsdk_env.sh You should now have commands like `emcc` in your path, and an `EMSDK` environment variable set ready to build your project. -In your project directory: +In your project directory create a new build directory, enter it and configure your project: -``` shell +```shell mkdir build.em cd build.em emcmake cmake .. -D32BLIT_DIR="/path/to/32blit/repo" +``` + +:warning: Make sure to include the `-D32BLIT_DIR="/path/to/32blit/repo"` parameter to the `cmake` command (even when building the SDK examples). You must specify an absolute path here when building with Emscripten. + +Once CMake has finished configuring your project you can build it: + +```shell make python3 -m http.server ``` -Make sure to include the `-D32BLIT_DIR="/path/to/32blit/repo"` parameter to the `cmake` command (even when building the SDK examples). You must specify an absolute path here when building with Emscripten. - Finally, open the URL given by Python's HTTP server in your browser and open your project's .html file.