Difference between revisions of "Installing Lazarus/ja"

From Lazarus wiki
Jump to navigationJump to search
 
Line 25: Line 25:
  
 
The following sections describe how to get FreePascal and how to install Lazarus properly.
 
The following sections 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 2.0.2 or higher and it requires both the compiled fpc libs (binaries) and the fpc sources and of the same version.
 +
 +
=== Installing Free Pascal under Linux ===
 +
 +
==== FPC Binaries ====
 +
 +
The latest release of FreePascal, version 2.0.2, can be obtained from the FreePascal website (http://www.freepascal.org/download.html, then choose a mirror) or from sourceforge (http://sourceforge.net/projects/lazarus).
 +
 +
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:
 +
 +
WARNING: if you're not using RPMs (even if you plan to use alien) it's best to get latest stable fpc (2.0.2 as of now) and install Lazarus from source.<br>
 +
 +
Start linux and login as ROOT.<br>
 +
 +
Download lastest files from http://sourceforge.net/project/showfiles.php?group_id=89339.
 +
As example:
 +
:* fpc-2.0.2-0.i386.rpm
 +
:* fpcsrc-2.0.2-0.i386.rpm
 +
:* lazarus-0.9.14-1.i386.rpm<br>
 +
and install them with:
 +
:* rpm -Uvh fpc-2.0.2-0.i386.rpm
 +
:* rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
 +
:* rpm -Uvh lazarus-0.9.14-1.i386.rpm<br>
 +
 +
Debian users will need to resort to either alien (warning, it doesn't generate fpc.cfg) or the tarball install.
 +
 +
==== FPC Sources ====
 +
 +
Since the version 2.0 release, FPC has migrated to Subversion (SVN).  There is currently no CVS mirror, so you will 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
 +
 +
=== 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.2 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|FPC Sources]] for Linux, where the use of SVN is described >>>>
 +
 +
The easiest way to get the Free Pascal sources is via SVN; 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 SVN ()
 +
 +
You will need to have a SVN client such as TortoiseSVN installed in order to perform the steps below. The exact commands vary between SVN clients; the ones given below are to be used under SVN 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> svn co http://svn.freepascal.org/svn/svn/trunk fpc
 +
Hint: To download/update the latest changes you can simply do
 +
  C:\> cd Source\FPC
 +
  C:\Source\FPC> svn up
 +
''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 FreeBSD/auto ===
 +
 +
Latest FreeBSD ports collection has 2.0.2 (and soon 2.0.4) stable version in ports/lang/fpc2.
 +
All you have to do is install the port. If you want to use Lazarus you need to install "gtk" from ports first tho.
 +
 +
This can be done manualy as root.
 +
 +
[]# cd /usr/ports/lang/fpc2 && make install && make clean
 +
 +
Other possibility is to use portinstall.
 +
 +
[]# portinstall fpc2
 +
 +
Once fpc is installed you can check if it's working by simply running
 +
 +
[]$ fpc
 +
 +
There's one problem with FreeBSD and FPC however. The port installs all packages and FCL, but the latest
 +
glib and gtk from ports tree (which is required for Lazarus) has been renamed. This means that you'll get a
 +
"cannot find library -lglib" when linking Lazarus. You can fix this in one of two ways.
 +
 +
1. You can change the names in fpc sources and recompile [not recommended]<br>
 +
2. You can soft-link the new glib/gtk libnames to old ones.
 +
 +
2. can be done like this:
 +
 +
[]$ cd /usr/local/lib && ln -s libglib-12.so libglib12.so
 +
[]$ cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so
 +
 +
Lazarus should compile and link after these changes.
 +
 +
=== 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 2.0.2 branch) You can do a check by parsing the output of ppc386 -i if it is 2.0.2 .. 2.1.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/2.0.2/ppc386 $THEPREFIX/bin/ppc386
 +
      install sourceinstall PREFIX=$THEPREFIX
 +
 +
5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/2.0.1 $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 also need the Apple Developer tools, X11, and GTK 1.2:
 +
 +
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 new system: choose "Customize" in the install dialog, check "X11".
 +
 +
On an already installed system:
 +
 +
MacOSX 10.3: download at:
 +
: http://www.apple.com/downloads/macosx/apple/x11formacosx.html
 +
 +
MacOSX 10.4: install X11 from the DVD.
 +
 +
GTK 1.2: Downloading the GTK 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.
 +
 +
In the Terminal, run
 +
        sudo /sw/bin/apt-get install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtk-engines
 +
 +
