Sign in Join
Wiki copytemporary

Getting Lazarus: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Getting Lazarus

OldNewLine
1+## Download and install Lazarus release version
2+
3+### From SourceForge
4+
5+Binary releases for various platforms are available via the [Lazarus Sourceforge download area](https://sourceforge.net/projects/lazarus/files/).
6+
7+For people who are blocked by SF, the Lazarus releases from Sourceforge are mirrored at:
8+
9+- <ftp://ftp.freepascal.org/pub/lazarus/releases/>
10+- and later at (after some time for synchronization) <http://michael-ep3.physik.uni-halle.de/Lazarus/releases/>
11+- and <http://mirrors.iwi.me/lazarus/>
12+
13+### Specific for platform
14+
15+Get Lazarus for Windows - use the Sourceforge link above.
16+
17+[[ReactOS|Get Lazarus for ReactOS]]
18+
19+[[Lazarus release version for Ubuntu|Get Lazarus for Ubuntu]]
20+
21+[[Install on Fedora|Get Lazarus for Fedora]]
22+
23+[[Lazarus release version for Suse|Get Lazarus for Suse]]
24+
25+[[Scientific Linux|Get Lazarus for Scientific Linux]]
26+
27+[[Lazarus on Raspberry Pi|Get Lazarus for Raspberry Pi (Raspbian)]]
28+
29+[[Installing Lazarus on macOS|Get Lazarus for Mac]]
30+
31+[[Lazarus on Solaris]]
32+
33+## Getting a Git client
34+
35+### TortoiseGit client
36+
37+TortoiseGit Client is for Windows only. You may download it from <https://tortoisegit.org/>
38+
39+### Git for Windows
40+
41+Command line clients:
42+
43+<https://gitforwindows.org/> <https://git-scm.com/download/win>
44+
45+### Other clients
46+
47+A GIT command line client is available from <https://git-scm.com/downloads> for many platforms.
48+
49+On Linux, it is recommended to install *git* using the package management system offered by your distribution. For example:
50+
51+`sudo apt-get install git`
52+
53+## Getting Lazarus from the GitLab server
54+
55+### Development version of Lazarus
56+
57+To get Lazarus for the first time, using command line:
58+
59+` git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus`
60+
61+A new directory "lazarus" is then created under the current directory.
62+
63+### Fixes branch of latest Lazarus release
64+
65+Change into the directory created by the above **git clone** command and run
66+
67+` git switch  fixes_2_2`
68+
69+Amending the name of the branch according to what fixes version you want. Get a list with
70+
71+` git branch --all`
72+
73+The output will contain lines similar to
74+
75+` remote/origin/fixes_2_2`
76+
77+The name of the branch is just the last part.
78+
79+### Update the sources later
80+
81+Open a terminal/command prompt, change to the lazarus directory and type:
82+
83+` git switch main`\
84+` git pull `
85+
86+instead of main, you may want to specify a fixes branch.
87+
88+For compiling see this.
89+
90+## Scripts
91+
92+There are scripts for Windows and Linux to automate downloading and building Lazarus: [[LazarusScripts|Scripts for Lazarus]]
93+
94+## Compiling and running Lazarus
95+
96+See [[Installing Lazarus]] - a detailed installation guide.
97+
98+### Using the command-line
99+
100+Lazarus is shipped with an autogenerated **Makefile** (of the name "Makefile") for the gnu "**make**" utility.
101+
102+> **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*:
103+>
104+> set path=c:\pascal\3.2.0\bin\i386-win32;%path%
105+
106+> **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.
107+
108+**make** allows you to compile Lazarus from command-line easily. You need to have fpc and fpc-packages installed and configured first.
109+
110+To compile go to Lazarus directory in your terminal and type
111+
112+` `**`make`**
113+
114+This should rebuild LCL and Lazarus IDE with basic packages installed.
115+
116+Another useful command is
117+
118+` `**`make bigide`**
119+
120+which adds the same packages that the release version has.
121+
122+Then you can run Lazarus from within the same source directory with command "lazarus" (in Unix systems "./lazarus").
123+
124+In case you want to run several versions, you can direct lazarus to use use specific configuration directories via the --pcp option, e.g. :
125+
126+`lazarus --pcp=/home/YOU/myLaz19`
127+
128+### Make targets
129+
130+#### make help
131+
132+To 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**":
133+
134+``` bash
135+
136+make help
137+
138+ Main targets
139+ Without any target, target 'all' will be invoked.
140+ all build all needed, i.e. minimal IDE, lazbuild, startlazarus.
141+ clean deletes files that 'bigide' creates. It does not clean up all possible
142+ targets. Clean other target: make clean LCL_PLATFORM=qt
143+ distclean Clean all targets and common leftovers.
144+ lazbuild build lazbuild and lcl with nogui widgetset
145+ bigide as all, except that the IDE is built with a lot of extra packages
146+ useride calls lazbuild to build an IDE with your active profile, requires lazbuild
147+ install installs Lazarus under /usr/local/share/lazarus
148+ You can change the directory by appending INSTALL_PREFIX=/some/path
149+
150+ Sub targets
151+ registration build package FCL
152+ lazutils build package LazUtils, requires registration
153+ codetools build package CodeTools, requires lazutils
154+ lcl build package LCLBase and LCL, requires lazutils
155+ tools build lazres, svn2revisioninc, updatepofiles, lrstolfm,
156+ requires LCL with nogui widgetset
157+ basecomponents build debuggerintf, lazdebuggergdbmi, lazcontrols, synedit, ideintf
158+ for the LCL_PLATFORM, requires lcl
159+ bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents
160+ lhelp build lhelp, requires bigidecomponents
161+ starter build startlazarus, requires basecomponents
162+ examples build basic examples, requires basecomponents
163+ Note: There are more examples having their own directory
164+
165+ Flags:
166+ PP=/path/to/fpc use another compiler
167+ USESVN2REVISIONINC=0 do not update ide/revision.inc
168+ INSTALL_PREFIX=/usr used by 'install' as path prefix
169+ FPC_DIR=/usr/share/fpcsrc/3.0.4 used by fpcmake when regenerating Makefiles
170+ OPT='-vwnbq -gh' append these options when calling the compiler
171+
172+ Usage examples:
173+
174+ Update svn and build a minimal IDE, startlazarus and lazbuild:
175+ make clean
176+ svn up
177+ make clean all
178+
179+ Note: You can start lazarus with 'startlazarus'
180+ Note: Use the IDE or lazbuild to compile your projects/packages.
181+
182+ Update svn and build an IDE with your last set of packages:
183+ make clean
184+ svn up
185+ make clean lazbuild useride
186+
187+ Clean up:
188+ There is no command to clean up a svn repository completely, but
189+ you can use the following command under Linux/OS X:
190+ svn status | grep '\?' | sed -e 's/\? *//' | xargs rm -r
191+
192+ Another possibility is to create a clean copy via the svn export command.
193+
194+ Install:
195+ Note: You can use Lazarus without installing. Just start the lazarus executable.
196+ 1. Build Lazarus as normal user with one of the above commands.
197+ 2. Install as root into /usr
198+ sudo make install
199+ This installs startlazarus, lazarus-ide, lazbuild under /usr/bin
200+ and copies the whole lazarus source directory to /usr/share/lazarus
201+```
202+
203+### Make parameters
204+
205+There are additional parameters which can be used to **make** Lazarus. See a fully working example above.
206+
207+- **OPT**=%compiler_switches
208+
209+the %compiler_switches is passed to each fpc call. The option is useful for specifying defines
210+
211+For example:
212+
213+` make bigide OPT="-dNoGdkPixBufLib -gw2" `
214+
215+makes LCL and ide with NoGdkPixBufLib defined and dwarf2 debug info.
216+
217+- **LCL_PLATFORM**=%platform
218+
219+%platform is the target [[Widgetset|widgetset]]. It can be win32,wince,gtk,gtk2,qt,carbon,cocoa,customdrawn.
220+
221+For example:
222+
223+` make LCL_PLATFORM=gtk2`
224+
225+Rebuilds LCL and IDE for gtk2 widgetset
226+
227+- **FPC**=%compiler_path
228+
229+or
230+
231+- **PP**=%compiler_path
232+
233+%compiler_path is the path+filename to a custom compiler binary you want to build the target with.
234+
235+such as:
236+
237+`make FPC="~/Pfad/fpc"`
238+
239+## Browse the Source Repository with a Web Browser
240+
241+The contents of the GIT repro can also be browsed with your web-browser through [interface](https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main).
242+
243+## Lazarus Distributions
244+
245+There are some unofficial sites where you can find Lazarus and Free Pascal too:
246+
247+- [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)
248+- 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.
249+- [FreeSparta](https://freesparta.com/) is a commercial distribution of Lazarus for Windows.
250+- 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>.
251+- The [CodeTyphon](http://www.pilotlogic.com) distribution bundles Lazarus with additional packages and components.
252+- [LiteZarus](https://github.com/x2nie/LiteZarus) is a Lazarus distro intended for designing creating non-LCL projects.
253+- Lazarus is available on CDs and USB sticks from the [Blaise Pascal Magazine](http://www.blaisepascal.eu) store.
254+
255+## See also
256+
257+- [Forum: Explanation of trunk installation in Windows](http://forum.lazarus.freepascal.org/index.php/topic,36347.msg242123.html#msg242123)
258+
259+---
260+*From the Free Pascal wiki, page "Getting Lazarus", as it stood on 2021-08-04 after a change by Dsiders, out of the wiki's dump of 2024-05-26. 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).*
261+Category: Install
262+Category: Lazarus

Back to history