This repo contains two scripts for Windows to grab FPC and Lazarus sources and build them including cross-build.
git
binary 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.bat
to 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}
isi386
and/orx86_64
) from{TmpFullInstall}\fpc\bin\i386-win32
to{FPCFromSources}\fpc-min\bin\{TargetCPU}-linux
folders.OR
4.2. You can get these binaries from Releases section of this repo. Unpack contents of
bin-{TargetCPU}-linux.7z
to{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\lib
folder to{FPCFromSources}\FPC
(note you must copylib
folder itself, that is, fresh FPC should have its ownlib
folder).OR
7.2. You can get these libs from Releases section of this repo. Unpack contents of
lib-{TargetCPU}-linux.7z
to{FPCFromSources}\FPC\lib\{TargetCPU}-linux
. -
Now you can remove
fpc-min
folder and uninstall temporary full install -
Run
startlazarus.exe
and set paths.