Sign in Join
Wiki copytemporary

Getting Lazarus: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Download and install Lazarus release version
22
33### From SourceForge
44
55Binary releases for various platforms are available via the [Lazarus Sourceforge download area](<https://sourceforge.net/projects/lazarus/files/>).
66
77For people who are blocked by SF, the Lazarus releases from Sourceforge are mirrored at:
88
99 * <https://download.lazarus-ide.org/>
1010 * <ftp://ftp.freepascal.org/pub/lazarus/releases/>
1111
1212Here are the [Checksums](<https://www.lazarus-ide.org/index.php?page=checksums>).
1313
1414### Specific for platform
1515
1616Get Lazarus for Windows - use the Sourceforge link above.
1717
1818[[ReactOS|Get Lazarus for ReactOS]]
1919
2020[[Lazarus release version for Ubuntu|Get Lazarus for Ubuntu]]
2121
2222[[Install on Fedora|Get Lazarus for Fedora]]
2323
2424[[Lazarus release version for Suse|Get Lazarus for Suse]]
2525
2626[[Scientific Linux|Get Lazarus for Scientific Linux]]
2727
2828[[Lazarus on Raspberry Pi|Get Lazarus for Raspberry Pi (Raspbian)]]
2929
3030[[Installing Lazarus on macOS|Get Lazarus for Mac]]
3131
3232[[Lazarus on Solaris]]
3333
3434## Getting a Git client
3535
3636### TortoiseGit client
3737
3838TortoiseGit Client is for Windows only. You may download it from <https://tortoisegit.org/>
3939
4040### Git for Windows
4141
4242Command line clients:
4343
4444<https://gitforwindows.org/> <https://git-scm.com/download/win>
4545
4646### Other clients
4747
4848A GIT command line client is available from <https://git-scm.com/downloads> for many platforms.
4949
5050On Linux, it is recommended to install _git_ using the package management system offered by your distribution. For example:
5151```
5252sudo apt-get install git
5353```
5454
5555## Getting Lazarus from the GitLab server
5656
5757### Development version of Lazarus
5858
5959To get Lazarus for the first time, using command line:
6060```
6161git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus
6262```
6363
6464A new directory "lazarus" is then created under the current directory.
6565
66+Initially the active branch is the development branch "main". All commits are pushed there. Some bug fix commits are later merged to "fixes_x" branches.
67+
6668### Fixes branch of latest Lazarus release
6769
68-Change into the directory created by the above **git clone** command and run
70+Move into the directory created by the above **git clone** command and run
6971```
70-git switch fixes_2_2
72+git switch fixes_4
7173```
7274
7375Amending the name of the branch according to what fixes version you want. Get a list with
7476```
7577git branch --all
7678```
7779
7880The output will contain lines similar to
7981```
80-remote/origin/fixes_2_2
82+remote/origin/fixes_4
8183```
8284
8385The name of the branch is just the last part.
8486
85-
86-
8787### Update the sources later
8888
8989Open a terminal/command prompt, change to the lazarus directory and type:
9090```
9191git switch main
9292 git pull
9393```
9494
9595instead of main, you may want to specify a fixes branch.
9696
9797For compiling see this.
9898
9999## Scripts
100100
101101There are scripts for Windows and Linux to automate downloading and building Lazarus: [[LazarusScripts|Scripts for Lazarus]]
102102
103103## Compiling and running Lazarus
104104
105105See [[Installing Lazarus]] \- a detailed installation guide.
106106
107107### Using the command-line
108108
109109Lazarus is shipped with an autogenerated **Makefile** (of the name "Makefile") for the gnu "**make** " utility.
110110
111111[![Warning-icon.png](/wiki-images/b/b2/Warning-icon.png)](</File:Warning-icon.png>)
112112
113113**Warning:** If you also have Embarcadero (or Borland) tools installed, their "make" might conflict with gnu "make". In that case you can either delete or rename the conflicting Embarcadero binary, or remove its directory from Windows PATH, or set the path in the console before calling _make_ :
114114```
115115set path=c:\pascal\3.2.0\bin\i386-win32;%path%
116116```
117117
118118[![Warning-icon.png](/wiki-images/b/b2/Warning-icon.png)](</File:Warning-icon.png>)
119119
120120**Warning:** "make" may also fail, if you have a shell (such as sh.exe) in your path. It depends on how this shell interprets quotes and backslashes.
121121
122122**make** allows you to compile Lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.
123123
124124To compile go to Lazarus directory in your terminal and type
125125```
126126**make**
127127```
128128
129129This should rebuild LCL and Lazarus IDE with basic packages installed.
130130
131131Another useful command is
132132```
133133**make bigide**
134134```
135135
136136which adds the same packages that the release version has.
137137
138138Then you can run Lazarus from within the same source directory with command "lazarus" (in Unix systems "./lazarus").
139139
140140In case you want to run several versions, you can direct lazarus to use use specific configuration directories via the --pcp option, e.g. :
141141```
142142lazarus --pcp=/home/YOU/myLaz19
143143```
144144
145145### Make targets
146146
147147#### make help
148148
149149To see a list of available targets for _**make**_ type [[make help]]. Note: "**make help** " exists since 1.0. Here is the output of "**make help** ":
150150
151151
152152
153153```
154154make help
155155
156- Main targets
156+ Main targets
157157 Without any target, target 'all' will be invoked.
158158 all build all needed, i.e. minimal IDE, lazbuild, startlazarus.
159159 clean deletes files that 'bigide' creates. It does not clean up all possible
160160 targets. Clean other target: make clean LCL_PLATFORM=qt
161161 distclean Clean all targets and common leftovers.
162162 lazbuild build lazbuild and lcl with nogui widgetset
163163 bigide as all, except that the IDE is built with a lot of extra packages
164164 useride calls lazbuild to build an IDE with your active profile, requires lazbuild
165- install installs Lazarus under /usr/local/share/lazarus
165+ install installs Lazarus under C:\lazarus
166166 You can change the directory by appending INSTALL_PREFIX=/some/path
167167
168168 Sub targets
169169 registration build package FCL
170- lazutils build package LazUtils, requires registration
171- codetools build package CodeTools, requires lazutils
172- lcl build package LCLBase and LCL, requires lazutils
173- tools build lazres, svn2revisioninc, updatepofiles, lrstolfm,
174- requires LCL with nogui widgetset
175- basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
170+ basecomponents build buildintf, lazcontrols, ideintf, synedit, debuggerintf, lazdebuggergdbmi
176171 for the LCL_PLATFORM, requires lcl
177172 bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents
173+ tools build lazres, svn2revisioninc, updatepofiles, lrstolfm,
174+ requires LCL with nogui widgetset
178175 lhelp build lhelp, requires bigidecomponents
179176 starter build startlazarus, requires basecomponents
180- examples build basic examples, requires basecomponents
181- Note: There are more examples having their own directory
182-
183- Flags:
184- PP=/path/to/fpc use another compiler
185- USESVN2REVISIONINC=0 do not update ide/revision.inc
186- INSTALL_PREFIX=/usr used by 'install' as path prefix
187- FPC_DIR=/usr/share/fpcsrc/3.0.4 used by fpcmake when regenerating Makefiles
188- OPT='-vwnbq -gh' append these options when calling the compiler
189-
190- Usage examples:
191-
192- Update svn and build a minimal IDE, startlazarus and lazbuild:
193- make clean
194- svn up
195- make clean all
196-
197- Note: You can start lazarus with 'startlazarus'
198- Note: Use the IDE or lazbuild to compile your projects/packages.
199-
200- Update svn and build an IDE with your last set of packages:
201- make clean
202- svn up
203- make clean lazbuild useride
204-
205- Clean up:
206- There is no command to clean up a svn repository completely, but
207- you can use the following command under Linux/OS X:
208- svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r
209-
210- Another possibility is to create a clean copy via the svn export command.
211-
212- Install:
213- Note: You can use Lazarus without installing. Just start the lazarus executable.
214- 1. Build Lazarus as normal user with one of the above commands.
215- 2. Install as root into /usr
177+ ide build ide with minimum of packages
178+
179+ Flags:
180+ PP=/path/to/fpc use another compiler
181+ USESVN2REVISIONINC=0 do not update ide/revision.inc
182+ INSTALL_PREFIX=/usr used by 'install' as path prefix
183+ FPC_DIR=/usr/share/fpcsrc/3.0.4 used by fpcmake when regenerating Makefiles
184+ OPT='-vwnbq -gh' append these options when calling the compiler
185+
186+ Usage examples:
187+
188+ Updating git and build a minimal IDE, startlazarus and lazbuild:
189+ make clean
190+ git pull
191+ make clean all
192+
193+ Note: You can start lazarus with 'startlazarus'
194+ Note: Use the IDE or lazbuild to compile your projects/packages.
195+
196+ Updating git and build an IDE with your last set of packages:
197+ make distclean
198+ git pull
199+ make clean lazbuild useride
200+
201+ Clean up:
202+ git restore .
203+ make distclean
204+
205+ Install:
206+ Note: You can use Lazarus without installing. Just start the lazarus executable.
207+ 1. Build Lazarus as normal user with one of the above commands.
208+ 2. Install as root into /usr
216209 sudo make install
217210 This installs startlazarus, lazarus-ide, lazbuild under /usr/bin
218211 and copies the whole lazarus source directory to /usr/share/lazarus
219212```
220213
221214### Make parameters
222215
223216There are additional parameters which can be used to **make** Lazarus. See a fully working example above.
224217
225218 * **OPT** =%compiler_switches
226219
227220the %compiler_switches is passed to each fpc call. The option is useful for specifying defines
228221
229222For example:
230223```
231224make bigide OPT="-dNoGdkPixBufLib -gw2"
232225```
233226
234227makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.
235228
236229 * **LCL_PLATFORM** =%platform
237230
238231%platform is the target [[Widgetset|widgetset]]. It can be win32,wince,gtk,gtk2,qt,carbon,cocoa,customdrawn.
239232
240233For example:
241234```
242235make LCL_PLATFORM=gtk2
243236```
244237
245238Rebuilds LCL and IDE for gtk2 widgetset
246239
247240 * **FPC** =%compiler_path
248241
249242or
250243
251244 * **PP** =%compiler_path
252245
253246%compiler_path is the path+filename to a custom compiler binary you want to build the target with.
254247
255248such as:
256249```
257250make FPC="~/Pfad/fpc"
258251```
259252
260253## Browse the Source Repository with a Web Browser
261254
262255The contents of the GIT repro can also be browsed with your web-browser through [interface](<https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main>).
263256
264257## Lazarus Distributions
265258
266259There are some unofficial sites where you can find Lazarus and Free Pascal too:
267260
268261 * [NewPascal](<http://newpascal.org>) is a curated distribution for Windows, which doesn't require an installer and implements some new features. (Is very out-of-date)
269262 * The [getlazarus](<http://www.getlazarus.org>) distribution bundles cutting-edge versions of Lazarus with easy-to-use setup scripts for several platforms and additional components.
270263 * [FreeSparta](<https://freesparta.com/>) is a commercial distribution of Lazarus for Windows.
271264 * You can get a Ubuntu LiveCD from Austrian University of Applied Sciences hosting <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso> and md5sum file is here <http://www.sigma-server.com/liveCD/Ubuntu-7.10-NTC-Lazarus.iso.md5>.
272265 * The [CodeTyphon](<http://www.pilotlogic.com>) distribution bundles Lazarus with additional packages and components.
273266 * [LiteZarus](<https://github.com/x2nie/LiteZarus>) is a Lazarus distro intended for designing creating non-LCL projects.
274267 * Lazarus is available on CDs and USB sticks from the [Blaise Pascal Magazine](<http://www.blaisepascal.eu>) store.
275268
276269## See also
277270
278271 * [Forum: Explanation of trunk installation in Windows](<http://forum.lazarus.freepascal.org/index.php/topic,36347.msg242123.html#msg242123>)
279272
280273---
281-*From the Free Pascal wiki, page "Getting Lazarus", as the Internet Archive kept it on 2025-01-09, last changed on 2024-09-29. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
274+*From the Free Pascal wiki, page "Getting Lazarus", as the Internet Archive kept it on 2025-12-28, last changed on 2025-02-21. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history