From 7b93591676f70daea9d80231e2f88165cfeadeec Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 5 Aug 2025 09:54:51 +0200 Subject: [PATCH] Added some notes to avoid platform-dependant .BAT scripts --- tools/rexm/rexm.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/rexm/rexm.c b/tools/rexm/rexm.c index 9dc7740fd..9de591ad7 100644 --- a/tools/rexm/rexm.c +++ b/tools/rexm/rexm.c @@ -499,8 +499,24 @@ int main(int argc, char *argv[]) // Compile to: raylib.com/examples//_example_name.wasm // Compile to: raylib.com/examples//_example_name.js //------------------------------------------------------------------------------------------------ - // TODO: Avoid platform-specific .BAT, not portable and it does not consider RESOURCES for Web properly, - // Makefile.Web should be used... but it requires proper editing first! + // TODO: Avoid platform-specific .BAT file + /* + SET RAYLIB_PATH=C:\GitHub\raylib + SET COMPILER_PATH=C:\raylib\w64devkit\bin + ENV_SET PATH=$(COMPILER_PATH) + SET MAKE=mingw32-make + $(MAKE) -f Makefile.Web shaders/shaders_deferred_render PLATFORM=$(PLATFORM) -B + + //int putenv(char *string); // putenv takes a string of the form NAME=VALUE + //int setenv(const char *envname, const char *envval, int overwrite); + //int unsetenv(const char *name); //unset variable + putenv("RAYLIB_DIR=C:\\GitHub\\raylib"); + putenv("PATH=%PATH%;C:\\raylib\\w64devkit\\bin"); + setenv("RAYLIB_DIR", "C:\\GitHub\\raylib", 1); + unsetenv("RAYLIB_DIR"); + getenv("RAYLIB_DIR"); + system(TextFormat("make -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B", exCategory, exName)); + */ system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exCategory, exName)); // Copy results to web side