Setup Instructions
This page shows you how to install Free Pascal 3.2.3, the Lazarus IDE and the Codebot library. Each install is a single command you paste into PowerShell on Windows or into a terminal on Linux and the Raspberry Pi.
Note: The Windows, Linux, and MacOS installers on this page now include full dynamic package support. This feature has been a long awaited enhancement to both the compiler and IDE. Additionaly and importantly, the installers confine changes to their operation to the user folder you will choose during the install. This means they will not interfere with any already existing compiler or Lazarus IDE on your computer unless you choose to put them in the same folder as your existing compiler and IDE.
Installation
Each script downloads a ready built Free Pascal compiler and Lazarus, then adds the Codebot library and, if you want them, the demo projects. Everything is installed into one folder of your choosing, with defaulting to Development/Pascal in your home folder unless you choose another, so it will not interfere with other Free Pascal or Lazarus installs you might already have on your computer.
Running a script again later updates the Codebot library and the demo projects to their newest versions, and leaves your Free Pascal and Lazarus install as it is.
Windows
To install: Open PowerShell, then paste in this command and press enter:
irm https://www.getlazarus.org/install-win.ps1 | iex
The script asks a few questions, then downloads and installs everything for you. When it is done you will find Lazarus and Free Pascal Terminal in your Start Menu. If you would like to read the script before you run it, it's available here.
Windows Installer Notes
- Requires 64 bit Windows 10 version 1803 or later
- Everything is installed for your user only, so administrator access is not needed
- Smart App Control blocks Free Pascal, Lazarus and the programs you compile, and the script will tell you how to turn it off
- Microsoft Defender sometimes reports programs made with Free Pascal as a threat, and the script will tell you how to allow them
Linux
To install: Open a terminal, then paste in this command and press enter:
curl -fsSL https://www.getlazarus.org/install-linux.sh | bash
The script asks which optional features you want, installs the packages they need, then downloads Free Pascal and Lazarus and builds the Lazarus IDE with the Codebot packages included. When it is done you will find Lazarus and Free Pascal Terminal in your applications menu. If you would like to read the script before you run it, it's available here.
Linux Installer Notes
- Requires 64 bit Linux on an Intel or AMD processor
- Works with distributions using apt, dnf, zypper or pacman
- Run it as your normal user, not with sudo, and it will ask for your password only if packages need installing
- Optional features are OpenGL rendering, a web browser control and terminal controls
MacOS
To install: Open a terminal, then paste in this command and press enter:
curl -fsSL https://www.getlazarus.org/install-macos.sh | bash
Note: Compiling and linking program on MacOS requires xcode tools. You install these tool by using this code in a terminal:
The script asks which optional features you want, installs the packages they need, then downloads Free Pascal and Lazarus and builds the Lazarus IDE with the Codebot packages included. When it is done you will have a relocatable lazarus.app in the folder you choose to install. The MacOS script is available available here.
xcode-select --install
The script asks which optional features you want, installs the packages they need, then downloads Free Pascal and Lazarus and builds the Lazarus IDE with the Codebot packages included. When it is done you will have a relocatable lazarus.app in the folder you choose to install. The MacOS script is available available here.
MacOS Installer Notes
- Requires xcode tools to be installed
- Work on both 64 bit Intel or M1 architectures
- Bundles SDL lirbaries in you app using rpath if you are using SDL
- Run it as your normal user, not with sudo, and it will ask for your password only if packages need installing
- Does not support terminal, web browser, or rendering controls outside of SDL.
Raspberry Pi
To install: Open a terminal, then paste in this command and press enter:
curl -fsSL https://www.getlazarus.org/install-raspberrypi.sh | bash
The Raspberry Pi script installs Free Pascal, the lazbuild command line project builder and the Codebot SDL library. It does not install the Lazarus IDE. If you would like to read the script before you run it, it's available here.
Once installed, open a new terminal, change to a folder holding a project and type:
lazarus run
Raspberry Pi Installer Notes
- Requires 64 bit Raspberry Pi OS
- Run it as your normal user, not with sudo, and it will ask for your password to install packages
- Type lazarus to build a project, lazarus rebuild to rebuild it and everything it uses, or lazarus run to build and run it