FIXED: rexm's makefile and default paths

Fixed a windows only backslash in
rexm's makefile causing build errors on macOS and linux

Added unix paths to rexm for better compatibility
This commit is contained in:
Teeto44 2025-10-01 00:42:33 -04:00
parent 6ed61e107b
commit db46e540d6
2 changed files with 13 additions and 4 deletions

View File

@ -35,7 +35,7 @@ PROJECT_BUILD_PATH ?= .
PROJECT_SOURCE_FILES ?= rexm.c PROJECT_SOURCE_FILES ?= rexm.c
# raylib library variables # raylib library variables
RAYLIB_SRC_PATH ?= ..\..\src RAYLIB_SRC_PATH ?= ../../src
RAYLIB_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH) RAYLIB_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)
RAYLIB_LIB_PATH ?= $(RAYLIB_SRC_PATH) RAYLIB_LIB_PATH ?= $(RAYLIB_SRC_PATH)
@ -363,4 +363,3 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
del *.o *.html *.js del *.o *.html *.js
endif endif
@echo Cleaning done @echo Cleaning done

View File

@ -205,12 +205,22 @@ int main(int argc, char *argv[])
exCollectionFilePath = getenv("REXM_EXAMPLES_COLLECTION_FILE_PATH"); exCollectionFilePath = getenv("REXM_EXAMPLES_COLLECTION_FILE_PATH");
exVSProjectSolutionFile = getenv("REXM_EXAMPLES_VS2022_SLN_FILE"); exVSProjectSolutionFile = getenv("REXM_EXAMPLES_VS2022_SLN_FILE");
#if defined(_WIN32)
if (!exBasePath) exBasePath = "C:/GitHub/raylib/examples"; if (!exBasePath) exBasePath = "C:/GitHub/raylib/examples";
if (!exWebPath) exWebPath = "C:/GitHub/raylib.com/examples"; if (!exWebPath) exWebPath = "C:/GitHub/raylib.com/examples";
if (!exTemplateFilePath) exTemplateFilePath = "C:/GitHub/raylib/examples/examples_template.c"; if (!exTemplateFilePath) exTemplateFilePath = "C:/GitHub/raylib/examples/examples_template.c";
if (!exTemplateScreenshot) exTemplateScreenshot = "C:/GitHub/raylib/examples/examples_template.png"; if (!exTemplateScreenshot) exTemplateScreenshot = "C:/GitHub/raylib/examples/examples_template.png";
if (!exCollectionFilePath) exCollectionFilePath = "C:/GitHub/raylib/examples/examples_list.txt"; if (!exCollectionFilePath) exCollectionFilePath = "C:/GitHub/raylib/examples/examples_list.txt";
if (!exVSProjectSolutionFile) exVSProjectSolutionFile = "C:/GitHub/raylib/projects/VS2022/raylib.sln"; if (!exVSProjectSolutionFile) exVSProjectSolutionFile = "C:/GitHub/raylib/projects/VS2022/raylib.sln";
#else
// Cross-platform relative fallbacks (run from tools/rexm directory)
if (!exBasePath) exBasePath = "../../examples";
if (!exWebPath) exWebPath = "../../examples";
if (!exTemplateFilePath) exTemplateFilePath = "../../examples/examples_template.c";
if (!exTemplateScreenshot) exTemplateScreenshot = "../../examples/examples_template.png";
if (!exCollectionFilePath) exCollectionFilePath = "../../examples/examples_list.txt";
if (!exVSProjectSolutionFile) exVSProjectSolutionFile = "../../projects/VS2022/raylib.sln";
#endif
char inFileName[1024] = { 0 }; // Example input filename (to be added) char inFileName[1024] = { 0 }; // Example input filename (to be added)
@ -436,7 +446,7 @@ int main(int argc, char *argv[])
SaveFileText(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName), exTextUpdated[1]); SaveFileText(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName), exTextUpdated[1]);
for (int i = 0; i < 6; i++) { MemFree(exTextUpdated[i]); exTextUpdated[i] = NULL; } for (int i = 0; i < 6; i++) { MemFree(exTextUpdated[i]); exTextUpdated[i] = NULL; }
UnloadFileText(exText); UnloadFileText(exText);
} } break;
case OP_ADD: // Add: Example from command-line input filename case OP_ADD: // Add: Example from command-line input filename
{ {
// Add: raylib/examples/<category>/<category>_example_name.c // Add: raylib/examples/<category>/<category>_example_name.c