Rolfs Mac-OSX-Site (english translation)
For german speaking peoples: deutsche Originalseite
Official Apple-Site
Old Mac-Site at Uni
Setting up MacOSX for programming
Unfortunately with new Macs the developer tools
(C-Compiler, Linker, make, ...) are not included any more.
On older Macs during installation the developer tools Xcode and X11 can be
selected.
With new Macs (e.g. "MacBook Air") following steps are needed:
- After common basic installation select "software update..."
in the apple menu. This will need approximately 30 minutes.
Then at least version 10.6.6 is installed.
- Xcode must now be downloaded with costs (1) from
"App Store".
This takes several hours because "Xcode 4" is now almost 5 gigabyte!
- After this go to folder "Applications" and click to "Install Xcode".
This makes the installation. The installation-programm has
an error (at least in german version), resulting in doing noting anymore after
about 99%. Anyway the installation will be finished.
Following steps can be done also without Xcode installed:
- Not really necessary but just like I do it:
Terminal and X11 from "Applications/systemutility"
(german: "Programme/Dienstprogramme") pulling to the Dock.
In Systemesettings select Dock position to the left. Removing not used symbols
from the Dock.
- Start Terminal and make a new folder "bin". This can be done by typing
"mkdir bin".
- Download
xtekplot1-macosx-bin.tar.gz
- In Terminal typing the following commands:
ls bin/ ;to check if folder bin is here, otherwise create it
ls .profile ;to check if you have it already
cd Downloads/
tar zxvf xtekplot1-macosx-bin.tar.gz
cd xtekplot1-macosx-bin
mv bin/* $HOME/bin/
cp .profile $HOME/ ;if .profile not yet here
cd
pwd
echo $PATH
emacs .profile ;or any other text editor
- Customize in .profile the following lines:
export PATH=.:~/bin:$PATH ;if not set like this anyway
export h=/Users/Name/xtekplot1/h ;adapt /Users/Name appropriate to the result of "pwd"
For saving and leaving emacs use <ctrl><x> <ctrl><c>
- Restart Terminal to activate the settings in .profile
On german keyboard ~ can be reached with <alt><n><Space>.
Same on US keyboard gives the wrong tilde.
On US keyboard ~ should be on the key left of the z.
The following steps works only when Xcode installed or
alternative developing tools (2):
- Download xtekplot1.tar.gz
- In Terminal typing the following commands:
cd Downloads/
tar zxvf xtekplot1.tar.gz
mv xtekplot1 $HOME/
cd $h
emacs xtekplot1.cc
- In xtekplot1.cc the line UNIX should be commented out and MACOSX activated:
//#define UNIX
#define MACOSX
- Typing "make" should now result in translating xtekplot1 and a few
little test programs.
The program "keyshow" is used to check key presses and menu functions of
xtekplot1.
The program "checkrequester" to check file select function.
The Program "checkgrein" to check input with coss hairs,
and there is a menu to check the german Umlaute.
- Trying more test examples:
cd $h
cd ../beispiele/
make
ls -trl
hanoi
xvollbildtest ;some fullscreen tests
Dont worry about the error "make: g77: No such file or directory".
This will only be needed if you want to program in Fortran.
If hanoi dont work: try beispiel1 until beispiel3c.
- Trying out the really fullscreen modus:
Set the Dock to fading out. Restart X11 and set in the menu "Settings..."
the fullscreen modus.
Then again "xvollbildtest"
To go back from the fullscreen X11 use the keys: ctrl+cmd+a
Remarks
(1) Only a small amount but annoying anyway because you have to register
and giving your credit card number. Anyway developing tools should be
part of the operating system.
(2) It should be possible to install gcc (C-Compiler, C++-Compiler
and Linker) and make from the Opensource sources.
Installation of Diasort (my picture viewing program)
First download and install
ImageMagick
.
(this is needed in Diasort to call the command "convert")
The commands to set MAGICK_HOME, PATH and DYLD_LIBRARY_PATH should be
copied from above link to the file .profile.
Download the packets
bilbo.tar.gz and
diasort.tar.gz
and install using "make" and "make install".
The Diasort_Tutorial is in
Archiv
(but only in german so far).
Last update: 28-Mar-2011 / Rolf