You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 regels
1.3 KiB

  1. ::@echo off
  2. :: .
  3. :: Compile your examples using: raylib_compile_execute.bat core/core_basic_window.c
  4. :: .
  5. :: > Setup required Environment
  6. :: -------------------------------------
  7. set RAYLIB_INCLUDE_DIR=C:\raylib\raylib\src
  8. set RAYLIB_LIB_DIR=C:\raylib\raylib\src
  9. set RAYLIB_RES_FILE=C:\raylib\raylib\src\raylib.rc.data
  10. set COMPILER_DIR=C:\raylib\w64devkit\bin
  11. set PATH=%PATH%;%COMPILER_DIR%
  12. :: Get full filename path for input file %1
  13. set FILENAME=%~f1
  14. set NAMEPART=%FILENAME:~0,-2%
  15. cd %~dp0
  16. :: .
  17. :: > Cleaning latest build
  18. :: ---------------------------
  19. cmd /c if exist %NAMEPART%.exe del /F %NAMEPART%.exe
  20. :: .
  21. :: > Compiling program
  22. :: --------------------------
  23. :: -s : Remove all symbol table and relocation information from the executable
  24. :: -O2 : Optimization Level 2, this option increases both compilation time and the performance of the generated code
  25. :: -std=c99 : Use C99 language standard
  26. :: -Wall : Enable all compilation Warnings
  27. :: -mwindows : Compile a Windows executable, no cmd window
  28. gcc -o %NAMEPART%.exe %FILENAME% %RAYLIB_RES_FILE% -s -O2 -I%RAYLIB_INCLUDE_DIR% -L%RAYLIB_LIB_DIR% -lraylib -lopengl32 -lgdi32 -lwinmm -std=c99 -Wall -mwindows
  29. :: .
  30. :: > Executing program
  31. :: -------------------------
  32. cmd /c if exist %NAMEPART%.exe %NAMEPART%.exe