next up previous contents
Next: Optional configuration steps Up: Installing the compiler Previous: Before Installation : Requirements

Installing the compiler.

The installation of Free Pascal is easy, but is platform-dependent. We discuss the process for each platform separately.

Installing under DOS

Mandatory installation steps.

First, you must get the latest distribution files of Free Pascal. They come as zip files, which you must unzip first, or you can download the compiler as a series of separate files. This is especially useful if you have a slow connection, but it is also nice if you want to install only some pats of the compiler distribution. The distribution zip file contains an installation program INSTALL.EXE. You must run this program to install the compiler.

The screen of the installation program looks like this:

external

The program allows you to select:

In order to run Free Pascal from any directory on your system, you must extend your path variable to contain the C:\PP\BIN directory. Usually this is done in the AUTOEXEC.BAT file. It should look something like this :

  SET PATH=%PATH%;C:\PP\BIN
(Again, assuming that you installed in the default location).

If you want to use the graphic drivers you must modify the environment variable GO32. Instructions for doing this can be found in the documentation of the Graph unit, at the InitGraph procedure.

Optional Installation: The coprocessor emulation

For people who have an older CPU type, without math coprocessor (i387) it is necessary to install a coprocessor emulation, since Free Pascal uses the coprocessor to do all floating point operations.

The installation of the coprocessor emulation is handled by the installation program (INSTALL.EXE). However,

Installing under Linux

Mandatory installation steps.

The LINUX distribution of Free Pascal comes in three forms:

All of these packages contain a ELF version of the compiler binaries and units. the older aout binaries are no longer distributed, although you still can use the comiler on an aout system if you recompile it.

If you use the .rpm format, installation is limited to

rpm -i fpc-pascal-XXX.rpm
(XXX is the version number of the .rpm file)

If you use debian, installation is limited to

dpkg -i fpc-XXX.deb
Here again, XXX is the version number of the .deb file.

You need root access to install these packages. The .tar file allows you to do an installation if you don't have root permissions.

When downloading the .tar file, or the separate files, installation is more interactive.

I nCAse you downloaded the .tar file, you should first untar the file, in some directory where you have write permission, using the following command:

tar -xvf fpc.tar
We supposed here that you downloaded the file fpc.tar somewhere from the Internet. (The real filename will have some version number in it, which we omit here for clarity.)

When the file is untarred, you will be left with more archive files, and an install program: an installation shell script.

If you downloaded the files as separate files, you should at least download the install.sh script, and the libraries (in libs.tar.gz).

To install Free Pascal, all that you need to do now is give the following command:

./install.sh
And then you must answer some questions. They're very simple, they're mainly concerned with 2 things :
  1. Places where you can install different things.
  2. Deciding if you want to install certain components (such as sources and demo programs).
The script will automatically detect which components are present and can be installed. It will only offer to install what has been found. because of this feature, you must keep the original names when downloading, since the script expects this.

If you run the installation script as the root user, you can just accept all installation defaults. If you don't run as root, you must take care to supply the installation program with directory names where you have write permission, as it will attempt to create the directories you specify. In principle, you can install it wherever you want, though.

At the end of installation, the installation program will generate a configuration file for the Free Pascal compiler which reflects the settings that you chose. It will install this file in the /etc directory, (if you are not installing as root, this will fail), and in the directory where you installed the libraries.

If you want the Free Pascal compiler to use this configuration file, it must be present in /etc, or you can set the environment variable PPC_CONFIG_PATH. Under csh, you can do this by adding a

setenv PPC_CONFIG_PATH /usr/lib/ppc/0.99.1
line to your .login file in your home directory. (see also the next section)


next up previous contents
Next: Optional configuration steps Up: Installing the compiler Previous: Before Installation : Requirements

Michael Van Canneyt
Thu Sep 10 13:56:17 CEST 1998