| 1 |
:: Call this script from this directory |
| 2 |
@echo off |
| 3 |
setlocal |
| 4 |
|
| 5 |
:: You can pass additional FPC parameters as this script parameters |
| 6 |
:: So you can call, for example, 'castleengine_compile_win64.bat -dSOME_SYMBOL' |
| 7 |
set FPC_CONFIG=%* |
| 8 |
|
| 9 |
:: First auto-detect fpc.exe location |
| 10 |
for /f "tokens=*" %%i in ('fpc_path_detect.bat') do set FPC_EXE_DIR=%%i |
| 11 |
echo fpc folder: %FPC_EXE_DIR%fpc.exe |
| 12 |
|
| 13 |
:: Supposing you have cross-compilers for win32 or win64 in that folder, let's compile the library |
| 14 |
set OUT_DIR=build-win64 |
| 15 |
if not exist %OUT_DIR% mkdir %OUT_DIR% |
| 16 |
|
| 17 |
:: Change to the directory where castle-fpc.cfg is. |
| 18 |
cd ..\.. |
| 19 |
|
| 20 |
%FPC_EXE_DIR%fpc.exe -fPIC -dRELEASE @castle-fpc.cfg -dCASTLE_WINDOW_LIBRARY src/deprecated_library/castleengine.lpr -Px86_64 -FEsrc/deprecated_library/%OUT_DIR% %FPC_CONFIG% |