Skip to content

Commit 3b16a72

Browse files
committed
REXM: Allow building web examples locally on Windows platform
1 parent 6343251 commit 3b16a72

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/rexm/rexm.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,12 @@ int main(int argc, char *argv[])
656656

657657
// Recompile example (on raylib side)
658658
// WARNING: EMSDK_PATH must be set to proper location when calling from GitHub Actions
659-
system(TextFormat("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename));
660-
//system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exRecategory, exRename));
661-
659+
#if defined(_WIN32)
660+
putenv("PATH=%PATH%;C:\\raylib\\w64devkit\\bin");
661+
system(TextFormat("mingw32-make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename));
662+
#else
663+
system(TextFormat("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exBasePath, exRecategory, exRename));
664+
#endif
662665
// Update generated .html metadata
663666
char exHtmlPath[512] = { 0 };
664667
strcpy(exHtmlPath, TextFormat("%s/%s/%s.html", exBasePath, exCategory, exName)); // WARNING: Cache path for saving

0 commit comments

Comments
 (0)