PGOPHER <Prev Next>

Compiling From Source

PGOPHER is mainly written in Pascal, using the object oriented extensions originally available from the Borland Pascal compiler and now also available in the Free Pascal compiler (not GNU Pascal). The program is distributed as a zip file. Unpack this in a directory on its own, which will create several sub-directories.

Microsoft Windows

The current version is compiled with Embarcadero (originally Borland, then Codegear) Delphi 2006 (32 bit version) and XE3 (64 bit version), though it should compile with any recent version (20066 or later), possibly with minor modifications. The mkpgopher.bat file in the pgopher directory will compile it from the command line. Alternatively install the utils/Putils.dpk and wutils/Pcontrols.dpk packages into the IDE, after which the pgopher/Pgopher.dpr project can be loaded and compiled in the IDE. Note that various open source graphics libraries are required for a complete build; these are included in the GraphicEx directory. The files with "orig" in the name are the files as distributed with the library.

Compilation using the open source Free Pascal (http://www.freepascal.org) and Lazarus (http://www.lazarus.freepascal.org) packages is also possible. Installing the current Lazarus snapshot gives a good starting point though the development version may be required for correct operation, particularly for Lazarus. There is a helpful wiki page on the Lazarus site at http://wiki.lazarus.freepascal.org/index.php/Installing_Lazarus on installing both the compiler and Lazarus. Once the Lazarus IDE and the PGOPHER source are installed, the instructions are as for Linux below.

Linux

The current version is compiled the using the open source Free Pascal (http://www.freepascal.org) and Lazarus (http://www.lazarus.freepascal.org) packages. The development versions may be required for correct operation, particularly for Lazarus. There is a helpful wiki page on the Lazarus site at http://wiki.lazarus.freepascal.org/index.php/Installing_Lazarus on installing both the compiler and Lazarus. The standard development (compiler) tools will be required, and possibly some additional libraries not installed by default, but can be installed using the standard package system for your distribution. Given this installation, PGOPHER can be compiled with the mkpgopher script in the pgopher directory (the LAZDIR variable may need setting manually). Alternatively, to use the Lazarus IDE:
  1. Start the IDE using the startlazarus shortcut
  2. Install the Pcontrols package by:
    1. Go to "Components", "Open Package File" and open the Putils.lpk file in the utils directory.
    2. Similarly, open the gutils.lpk and Pcontrols.lpk packages in the wutils directory
    3. Click "Install" on the Pcontrols package window , and accept the rebuild of Lazarus.
  3. Repeat steps 1 and 2 of the the previous step for the lutils.lpk package in the lutils directory and the lforms.lpk package in the lforms directory
  4. Use "Project", "Open Project" to load pgopher.lpi in the pgopher directory.
  5. Compile and run with "Run", "Build All"
Steps 2 and 3 are only required on initial installation of Lazarus

Mac

Compilation on the Mac is similar to the process on Linux. See the "Installing Free Pascal under Mac OS X" section in the Lazarus wiki page at:

http://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X

for more details. Compiling PGOPHER is then as for Linux.

LAPACK (and BLAS)

PGOPHER uses slightly modified versions of selected parts of the LAPACK library to diagonalize matrices. Precompiled versions of these (using g77 or gfortran) are included with the source distribution, as these do not normally need to be recompiled. For systems other than Microsoft Windows this can normally be accomplished using the command:

	make -f GNUmakefile
in the utils/blas and utils/lapack directories. The modifications are mainly so that the fortran run time library is not required.