Skip to content

Fr0sT-Brutal/FPC_Build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Building FreePascal and Lazarus from sources on Windows

This repo contains two scripts for Windows to grab FPC and Lazarus sources and build them including cross-build.

⚠️ Note that in most cases fpcupdeluxe will do anything for you.

Prerequisites

  1. git binary in PATH.

Source retrieval uses git repositories so git must be accessible. Exporting from SVN is not supported.

  1. Minimal FPC distribution

Get it from here.

  1. Linux binaries and libs

For cross-compiling to Linux, binaries and libs are needed. You can get them:

Steps

  1. Create a directory {FPCFromSources} where FPC and Lazarus will be

  2. Put update.bat, build.bat, buildall.bat to that folder

  3. Download minimal FPC, unpack it to that folder and rename to fpc-min

  4. For Linux cross-compiling:

    4.1. Download full setup and install it to temporary folder {TmpFullInstall}. Copy {TargetCPU}-linux-*.exe (where {TargetCPU} is i386 and/or x86_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.

  5. Run update.bat. It will create necessary folders and pull current master branches from FPC and Lazarus repositories

  6. 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 in buildall.bat.

  7. For Linux cross-compiling:

    7.1. Copy {TmpFullInstall}\fpc\lib folder to {FPCFromSources}\FPC (note you must copy lib folder itself, that is, fresh FPC should have its own lib 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.

  8. Now you can remove fpc-min folder and uninstall temporary full install

  9. Run startlazarus.exe and set paths.

About

Scripts and manual for building FreePascal and Lazarus from sources

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published