From 3b16a72302bdb4a9f0738b2c6ddc0d7d9fbd401f Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 25 Aug 2025 21:23:30 +0200 Subject: [PATCH] REXM: Allow building web examples locally on Windows platform --- tools/rexm/rexm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/rexm/rexm.c b/tools/rexm/rexm.c index 5e31f50d3..33bc6bdfa 100644 --- a/tools/rexm/rexm.c +++ b/tools/rexm/rexm.c @@ -656,9 +656,12 @@ int main(int argc, char *argv[]) // Recompile example (on raylib side) // WARNING: EMSDK_PATH must be set to proper location when calling from GitHub Actions - system(TextFormat("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename)); - //system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exRecategory, exRename)); - +#if defined(_WIN32) + putenv("PATH=%PATH%;C:\\raylib\\w64devkit\\bin"); + system(TextFormat("mingw32-make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename)); +#else + system(TextFormat("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename)); +#endif // Update generated .html metadata char exHtmlPath[512] = { 0 }; strcpy(exHtmlPath, TextFormat("%s/%s/%s.html", exBasePath, exCategory, exName)); // WARNING: Cache path for saving