Installing Hugs on Your Mac

These instructions are for installing the 2006 version of Hugs on your Mac with OS X version 10.6 (Snow Leopard), 10.5 (Leopard) or 10.4 (Tiger).

The instructions were written in September of 2010 (by Fritz Ruehr for his CS 154 class at Willamette University): they will probably still work for a year or two, but after that, I would look to the resources linked below for more updated material.

If you have an older version of Mac OS X, such as 10.2, you might try the older 2002 version of Hugs, which is available here.

OK, the installation will take 3 steps, some of which take some time, so be sure you can keep your machine running for a while (i.e., it should be plugged in, you don't have to run to class or leave the cafe, etc.).

The three steps (which will be expanded below) are:

  1. install the XCode Developer Tools, some Apple software for programming;
  2. install MacPorts (formerly DarwinPorts), a software installation manager for unix tools on Mac OS;
  3. install the Hugs 98 (version 2006) system (this is really the only part you probably want, but the other two are required to get it).

OK, now let's run through those three steps in some greater detail:

  1. Make sure you have Apple's XCode Developer Tools installed.

    You might even already have this if you write programs on your Mac. If not, you will need to get it, either by downloading it, or by using your original Mac install discs (CDs or DVDs). Frankly, you might not even have access to your original install discs: they could be at home if you're at school, or if your computer dealer or school administrator set up your Mac for you.

    According to the people at MacPorts (which is what requires XCode), you need:

    (How do you know which version of Mac OS you have? Click on the Apple menu and choose "About this Mac"; it should tell you there, just below the big, bold "Mac OS X".)

    If you don't have access to your Mac OS X installation CDs/DVDs, you will have to go to the Apple Developer Connection site and sign up to be an Apple Developer to get the XCode Tools.

    When you run the XCode Tools installer, make sure that the optional components for command line development are installed ("Unix Development" in the Xcode 3.x versions of the installer).

  2. Install the MacPorts system to manage unix software installations on the Mac.

    According to the people at MacPorts (which used to be called DarwinPorts), your best bet is to use an appropriate Mac-oriented installer ".dmg" disk image.

    You can find various .dmg files (i.e., the one you need for your version of Mac OS) by looking in the first paragraph of this installation guide at the MacPorts site.

    Once you get MacPorts installed, you run its commands from the command line; that is, you launch the Terminal application and type in commands there. Terminal is often installed in the Utilities sub-folder inside your Applications folder, which is usually linked into your dock (a folder witha big "A" on it).

  3. Install the Hugs system using the MacPorts install command for hugs98.

    Once you have MacPorts installed, you install Hugs by going to the command line (that means finding and running the Terminal program, see above), and typing in the command:

    sudo port install hugs98

    This step may take quite a while, so be prepared to wait. When it is done, try typing the "hugs" command as directed below into the command line (Terminal program) too make sure everything worked.

Running Hugs on your Mac

Once you have Hugs installed on your Mac, you can run it by running the Terminal program and typing the command:

hugs
there; this will start up the Hugs system and let you program.

You're not quite done yet, however; you still need to know how to: