@@ -570,12 +570,15 @@ int main(int argc, char *argv[])
570
570
// Compile to: raylib.com/examples/<category>/<category>_example_name.wasm
571
571
// Compile to: raylib.com/examples/<category>/<category>_example_name.js
572
572
//------------------------------------------------------------------------------------------------
573
+ // WARNING 1: EMSDK_PATH must be set to proper location when calling from GitHub Actions
574
+ // WARNING 2: raylib.a and raylib.web.a must be available when compiling locally
575
+ #if defined(_WIN32 )
573
576
//putenv("RAYLIB_DIR=C:\\GitHub\\raylib");
574
- // putenv("PATH=%PATH%;C:\\raylib\\w64devkit\\bin");
575
- // WARNING: EMSDK_PATH must be set to proper location when calling from GitHub Actions
576
- system ( TextFormat ( "make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exCategory , exName ));
577
- // system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exCategory, exName));
578
-
577
+ putenv ("PATH=%PATH%;C:\\raylib\\w64devkit\\bin" );
578
+ system ( TextFormat ( "mingw32-make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exCategory , exName ));
579
+ #else
580
+ system (TextFormat ("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B " , exBasePath , exCategory , exName ));
581
+ #endif
579
582
// Update generated .html metadata
580
583
char exHtmlPath [512 ] = { 0 };
581
584
strcpy (exHtmlPath , TextFormat ("%s/%s/%s.html" , exBasePath , exCategory , exName )); // WARNING: Cache path for saving
@@ -1025,8 +1028,12 @@ int main(int argc, char *argv[])
1025
1028
((exInfo -> status & VALID_MISSING_WEB_OUTPUT ) || (exInfo -> status & VALID_MISSING_WEB_METADATA )))
1026
1029
{
1027
1030
// Build example for PLATFORM_WEB
1028
- system (TextFormat ("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exInfo -> category , exInfo -> name ));
1029
- //system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exInfo->category, exInfo->name));
1031
+ #if defined(_WIN32 )
1032
+ putenv ("PATH=%PATH%;C:\\raylib\\w64devkit\\bin" );
1033
+ system (TextFormat ("mingw32-make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exInfo -> category , exInfo -> name ));
1034
+ #else
1035
+ system (TextFormat ("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exInfo -> category , exInfo -> name ));
1036
+ #endif
1030
1037
1031
1038
// Update generated .html metadata
1032
1039
char exHtmlPath [512 ] = { 0 };
@@ -1201,15 +1208,23 @@ int main(int argc, char *argv[])
1201
1208
if (strcmp (exCategory , "others" ) != 0 ) // Skipping "others" category
1202
1209
{
1203
1210
// Build example for PLATFORM_DESKTOP
1211
+ #if defined(_WIN32 )
1204
1212
//putenv(TextFormat("RAYLIB_DIR=%s\\..", exBasePath));
1205
- // putenv("PATH=%PATH%;C:\\raylib\\w64devkit\\bin");
1213
+ putenv ("PATH=%PATH%;C:\\raylib\\w64devkit\\bin" );
1206
1214
//putenv("MAKE=mingw32-make");
1207
1215
//ChangeDirectory(exBasePath);
1216
+ system (TextFormat ("mingw32-make -C %s %s/%s PLATFORM=PLATFORM_DESKTOP -B" , exBasePath , exCategory , exName ));
1217
+ #else
1208
1218
system (TextFormat ("make -C %s %s/%s PLATFORM=PLATFORM_DESKTOP -B" , exBasePath , exCategory , exName ));
1219
+ #endif
1209
1220
1210
1221
// Build example for PLATFORM_WEB
1211
- system (TextFormat ("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exCategory , exName ));
1212
- //system(TextFormat("%s/build_example_web.bat %s/%s", exBasePath, exInfo->category, exInfo->name));
1222
+ #if defined(_WIN32 )
1223
+ putenv ("PATH=%PATH%;C:\\raylib\\w64devkit\\bin" );
1224
+ system (TextFormat ("mingw32-make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exCategory , exName ));
1225
+ #else
1226
+ system (TextFormat ("make -C %s -f Makefile.Web %s/%s PLATFORM=PLATFORM_WEB -B" , exBasePath , exCategory , exName ));
1227
+ #endif
1213
1228
1214
1229
// Update generated .html metadata
1215
1230
char exHtmlPath [512 ] = { 0 };
0 commit comments