Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

31 linhas
1.2 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:\GitHub\raylib\src
  8. set RAYLIB_LIB_DIR=C:\GitHub\raylib\src
  9. set RAYLIB_RES_FILE=C:\GitHub\raylib\raylib.rc.data
  10. set COMPILER_DIR=C:\raylib\mingw\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% -I%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