[fpc-devel] Mac OS X Quickstart section in README file

Dr. Karl-Michael Schindler karl-michael.schindler at physik.uni-halle.de
Tue Jul 18 08:55:34 CEST 2006


There is no Mac OS X Quickstart section in the install/doc/readme.txt file, 
although needed, in particular for the ReadMe.txt File of Mac OS X .dmg package.

This is my suggestion, which is partly based on what I found in 
install/macosx/resources/ReadMe.txt:

****************************************************************************
* Quick start - Mac OS X/Darwin
****************************************************************************

There are two methods to install FreePascal for Mac OS X.

1) Download and install the Mac OS X package (fpc-2.0.4.powerpc-macosx.dmg) 

This gives you the FreePascal compiler and the Xcode integration kit.

2) Install fpc using fink

This gives you the FreePascal compiler, in cluding all libraries, packages 
and units from its sources, including FreeVision and the IDE, which is 
partly works using X11 xterm.


With method 1 follow the instructions to install the XCode integration kit at:

http://www.freepascal.org/xcode.html

Method 2 is mainly thought for using the compiler through the command 
line. Fink takes care of setting the PATH variable. You can (under Mac OS 
X 10.2.x or earlier you actually have to) also use the command line with 
FreePascal installed using method 1. The main point is to change your Path 
as described below: 

The compiler is called "fpc" and will be installed in /usr/local/bin. This
directory may not be in your PATH, yet (if you type "fpc" in a Terminal
window and you get something like "fpc: command not found", then it isn't).
If the installation directory is not yet in your path, you will have to add
it. To get an idea, how to do this, follow the instructions at:

"http://fink.sourceforge.net/doc/users-guide/install.php#setup"

to determine which file you have to edit, but instead of adding the line
suggested there, add the following at the end:

- if your shell is the Bourneshell (bash):

 	export PATH=/usr/local/bin:$PATH

When using Terminal.app add this to ".bash_profile",
when using the X11 xterm add this to ".bashrc".
If these files do not exist yet in your home directory, you have to create 
them, for example with nano (or any other text editor):

	nano .bash_profile

- if your shell is the C Shell (csh or tcsh):

	setenv PATH /usr/local/bin:${PATH}

Next, close the Terminal window and open a new one. Now, the path should
be set correctly. After installing the package, you can write your
source code in your favorite editor (including Project Builder and XCode).
To compile something, go to the directory containing your source files in
Terminal and type:

        fpc name_of_your_source_file

The compiler only accepts one file name as argument, but will automatically
search for and compile any units used by the specified source file. Run
"fpc" without an yarguments to get an overview of the possible command line
options.




More information about the fpc-devel mailing list