This repo contains two scripts for Windows to grab FPC and Lazarus sources and build them including cross-build.
gitbinary inPATH.
Source retrieval uses git repositories so git must be accessible. Exporting from SVN is not supported.
- Minimal FPC distribution
Get it from here.
- Linux binaries and libs
For cross-compiling to Linux, binaries and libs are needed. You can get them:
- From CodeTyphon site
- By installing full setup
- From Releases section of this repo (these are exact copies from CodeTyphon site)
-
Create a directory
{FPCFromSources}where FPC and Lazarus will be -
Put
update.bat,build.bat,buildall.batto that folder -
Download minimal FPC, unpack it to that folder and rename to
fpc-min -
For Linux cross-compiling:
4.1. Download full setup and install it to temporary folder
{TmpFullInstall}. Copy{TargetCPU}-linux-*.exe(where{TargetCPU}isi386and/orx86_64) from{TmpFullInstall}\fpc\bin\i386-win32to{FPCFromSources}\fpc-min\bin\{TargetCPU}-linuxfolders.OR
4.2. You can get these binaries from Releases section of this repo. Unpack contents of
bin-{TargetCPU}-linux.7zto{FPCFromSources}\fpc-min\bin\{TargetCPU}-linux. -
Run
update.bat. It will create necessary folders and pull current master branches from FPC and Lazarus repositories -
Run
buildall.bat. It will build FPC for Win/32, Win/64, Lin/32 and Lin/64 and Lazarus for Win/32. If you don't need any of these, comment out corresponding lines inbuildall.bat. -
For Linux cross-compiling:
7.1. Copy
{TmpFullInstall}\fpc\libfolder to{FPCFromSources}\FPC(note you must copylibfolder itself, that is, fresh FPC should have its ownlibfolder).OR
7.2. You can get these libs from Releases section of this repo. Unpack contents of
lib-{TargetCPU}-linux.7zto{FPCFromSources}\FPC\lib\{TargetCPU}-linux. -
Now you can remove
fpc-minfolder and uninstall temporary full install -
Run
startlazarus.exeand set paths.