COS 126: Mac OS X Installation Page
This documents instructs you on how to setup a C programming
environment for your Macintosh computer.
The instructions will deal with configuring one of the laptops purchased
through SCI, although if you bought your own equipment you should be
able to adapt the instructions below.
All of the software below is either (i) shipped with your SCI computer,
(ii) licensed by Princeton and can be downloaded for free,
or (iii) freeware.
- If you bought your computer from SCI, you have Mac OS 9 installed.
Too bad. You now need to upgrade to OS X.
An OS X installation CD should be included with your SCI computer.
OS X is a completely different operating system than OS 9, but
it is an ideal programming environment.
You will still be able to run OS 9 applications like MS Office.
- Boot up your computer using OS 9. Installation works best if you are
already connected to the network.
- Insert the Mac OS X CD and click Install OS X.
It's a Mac, so this will be a breeze.
-
Most of the options should be self-explanatory (e.g., setting the
date and time). For the username, we recommend using the same
one as your email account. For email preferences, choose:
email address: username@princeton.edu
incoming mail server: imap.princeton.edu
outgoing mail server: smtp.princeton.edu
-
If you are connected to the network, OS X should updated itself automatically to
version 10.0.4 after installation. Otherwise, you can do this manually later on
via System Preferences -> Software Update.
|
Creating gcc126 to properly compile files
|
- Open a terminal window. You can find this under
Go -> Applications -> Utilities. Drag the Terminal to your dock since
you will be using it frequently.
- You should now have a "Terminal" window somewhere on the screen.
It will have a command prompt that looks something like:
[localhost:~] wayne%
You can enter a command by typing it in the Terminal window
followed by the "Enter" or "Return" key.
- For your first command, type the text in bold at the command prompt:
[localhost:~] wayne% pico .tcshrc
Now, type in the following text and save the file with Ctrl-o.
setenv PATH ${PATH}:.
alias gcc126 'cc -ansi -pedantic -Wall -W -O'
You probably won't be using the pico editor very often, but
it's sometimes useful.
(This adds the current directory to your path and tells the
compiler to allow only legal ANSI C programs.
If this sounds like gibberish, don't worry about it.)
- Now, close the Shell window - the customizations will take
effect the next time you open a Shell window.
The Developer tools include a C compiler, debugger, and lots
of other goodies.
-
Install the Developer Tools from CD if you have access to one. Otherwise,
go to
connect.apple.com, become a free
member of the Apple Development
Connection, login, and download the Mac OS X Tools by choosing Download
Software -> OS X -> Max OS X Version 10.1 Developer Tools.
It's 187.1 MB so don't attempt this over a modem.
|
Text Editor for Programming
|
We recommend using Project Builder. It is
included with the Developer Tools.
BBEdit is another popular text editor for the Mac.
The "Lite" version is freeware. It can be downloaded from
www.bbedit.com.
MacGSView is a program that allows you to view PostScript files.
You will need such a program when we create graphics, starting
in Assignment 2.
Acrobat Reader allows you to view pdf files. Many of the documents on
our Web site are in this format.
If you bought your computer from SCI, you probably have the
OS 9 version of Acrobat installed. We recommend upgrading
to the OS X version.
-
Download and install the pdf viewer Acrobat Reader for OS X
from
www.adobe.com.
Fetch is an FTP client that allows you to transfer files to and
from your computer. On many assignments we provide various
sample code and data files which you will probably want
to download.
-
If you bought an SCI computer, you probably already have it
installed. Otherwise, you can download it from
from
CIT's site.
A command-line ftp client is already installed with OS X -- just
type sftp ftp.princeton.edu in the Terminal.
Nifty telnet is a telnet and
ssh client that allows you to
login to a remote system such as arizona. If you plan to edit
and compiler programs under OS X, you may not need this program.
-
If you bought an SCI computer, you probably already have it
installed. Otherwise, you can download it from
from
CIT's site.
A command-line ssh client is already installed with OS X -- just
type ssh arizona.princeton.edu.
Some of the in-class demos are in PowerPoint format.
-
If you have MS Office, you don't need the viewer. Otherwise,
you can download a free PowerPoint viewer from
Microsoft.
It is automatically installed along with OS X.