2
0

BuildExtDemosDelphi.bat 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. @echo OFF
  2. echo Building Extension Demos using Delphi
  3. rem Important! Set this dirs on your system for the demos to compile!
  4. set SDLDIR=
  5. set OPENGLDIR=
  6. set D3DDIR=
  7. set ROOTDIR=..
  8. set DEMOPATH=%ROOTDIR%\Demos\ObjectPascal
  9. set OUTPUT=-E%ROOTDIR%\Demos\Bin
  10. set UNITS=-U%ROOTDIR%\Source -U%ROOTDIR%\Source\JpegLib -U%ROOTDIR%\Source\ZLib -U%DEMOPATH%\Common
  11. set UNITS=%UNITS% -U%ROOTDIR%\Source\Extensions -U%ROOTDIR%\Extras\Extensions -U"%SDLDIR%" -U"%OPENGLDIR%" -U"%D3DDIR%"
  12. set INCLUDE=-I%ROOTDIR%\Source -I"%SDLDIR%" -I"%OPENGLDIR%" -I"%D3DDIR%"
  13. set OPTIONS=
  14. set DEMOSBUILD=0
  15. set DEMOCOUNT=3
  16. set CURRDEMO=SDLDemo\SDLDemo.dpr
  17. if "%SDLDIR%"=="" (echo SDL search directory not set - skipping %CURRDEMO%) else (call :BUILD %CURRDEMO%)
  18. set CURRDEMO=OpenGLDemo\OpenGLDemo.dpr
  19. if "%OPENGLDIR%"=="" (echo OpenGL search directory not set - skipping %CURRDEMO%) else (call :BUILD %CURRDEMO%)
  20. set CURRDEMO=D3DDemo\D3DDemo.dpr
  21. if "%D3DDIR%"=="" (echo D3D search directory not set - skipping %CURRDEMO%) else (call :BUILD %CURRDEMO%)
  22. goto END
  23. :BUILD
  24. dcc32 %OPTIONS% %DEMOPATH%\%1 %OUTPUT% %UNITS% %INCLUDE%
  25. if errorlevel 1 (echo Error when building %1) else (set /a DEMOSBUILD+=1)
  26. goto :EOF
  27. :END
  28. if "%DEMOSBUILD%"=="%DEMOCOUNT%" (
  29. echo Build Successful - all %DEMOSBUILD% of %DEMOCOUNT% build
  30. ) else (
  31. echo Errors during building - only %DEMOSBUILD% of %DEMOCOUNT% demos build
  32. )
  33. call Clean.bat