| 1 |
# ---------------------------------------------------------------------------- |
| 2 |
# PowerShell (for Windows) script to compile build tool, |
| 3 |
# using only FPC (no lazbuild, no previous castle-engine necessary). |
| 4 |
# ---------------------------------------------------------------------------- |
| 5 |
|
| 6 |
# Allow calling this script from tools/build-tool/ subdirectory of CGE. |
| 7 |
# It will just cd to the top-level CGE directory (necessary as castle-fpc.cfg |
| 8 |
# contains paths relative to it). |
| 9 |
if (Test-Path castle_engine.dpr) { |
| 10 |
cd ../.. |
| 11 |
} |
| 12 |
|
| 13 |
New-Item -Path tools/build-tool/ -Name castle-engine-output -ItemType "directory" -Force |
| 14 |
New-Item -Path tools/build-tool/castle-engine-output/ -Name build-tool-compilation -ItemType "directory" -Force |
| 15 |
|
| 16 |
fpc ` |
| 17 |
-dRELEASE ` |
| 18 |
-dCASTLE_STRICT_CLI ` |
| 19 |
@castle-fpc.cfg ` |
| 20 |
-FEtools/build-tool/ ` |
| 21 |
-FUtools/build-tool/castle-engine-output/build-tool-compilation ` |
| 22 |
-Futools/common-code/ ` |
| 23 |
-Futools/build-tool/code/ ` |
| 24 |
-Futools/build-tool/embedded_images/ ` |
| 25 |
tools/build-tool/castle_engine.dpr |
| 26 |
|
| 27 |
# Make final exe name with -, not _ . |
| 28 |
# Note: Using PowerShell Move-Item, not Rename-Item, because Rename-Item |
| 29 |
# (with with -Force) cannot overwrite destination. |
| 30 |
Move-Item -Path "tools/build-tool/castle_engine.exe" -Destination "tools/build-tool/castle-engine.exe" -Force |