Difference between revisions of "Installing Lazarus/de"

From Lazarus wiki
Jump to navigationJump to search
 
Line 25: Line 25:
  
 
The following sections will describe how to get FreePascal and how to install lazarus properly.
 
The following sections will describe how to get FreePascal and how to install lazarus properly.
 +
 +
==Installing The Free Pascal Compiler==
 +
 +
There is an extensive discussion of how to install and build Free Pascal compilers available here http://www.stack.nl/~marcov/buildfaq.pdf - it may be a little too detailed for some users, but is very comprehensive.
 +
 +
Lazarus requires fpc (FreePascal) version 1.9.x and it requires both the compiled fpc libs (binaries) and the fpc sources and of the same version. fpc 1.0.6 is too buggy and fpc 1.0.10 has problems opening forms created with fpc 1.9.x. FreePascal version 2.0.0 has now been released, and is the preferred compiler (fpc-2.0.0).
 +
 +
===Installing Free Pascal under Linux===
 +
 +
====FPC Binaries====
 +
 +
The latest release of FreePascal, version 2.0.0, can be obtained from the FreePascal website (http://www.freepascal.org/download.html, then choose a mirror).
 +
 +
At the lazarus downloads section (http://www.lazarus.freepascal.org ) you can get the RPM of the Free Pascal compiler (compiler / linux) and its packages. If you don't have an RPM-based distribution, you can download and install the tarballs from http://www.freepascal.org. If you want to compile the binaries for yourself, see the BSD section.
 +
 +
Instructions:
 +
 +
Download lastest files from http://sourceforge.net/project/showfiles.php?group_id=89339.
 +
As example:
 +
:* fpc-1.9.8-0.i586.rpm
 +
:* fpcsrc-1.9.8-050225.i386.rpm
 +
:* lazarus-0.9.6-fpc_1.9.8_0.i386.rpm<br>
 +
and install them with:
 +
:* rpm -Uvh fpc-1.9.8-0.i586.rpm
 +
:* rpm -Uvh fpcsrc-1.9.8-05.225.i386.rpm
 +
:* rpm -Uvh lazarus-0.9.6-fpc_1.9.9_0.i386.rpm
 +
 +
Daily snapshot Debian packages can be downloaded from http://cYcnus.de/deb/. At present this contains only the compiled fpc components, but not the sources, which would be needed for most Lazarus programming.
 +
 +
====FPC Sources====
 +
 +
Together with the release of version 2.0, FPC no longer uses CVS, but has migrated to Subversion (SVN). For now, there is no CVS mirror yet, so you have to use SVN to get the FPC sources.
 +
 +
===== Download Daily Source Snapshot of Development Tree (version 2.1.x) =====
 +
You can download today's development (v 2.1.x) sources in the form of a packed snapshot from the SVN source repository: these snapshots are updated on a daily basis, and reflect the state of the source repository. The files are kept at the site which has the SVN archive.
 +
Entire public sources archive of v2.1.x: [ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/source/fpc.zip fpc.zip] (24 MB)
 +
 +
===== Download Daily Source Snapshot of Release Tree (version 2.0.x) =====
 +
You can download today's development (v 2.0.x) sources that will lead to the next stable release in form of a packed snapshot from the SVN source repository: these snapshots are updated on a daily basis, and reflect the state of the source repository. The files are kept at the site which has the SVN archive.
 +
Entire public sources archive of v2.0.x: [ftp://ftp.freepascal.org/pub/fpc/snapshot/v20/source/fpc.zip fpc.zip] (24 MB)
 +
 +
 +
===== Connect to Source Repository with SVN (replaces section on connection to CVS) =====
 +
As an alternative to the daily zip files of the SVN sources, the SVN repository has been made accessible for everyone, with read-only access. This means that you can directly access the code, and you will have really the last-minute sources available. It is also a method which requires less bandwidth once you have done the first download (checkout in SVN lingo).
 +
===== Development snapshots =====
 +
How to do this?
 +
(You need to have SVN installed, of course. Look  [http://subversion.tigris.org/ here] for instructions on how to do that.)
 +
 +
Change Directory (cd) to the parent directory of your development area, eg
 +
 +
[]$ cd /home/username/FreePascal
 +
 +
To retrieve the full source repository, all publicly available modules, type
 +
 +
[]$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
 +
 +
Normally, you should perform this step just once.
 +
 +
To update the sources which were downloaded (checkout) above
 +
 +
[]$svn update fpc
 +
 +
 +
===== Fixes to 2.0.x =====
 +
 +
The fixes need a separate directory, create a separate directory 'fixes', enter it, and repeat the above checkout command with the URL http://svn.freepascal.org/svn/fpc/branches/fixes_2_0:
 +
 +
[]$ cd mysvn/fixes
 +
[]$ svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_0 fpc
 +
 +
and to update:
 +
 +
[]$ svn update fpc
 +
 +
The sources of docs are in a separate repository called fpcdocs, so the command to get them is
 +
 +
[]$ svn checkout http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs
 +
 +
If you want to learn more about subversion, read this excellent [http://svnbook.red-bean.com/ Subversion book] which is also available online in different formats for free.
 +
 +
For the curious: You have only read-only access, so don't try to commit anything :-)
 +
 +
For more information, see the [http://www.freepascal.org/develop.html FreePascal] website
 +
 +
===== <<< NEXT SECTION IS NOW OBSOLETE - RETAINED TEMPORARILY FOR REFERENCE >>> =====
 +
 +
The easiest way to get the freepascal sources is via cvs. You can also download it as whole; see http://www.freepascal.org/develop.html for the daily snapshot of the 1.9.x release tree.
 +
 +
Getting Last FPC Sources via CVS
 +
 +
Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user  can do this. First create a directory for fpc (e.g. /home/username/freepascal) then do the following:
 +
[]$ bash
 +
[]$ export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 +
[]$ cvs login  // password is 'cvs' without the commas.
 +
[]$ cvs -z3 co fpc  // This will create a directory called 'fpc', which can be later used in the IDE.
 +
Hint: To download/update the latest changes you can simply do
 +
[]$ cd /home/username/freepascal/fpc
 +
[]$ cvs -z3 update -dP
 +
===== <<< END OF OBSOLETE SECTION >>> =====
 +
 +
===Installing Free Pascal under Windows===
 +
 +
====FPC Binaries for Windows====
 +
 +
By far the easiest way to get a working installation of Free Pascal is to download the current binary Windows release of Lazarus from the SourceForge repository - the release contains the current versions of the FreePascal compiler and the FreePascal libraries as well as the lazarus IDE. If you want to install from sources, read on!
 +
 +
You can get the installer zip for fpc 2.0.0 at Free Pascal's download section http://www.freepascal.org/download.html, then choose a mirror).
 +
Installing from the sources -- see the next section to know how to get them -- is not for novices, since you need a starting compiler as well.
 +
 +
====FPC Sources for Windows====
 +
<<<< See section above under [[FPC Sources]] for Linux, where the use of SVN is described >>>>
 +
 +
The easiest way to get the Free Pascal sources is via CVS; see the next section for more on that. You can also download the package as a whole -- see http://www.freepascal.org/develop.html for the daily snapshot of the 2.1.x release tree.
 +
 +
Windows FPC Sources via CVS
 +
 +
You will need to have a CVS client such as TortoiseCVS or WinCVS installed in order to perform the steps below. The exact commands vary between CVS clients; the ones given below are to be used under CVS home's client, which is available for download here.
 +
 +
First create a directory in which you'd like to put the sources. Any normal user can do this. Create a directory for fpc (e.g. C:\Source), then do the following at the command prompt:
 +
  C:\Source> set CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 +
  C:\Source> cvs login      // password is 'cvs' without the commas
 +
  C:\source> cvs -z3 co fpc // This will create a directory fpc, which can be later used in the IDE.
 +
Hint: To download/update the latest changes you can simply do
 +
  C:\> cd Source\FPC
 +
  C:\Source\FPC> cvs -z3 update -dP
 +
''ToDo: Write me.''
 +
 +
See: http://www.freepascal.org/down-win32.html . You can find a list of mirrors at http://www.freepascal.org/sdown.html. Download FPC as one big file, unzip it and run the install.exe.
 +
 +
Extending your PATH variable to the fpc directory:
 +
 +
* Win98: Edit autoexec.bat and add the line: PATH=%PATH%;C:\pp\bin\bin\win32
 +
* WinXP/2k: My Computer (Right Click) ->  Properties -> Advanced (Page) -> Enviroment Variables -> System Variables -> Edit "PATH", Add "C:\pp\bin\bin\win32" there.
 +
 +
Then restart windows.
 +
 +
''ToDo: Explain how to download fpc sources and build the compiler''
 +
 +
===Installing Free Pascal under BSD/manually===
 +
 +
Effectively, you need
 +
 +
A file with all sources, or two (fpc and lazarus)
 +
 +
1. e.g. for fpc ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar preferably an export (no CVS/ dirs). The above file misses this.
 +
2. Lazarus source snapshot.
 +
* _any_ starting compiler from the 1.9 branch) You can do a check by parsing the output of ppc386 -i if it is 1.9.3 .. 2.0.x it is ok.
 +
* - dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and GNU make, iconv and gettext)
 +
 +
FPC build:
 +
 +
1. (fetch) necessary files (FPC source, starting compiler)
 +
2. (extract) Then de-tgz in work directory,
 +
3. (build) enter work/fpc/ and run
 +
 +
  $MAKE all OPT='-gl -O3p3'  PP=/path/to/startingcompiler-name-ppc386
 +
(/path/to/ can be omitted when ppc386 is in the path)
 +
($MAKE is make on linux and gmake on BSD)
 +
 +
4. (install) then, again in work/fpc, run
 +
 +
$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX
 +
(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg for ports)
 +
Create a symlink:
 +
  ln -s $THEPREFIX/lib/fpc/1.0.8/ppc386 $THEPREFIX/bin/ppc386
 +
      install sourceinstall PREFIX=$THEPREFIX
 +
 +
5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/1.9.3 $ETCDIR
 +
6. (optional, test), see if ppc386 -i gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors.
 +
Notes:
 +
 +
* If you need fpcmake package lists, you need to generate or supply them yourself, (in the port, or in an extra archive) either way, do a dummy install to /tmp/pack and determine the files installed with find . >ll
 +
 +
* $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs aren't possible.
 +
 +
* BSDHIER=1 on all make commands forces BSD hierarchy conventions.
 +
 +
===Installing Free Pascal under Mac OS X===
 +
 +
You need the Apple Developer-tools, X11, gtk1.2:
 +
 +
Downloading packages and installing them properly can be a time consuming task. Therefore there are various package managers. One of them is fink:
 +
: Download fink from http://fink.sourceforge.net/download/index.php?phpLang=en; follow the install instructions.
 +
 +
Developer-tools: Are included on the original OSX installation-CDs, or download at ADC (free registration required)
 +
: http://developer.apple.com/.
 +
 +
Apple X11: On a fresh system: choose "Customize" in the install-dialogue, check "X11".
 +
 +
On an already installed system: download at
 +
: http://www.apple.com/downloads/macosx/apple/x11formacosx.html
 +
 +
In the Terminal, run
 +
        sudo fink install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtkglarea gtk-engines
 +
The X11-Application is in /Applications/Utilities/X11.
 +
 +
Hint: Most X11 programs, including lazarus expect to receive focus, when the users clicks on a window. Under MacOSX this is deactivated. You can activate it for all X11 applications by typing in the terminal:
 +
        defaults write com.apple.x11 wm_click_through -bool true
 +
 +
;Free Pascal Compiler:
 +
Then download and install the Free Pascal Compiler (at least 1.9.5 from 16th August 2004) from
 +
: https://sourceforge.net/project/showfiles.php?group_id=89339
 +
 +
When compiling gtk-related software, you need to add two lines to the fpc.cfg file, to enable use of libraries
 +
-Fl/sw/lib
 +
-Fl/usr/X11R6/lib
 +
 +
 +
For lazarus you need the fpc sources as well:
 +
Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user can do this.
 +
First create a directory for fpc
 +
: (e.g. /Users/username/freepascal)
 +
then open a terminal and do the following:
 +
[]$ bash
 +
[]$ export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 +
[]$ cvs login
 +
password is 'cvs' without the 'quotes'
 +
[]$ cvs -z3 co fpc
 +
This will create a directory called 'fpc', which can be later used in the IDE.
 +
Hint: To download/update the latest changes you can simply do
 +
[]$ cd /Users/username/freepascal/fpc
 +
[]$ cvs -z3 update -dP

Revision as of 19:27, 2 September 2005

Overview

For people who simply want to install Lazarus and start using it for programming, the easiest approach is to download and install a recent, reasonably stable binary release (such as a linux ".rpm" package or a Windows ".exe" package). You can read the sections under linux or windows entitled "fpc binaries" or the first paragraphs in the sections on installing Lazarus in linux or windows; most of the remaining information can be safely ignored.

For those who want to participate in the development of the compiler or the IDE, or for those who want the most up-to-date tools, an installation from source files is necessary, and much of the rest of this information is relevant.

Lazarus provides two main parts:

  • LCL - the Lazarus Component Library
  • IDE - the RAD tool

These in turn are dependent on

  • FPC - the freePascal compiler
  • FCL - the FreePascal Component library, containing most of the non-graphic components used by Lazarus

Lazarus System Requirements

  1. FreePascal compiler, packages, and sources. (*important*: of the same version/date)
  2. A supported Widget tool-kit
    Win32
    : The native Win32 API can be used
    Linux/xxxBSD
    GTK+ 1.2.x : Most Linux distributions and *BSDs already install the GTK+ 1.2.x libraries. You can also find them at http://www.gtk.org.
    You'll also want gdk-pixbuf, 0.13 or newer (preferably 0.18 or newer), which is also found in most recent distributions from the past 2 years. The source is available from ftp://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/
    Mac OS X
    GTK+ 1.2.x : You need the apple developer tools, X11 and GTK1.2. See below Installing under Mac OS X.
    GTK+ 2.x
    WARNING : The GTK2 interface is not yet complete and is only for testing purposes.
    It's found in most recent distributions. For the source see http://www.gtk.org.

The FAQ - Frequently Asked Questions file is available at http://www.lazarus.freepascal.org . Some of the questions can be found in the local file 'FAQ'.

The following sections will describe how to get FreePascal and how to install lazarus properly.

Installing The Free Pascal Compiler

There is an extensive discussion of how to install and build Free Pascal compilers available here http://www.stack.nl/~marcov/buildfaq.pdf - it may be a little too detailed for some users, but is very comprehensive.

Lazarus requires fpc (FreePascal) version 1.9.x and it requires both the compiled fpc libs (binaries) and the fpc sources and of the same version. fpc 1.0.6 is too buggy and fpc 1.0.10 has problems opening forms created with fpc 1.9.x. FreePascal version 2.0.0 has now been released, and is the preferred compiler (fpc-2.0.0).

Installing Free Pascal under Linux

FPC Binaries

The latest release of FreePascal, version 2.0.0, can be obtained from the FreePascal website (http://www.freepascal.org/download.html, then choose a mirror).

At the lazarus downloads section (http://www.lazarus.freepascal.org ) you can get the RPM of the Free Pascal compiler (compiler / linux) and its packages. If you don't have an RPM-based distribution, you can download and install the tarballs from http://www.freepascal.org. If you want to compile the binaries for yourself, see the BSD section.

Instructions:

Download lastest files from http://sourceforge.net/project/showfiles.php?group_id=89339. As example:

  • fpc-1.9.8-0.i586.rpm
  • fpcsrc-1.9.8-050225.i386.rpm
  • lazarus-0.9.6-fpc_1.9.8_0.i386.rpm

and install them with:

  • rpm -Uvh fpc-1.9.8-0.i586.rpm
  • rpm -Uvh fpcsrc-1.9.8-05.225.i386.rpm
  • rpm -Uvh lazarus-0.9.6-fpc_1.9.9_0.i386.rpm

Daily snapshot Debian packages can be downloaded from http://cYcnus.de/deb/. At present this contains only the compiled fpc components, but not the sources, which would be needed for most Lazarus programming.

FPC Sources

Together with the release of version 2.0, FPC no longer uses CVS, but has migrated to Subversion (SVN). For now, there is no CVS mirror yet, so you have to use SVN to get the FPC sources.

Download Daily Source Snapshot of Development Tree (version 2.1.x)

You can download today's development (v 2.1.x) sources in the form of a packed snapshot from the SVN source repository: these snapshots are updated on a daily basis, and reflect the state of the source repository. The files are kept at the site which has the SVN archive. Entire public sources archive of v2.1.x: fpc.zip (24 MB)

Download Daily Source Snapshot of Release Tree (version 2.0.x)

You can download today's development (v 2.0.x) sources that will lead to the next stable release in form of a packed snapshot from the SVN source repository: these snapshots are updated on a daily basis, and reflect the state of the source repository. The files are kept at the site which has the SVN archive. Entire public sources archive of v2.0.x: fpc.zip (24 MB)


Connect to Source Repository with SVN (replaces section on connection to CVS)

As an alternative to the daily zip files of the SVN sources, the SVN repository has been made accessible for everyone, with read-only access. This means that you can directly access the code, and you will have really the last-minute sources available. It is also a method which requires less bandwidth once you have done the first download (checkout in SVN lingo).

Development snapshots

How to do this? (You need to have SVN installed, of course. Look here for instructions on how to do that.)

Change Directory (cd) to the parent directory of your development area, eg

[]$ cd /home/username/FreePascal

To retrieve the full source repository, all publicly available modules, type

[]$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc

Normally, you should perform this step just once.

To update the sources which were downloaded (checkout) above

[]$svn update fpc


Fixes to 2.0.x

The fixes need a separate directory, create a separate directory 'fixes', enter it, and repeat the above checkout command with the URL http://svn.freepascal.org/svn/fpc/branches/fixes_2_0:

[]$ cd mysvn/fixes
[]$ svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_0 fpc

and to update:

[]$ svn update fpc

The sources of docs are in a separate repository called fpcdocs, so the command to get them is

[]$ svn checkout http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs

If you want to learn more about subversion, read this excellent Subversion book which is also available online in different formats for free.

For the curious: You have only read-only access, so don't try to commit anything :-)

For more information, see the FreePascal website

<<< NEXT SECTION IS NOW OBSOLETE - RETAINED TEMPORARILY FOR REFERENCE >>>

The easiest way to get the freepascal sources is via cvs. You can also download it as whole; see http://www.freepascal.org/develop.html for the daily snapshot of the 1.9.x release tree.

Getting Last FPC Sources via CVS

Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user can do this. First create a directory for fpc (e.g. /home/username/freepascal) then do the following:

[]$ bash
[]$ export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
[]$ cvs login   // password is 'cvs' without the commas.
[]$ cvs -z3 co fpc   // This will create a directory called 'fpc', which can be later used in the IDE.

Hint: To download/update the latest changes you can simply do

[]$ cd /home/username/freepascal/fpc
[]$ cvs -z3 update -dP
<<< END OF OBSOLETE SECTION >>>

Installing Free Pascal under Windows

FPC Binaries for Windows

By far the easiest way to get a working installation of Free Pascal is to download the current binary Windows release of Lazarus from the SourceForge repository - the release contains the current versions of the FreePascal compiler and the FreePascal libraries as well as the lazarus IDE. If you want to install from sources, read on!

You can get the installer zip for fpc 2.0.0 at Free Pascal's download section http://www.freepascal.org/download.html, then choose a mirror). Installing from the sources -- see the next section to know how to get them -- is not for novices, since you need a starting compiler as well.

FPC Sources for Windows

<<<< See section above under FPC Sources for Linux, where the use of SVN is described >>>>

The easiest way to get the Free Pascal sources is via CVS; see the next section for more on that. You can also download the package as a whole -- see http://www.freepascal.org/develop.html for the daily snapshot of the 2.1.x release tree.

Windows FPC Sources via CVS

You will need to have a CVS client such as TortoiseCVS or WinCVS installed in order to perform the steps below. The exact commands vary between CVS clients; the ones given below are to be used under CVS home's client, which is available for download here.

First create a directory in which you'd like to put the sources. Any normal user can do this. Create a directory for fpc (e.g. C:\Source), then do the following at the command prompt:

 C:\Source> set CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 C:\Source> cvs login      // password is 'cvs' without the commas
 C:\source> cvs -z3 co fpc // This will create a directory fpc, which can be later used in the IDE.

Hint: To download/update the latest changes you can simply do

 C:\> cd Source\FPC
 C:\Source\FPC> cvs -z3 update -dP

ToDo: Write me.

See: http://www.freepascal.org/down-win32.html . You can find a list of mirrors at http://www.freepascal.org/sdown.html. Download FPC as one big file, unzip it and run the install.exe.

Extending your PATH variable to the fpc directory:

  • Win98: Edit autoexec.bat and add the line: PATH=%PATH%;C:\pp\bin\bin\win32
  • WinXP/2k: My Computer (Right Click) -> Properties -> Advanced (Page) -> Enviroment Variables -> System Variables -> Edit "PATH", Add "C:\pp\bin\bin\win32" there.

Then restart windows.

ToDo: Explain how to download fpc sources and build the compiler

Installing Free Pascal under BSD/manually

Effectively, you need

A file with all sources, or two (fpc and lazarus)

1. e.g. for fpc ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar preferably an export (no CVS/ dirs). The above file misses this. 2. Lazarus source snapshot.

  • _any_ starting compiler from the 1.9 branch) You can do a check by parsing the output of ppc386 -i if it is 1.9.3 .. 2.0.x it is ok.
  • - dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and GNU make, iconv and gettext)

FPC build:

1. (fetch) necessary files (FPC source, starting compiler) 2. (extract) Then de-tgz in work directory, 3. (build) enter work/fpc/ and run

 $MAKE all OPT='-gl -O3p3'  PP=/path/to/startingcompiler-name-ppc386
(/path/to/ can be omitted when ppc386 is in the path)
($MAKE is make on linux and gmake on BSD)

4. (install) then, again in work/fpc, run

$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX
(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg for ports)
Create a symlink:
  ln -s $THEPREFIX/lib/fpc/1.0.8/ppc386 $THEPREFIX/bin/ppc386
     install sourceinstall PREFIX=$THEPREFIX

5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/1.9.3 $ETCDIR 6. (optional, test), see if ppc386 -i gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors. Notes:

  • If you need fpcmake package lists, you need to generate or supply them yourself, (in the port, or in an extra archive) either way, do a dummy install to /tmp/pack and determine the files installed with find . >ll
  • $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs aren't possible.
  • BSDHIER=1 on all make commands forces BSD hierarchy conventions.

Installing Free Pascal under Mac OS X

You need the Apple Developer-tools, X11, gtk1.2:

Downloading packages and installing them properly can be a time consuming task. Therefore there are various package managers. One of them is fink:

Download fink from http://fink.sourceforge.net/download/index.php?phpLang=en; follow the install instructions.

Developer-tools: Are included on the original OSX installation-CDs, or download at ADC (free registration required)

http://developer.apple.com/.

Apple X11: On a fresh system: choose "Customize" in the install-dialogue, check "X11".

On an already installed system: download at

http://www.apple.com/downloads/macosx/apple/x11formacosx.html

In the Terminal, run

       sudo fink install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtkglarea gtk-engines

The X11-Application is in /Applications/Utilities/X11.

Hint: Most X11 programs, including lazarus expect to receive focus, when the users clicks on a window. Under MacOSX this is deactivated. You can activate it for all X11 applications by typing in the terminal:

       defaults write com.apple.x11 wm_click_through -bool true
Free Pascal Compiler

Then download and install the Free Pascal Compiler (at least 1.9.5 from 16th August 2004) from

https://sourceforge.net/project/showfiles.php?group_id=89339

When compiling gtk-related software, you need to add two lines to the fpc.cfg file, to enable use of libraries

-Fl/sw/lib
-Fl/usr/X11R6/lib


For lazarus you need the fpc sources as well: Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user can do this. First create a directory for fpc

(e.g. /Users/username/freepascal)

then open a terminal and do the following:

[]$ bash
[]$ export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
[]$ cvs login

password is 'cvs' without the 'quotes'

[]$ cvs -z3 co fpc

This will create a directory called 'fpc', which can be later used in the IDE. Hint: To download/update the latest changes you can simply do

[]$ cd /Users/username/freepascal/fpc
[]$ cvs -z3 update -dP