Go to the gtopo downloads page and click on the link to download the latest version. This should deposit a compressed tar file on your system, something with a name like:
gtopo-0.9.13.tar.gz
Now, decide where you want to unpack this tar file. The following command:
tar xzvf gtopo-0.9.13.tar.gzWill unpack the tar file, creating a directory (within your current directory) with the name gtopo-0.9.13 (or something similar) containing all the source files.
If you do only this, then try to build gtopo, you will get lots of errors that look something like this:
make cc -c -g gtopo.c -g `pkg-config gtk+-2.0 --cflags` /bin/sh: pkg-config: command not found gtopo.c:21:21: error: gtk/gtk.h: No such file or directory gtopo.c:22:25: error: glib/gstdio.h: No such file or directory In file included from gtopo.c:28: gtopo.h:109: error: syntax error before 'GdkPixmap' gtopo.h:109: warning: no semicolon at end of struct or unionThe tipoff here in particular is the message:
gtk/gtk.h: No such file or directoryYou need to install some kind of gtk 2.0 development package.
As you may well know, there are two sets of OS X "packages" known as fink and darwinports. Pick one or the other (I picked darwinports).
I found what I thought was a viable option at the gtk+ OS X framework website. This gave me the file Gtk-Framework-2.14-LATEST.dmg, which contains Gtk 2.14. I dutifully installed this, but didn't get a pkg-config, and my makefile didn't work any different than the above, so I call this a complete looser. Without a working pkg-config, this is hardly a viable gtk distribution. Perhaps it integrates itself into Xcode in a way that makes Apple developers happy. Who knows. All I know is that this package did nothing but stink up my machine.
I reinstalled Xcode (since there did not seem to be an uninstall for this thing), hoping that might obliterate any relics this thing left.
Then I installed darwinports (by downloading a dmg for it and letting it run its installer). After that, I was frustrated at first because I could not figure where the just installed port command got installed to (it turns out it went into /opt/local/bin. Then to get gtk, do this:
sudo /opt/local/bin/port -d selfupdate sudo /opt/local/bin/port install gtk2The gtk2 step installs one package after the other and compiles them (this takes a really long time). Darwinports pulls in everything but the kitchen sink, even new versions of perl (just to build gtk2!), even a new version of the X server from xorg. Seems excessive, but I just grit my leave and find something else to do while it chugs away. It seems that what darwinports does is to pull pristine sources from the original web sites for each package, apply patches as needed, and then build. Not the way I would do things, but I suppose it has certain virtues. Finally (as of 4-21-2009), it fetches gtk+-2.14.7.tar.bz2 and builds gtk2 from that.
This is simple (once you have installed Xcode and gtk 2 as described above.) Just do this:
cd gtopo-0.9.13 makeOn my machine this takes about 10 seconds and yields the gtopo executable. You will probably want to copy it to some directory on your search path. On my machine, I did this:
sudo cp gtopo /opt/local/binOn my machine, when I start gtopo I get the message:
Xlib: extension "RANDR" missing on display "/tmp/launch-yadayada/:0I have no idea what this means, but it doesn't seem to stop gtopo from running.
The "two finger drag" that you use to scroll, substitues nicely for a wheel on a mouse on the Mac. The Mac keyboard has a different sort of page up/down keys, that now serve to jog your position on the map the way the arrow keys on a PC keyboard do. If you want some keys (as I do) that serve to change map scales, you have to edit the gtopo config file and assign some keys to this task. I use the u and j keys. I use "u" to replace Page up, and then pick the "j" key because it is below the "u" key on the keyboard. Since this is available to you for fiddling via the config file, you can do whatever you want, as follows:
up_key u down_key j
Gtopo / [email protected]