The X11 application is in /Applications/Utilities/X11. You can drag and drop it on the dock so you can start it with one click.
 +
 +
Tip: Most X11 programs, including Lazarus, expect to receive focus when the user 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 2.0.2) 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:
 +
 +
*Install SVN for MacOS X: A good package is provided by [http://www.codingmonkeys.de/mbo/ Martin Ott].
 +
 +
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:
 +
[]$ svn co http://svn.freepascal.org/svn/svn/trunk fpc
 +
This will create a directories 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
 +
[]$ svn up

Revision as of 15:36, 1 August 2006

概要

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, a Windows ".exe" installer, or a Mac OS X ".dmg" 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 システム要件

  1. FreePascal コンパイラ、パッケージ、ソースファイル。(*重要*: 同じバージョンで同じ日付のもの)
  2. ウィジェットツールキット
    Win32
    The native Win32 API can be used
    Linux/xxxBSD
    GTK+ 1.2.x : ほとんどの Linux ディストリビューションや *BSD(FreeBSDやNetBSDなど)はあらかじめ GTK+ 1.2.x ライブラリがインストールされています。またそれらは 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 Installing under Mac OS X below.
    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 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 2.0.2 or higher and it requires both the compiled fpc libs (binaries) and the fpc sources and of the same version.

Installing Free Pascal under Linux

FPC Binaries

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

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:

WARNING: if you're not using RPMs (even if you plan to use alien) it's best to get latest stable fpc (2.0.2 as of now) and install Lazarus from source.

Start linux and login as ROOT.

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

  • fpc-2.0.2-0.i386.rpm
  • fpcsrc-2.0.2-0.i386.rpm
  • lazarus-0.9.14-1.i386.rpm

and install them with:

  • rpm -Uvh fpc-2.0.2-0.i386.rpm
  • rpm -Uvh fpcsrc-2.0.2-0.i386.rpm
  • rpm -Uvh lazarus-0.9.14-1.i386.rpm

Debian users will need to resort to either alien (warning, it doesn't generate fpc.cfg) or the tarball install.

FPC Sources

Since the version 2.0 release, FPC has migrated to Subversion (SVN). There is currently no CVS mirror, so you will 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

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.2 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 SVN; 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 SVN ()

You will need to have a SVN client such as TortoiseSVN installed in order to perform the steps below. The exact commands vary between SVN clients; the ones given below are to be used under SVN 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> svn co http://svn.freepascal.org/svn/svn/trunk fpc

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

 C:\> cd Source\FPC
 C:\Source\FPC> svn up

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 FreeBSD/auto

Latest FreeBSD ports collection has 2.0.2 (and soon 2.0.4) stable version in ports/lang/fpc2. All you have to do is install the port. If you want to use Lazarus you need to install "gtk" from ports first tho.

This can be done manualy as root.

[]# cd /usr/ports/lang/fpc2 && make install && make clean

Other possibility is to use portinstall.

[]# portinstall fpc2

Once fpc is installed you can check if it's working by simply running

[]$ fpc

There's one problem with FreeBSD and FPC however. The port installs all packages and FCL, but the latest glib and gtk from ports tree (which is required for Lazarus) has been renamed. This means that you'll get a "cannot find library -lglib" when linking Lazarus. You can fix this in one of two ways.

1. You can change the names in fpc sources and recompile [not recommended]
2. You can soft-link the new glib/gtk libnames to old ones.

2. can be done like this:

[]$ cd /usr/local/lib && ln -s libglib-12.so libglib12.so
[]$ cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so

Lazarus should compile and link after these changes.

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 2.0.2 branch) You can do a check by parsing the output of ppc386 -i if it is 2.0.2 .. 2.1.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/2.0.2/ppc386 $THEPREFIX/bin/ppc386
     install sourceinstall PREFIX=$THEPREFIX

5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/2.0.1 $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 also need the Apple Developer tools, X11, and GTK 1.2:

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 new system: choose "Customize" in the install dialog, check "X11".

On an already installed system:

MacOSX 10.3: download at:

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

MacOSX 10.4: install X11 from the DVD.

GTK 1.2: Downloading the GTK 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.

In the Terminal, run

       sudo /sw/bin/apt-get install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtk-engines

The X11 application is in /Applications/Utilities/X11. You can drag and drop it on the dock so you can start it with one click.

Tip: Most X11 programs, including Lazarus, expect to receive focus when the user 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 2.0.2) 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:

  • Install SVN for MacOS X: A good package is provided by Martin Ott.

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:

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

This will create a directories 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
[]$ svn up