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 parts of the compiler distribution. The distribution zip files for DOS or OS/2 contain an installation program INSTALL.EXE. You must run this program to install the compiler.
The screen of the DOS or OS/2 installation program looks like figure 2.1.
The program allows you to select:
What components you wish to install. e.g do you want the sources or not, do you want docs or not. Items that you didn’t download when downloading as separate files, will not be enabled, i.e. you can’t select them.
Where you want to install (the default location is C:\PP).
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\2.6\BIN\i386-DOS
for dos or
SET PATH=%PATH%;C:\PP\2.6\BIN\i386-OS2
for os/2. (Again, assuming that you installed in the default location).
On os/2, Free Pascal installs some libraries from the EMX package if they were not yet installed. (The installer will notify you if they should be installed). They are located in the
C:\PP\DLL
directory. The name of this directory should be added to the LIBPATH directive in the config.sys file:
LIBPATH=XXX;C:\PP\DLL
Obviously, any existing directories in the LIBPATH directive (indicated by XXX in the above example) should be preserved.
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) under dos and Windows.