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.
For Windows, there is a Windows installer, setup.exe, this is a normal windows installation program, which offers the usual options.
The screen of the DOS or OS/2 installation program looks like figure 2.1.
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\GO32V2
|
for dos or
SET PATH=%PATH%;C:\PP\BIN\WIN32
|
for Windows and finally
SET PATH=%PATH%;C:\PP\BIN\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.