Subsections

3 Installation

3.1 System requirements

map3d is written in standard C/C++ and uses the OpenGL and GTK+ libraries, both choices made to ensure broad portability of the program.

Note: As of map3d 6.4 or greater, GTK+ version 2.4 or greater is required to run map3d. Please update your dependencies according the the Windows, Linux, or Mac sections below.

All platforms:
OpenGL now comes standard on most systems. Instructions on how to install GTK+ are described in detail below based on which platform you are installing. described below
Requirements for all systems.
OpenGL libraries (GL and GLU) version 1.1 + 1
OpenGL/window interface library (GLX)  
GTK+ libraries and dependencies version 2.4+
gtkglext: GL extension for GTK 1.2+

Linux (i386):
map3d requires the OpenGL library, which is available as the mesa library at www.mesa3d.org for any Linux platform. For better performance, graphics cards from companies such as nVidia (www.nvidia.com) usually provide OpenGL libraries.
Requirements
Operating System kernel 2.2.x
Architecture i386 (+ maybe PPC)
Applications Binary Interface libc2.1
Recommendations
Window system XFree86 version 4.0 +
Hardware 3D graphics card (nVidia, 3dfx, ati)
  $ \ge$ 128 MB main memory

Windows:

Requirements
Operating System W2K/NT4.0/9x
Architecture i386
Applications Binary Interface win32
Recommendations
Hardware 3D graphics card (nVidia, 3dfx, ati)
  $ \ge$ 128 MB main memory

Mac OS X:

Requirements
Operating System Mac OS 10.3.9
Architecture PPC or Intel
Recommendations
Hardware 3D graphics card (nVidia, 3dfx, ati)
  Intel processor
  $ \ge$ 512 MB main memory

SGI:
we have dropped our support for SGI. This platform, while so central to the origins of map3d and OpenGL, is just not a significant desktop system in this day and age.

3.2 General Installation

Unfortunately, with our move to GTK+ for window support, it is not as easy as past versions, which required just the download of an executable. We hope (in vain, perhaps) to be able to do that again in the future, but for now we will attempt to make installation as easy as we can. Simplified instructions will be in a README file which comes with each package, and are also listed below:

To download the software, use this URL www.sci.utah.edu/software/map3d.html, and click on the ``Download'' button. You'll need to sign into the SCI archive. For each of the installation instructions below, you can grab those file from this page.

To test the installation, use the test files that accompany this distribution. Each has some script files included that show how to call and execute map3d.


3.3 Linux Installation Instructions

The Linux installation is relatively straightforward. You'll need to download map3d's dependencies, then download map3d itself.

3.3.1 Linux Dependencies

There are two phases to this part. First we need to get GTK+ and its dependencies. The easiest way to do this is from your distribution's installation CDs, or you can download the RPMs at www.rpmfind.net.

To get the dependencies from your distribution, run the Package Manager (Add/Remove Applications, configure-packages or something of that sort). Search for gtk, and install gtk2 (if you can't find that directly, then installing the gnome environment will take care of it).

To get the dependencies from the internet, navigate your favorite browser to http://www.rpmfind.net, and search for gtk-2. Try to find one that matches your distribution (redhat, mandrake, etc.). map3d requires gtk2-2.4 or greater.

The next part is to download gtkglext, the library that supports OpenGL for GTK widgets. Some distrubutions come with gtkglext. If yours doesn't, you will need to download the gtkglext source and compile it yourself (don't worry--if your gtk is properly set up, this will be very easy). Download the sources from Source Forge http://sourceforge.net/projects/gtkglext and follow these instructions:

    cd <download directory>
    gunzip gtkglext-1.0.6.tar.gz
    tar xf gtkglext-1.0.6.tar
    cd gtkglext-1.0.6
    configure
    make
    make install

If you don't want these to end up in /usr/local/lib, you need to

    configure --prefix=<dir>
where dir is where to put the libraries.

3.3.2 Linux Executable

Download the map3d-6.5-linux.tar.gz file from the map3d download page and unzip it to a directory of your choice. We will call that RUN-DIR. This is the directory from which you will run map3d.

To run map3d, you will need to make sure that all the libraries are in your LD_LIBRARY_PATH environment variable. For this we will assume that your gtk libraries are in /usr/lib and your gtkglext libraries are in /usr/local/lib. Do the following: tcsh users:

   setenv LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
or
bash users:
 
    export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

you might want to put this line in your .cshrc or .profile file to avoid having to run this multiple times.


3.4 Windows Installation Instructions

The Windows installation is relatively straightforward. You'll need to download map3d's dependencies, then download map3d itself.

3.4.1 Windows Dependencies

Download the map3d-win-environment.zip file from the map3d download page and unzip (using winzip, native windows xp zip file browser, or another windows zip program) it into a location of your choice - we will call that INSTALL-DIR. It will create a directory called INSTALL-DIR\map3d.

Add INSTALL-DIR\map3d\lib to your path. To do this, open the Control Panel, select System, and click on the `Advanced' tab on the top of the screen. Click on the Environment Variables button. You should see a variable called Path or PATH in the System Variables section. Click on it, and select Edit. Go to the end of the line, add a semi-colon (;) and type INSTALL-DIR\map3d\lib.

3.4.2 Windows Executable

There is an executable of map3d in the environment directory. We have also placed an executable here to facilitate future downloads, so you only have to download the environment once. If you wish, download the map3d-6.5-windows.zip file from the map3d download page and unzip it to a directory of your choice. We will call that RUN-DIR. This is the directory from which you will run map3d.


3.5 Mac OS X Installation Instructions

The Mac OS X installation is relatively straightforward. You'll need to download map3d's dependencies, then download map3d itself.

3.5.1 Mac OS X Dependencies

Map3d requires the gtk+2 and gtkglext libraries. We provide an installer that installs these libraries with the Mac OS X distribution of map3d. Once you mount the map3d-6.5-mac.dmg disc image there is an installer application called map3d Dependencies.mpkg, just run this program and the libraries will be installed for you.

3.5.2 Mac OS X Executable

Also in the map3d-6.5-mac.dmg disc image is a file called map3d, this is the map3d executable and to install it, just drag it to a directory of your choice. We will call that RUN-DIR. This is the directory from which you will run map3d.


3.6 Installing from source

We have tried to make installing map3d from source as simple as possible. There are four steps:

  1. Download the source
  2. Download and install map3d's external dependencies
  3. Setup the make configuration
  4. Compile

3.6.1 Download Source Code

You can get the map3d source code from the map3d download page at http://www.sci.utah.edu/software/map3d.html. Login and work your way to the map3d version 6.5 download page, and download map3d-source.tar.gz.

3.6.2 Install Dependencies

You will need to install map3d's dependencies: gtk+, gtkglext, etc. To do this, please refer to Section 3.4, Section [*], Section 3.3, or Section 3.5.

If you are running on a different system, you will probably need to download and install these on your own; please refer to GTK website and GtkGLExt website.

3.6.3 Configuring map3d

map3d in addition to GTK+, map3d has other dependencies that have been developed in conjunction with map3d, which were designed to be used with and independently of map3d. The make system shipped with map3d was designed to allow users to compile these libraries independently of map3d if they so choose. However, most users will not use these libraries for any other purpose except for running map3d.

You should not have to change much in order to get map3d to compile. MatlabIO (one of map3d's dependents) needs to know where ZLIB is (required, and should be installed after completing the previous section), and map3d needs to know where gtk is. The included files show samples of how this is to be done, and following are specific details.

3.6.3.1 MS Visual Studio users

To configure MatlabIO, open Visual Studio, load map3dtop/map3d.sln, right-click on the MatlabIO project, and select properties. Under Configuration properties, click C/C++, select General, and add the directory where zlib.h is.

To configure map3d, right-click on the map3d project, and select properties. Under Configuration properties, click C/C++, select General, and add the directory where all the gtk-based header files are (if you installed the map3d-environment from the website, they should all be in the same place). I.e., \local\map3d-environment\include. Each directory should be semi-colon delimited.

While still under map3d property pages, select Linker, and under General, add the directory where the libraries are; i.e., \local\map3d-environment\lib.

3.6.3.2 Mac, Linux, and SGI users

To configure both MatlabIO and map3d, it is only necessary to modify map3dtop/Makefile.incl.

To configure MatlabIO, change ZLIB_INC to the directory that contains zlib.h Also change ZLIB_LIB to the directory that contains the zlib library.

To configure map3d, edit map3dtop/map3d/Makefile and change GTKTOP, GTKLIB, GTKGL_INC, and GTKGL_LIB to appropriate values. If gtk.h is in /usr/local/include/gtk-2.0/gtk, and libgtk-x11-2.0.so (or .dylib for mac users) is in /usr/local/lib, then

GTK_INC=/usr/local/include
GTK_LIB=/usr/local/lib
Similarly, GTKGL_INC and GTKGL_LIB need to be set. to include the dir that contains gtkgl.h and libgtkgl-x11-1.0.so (or .dylib) respectively. (-I goes in front of the include directory, and -L goes in front of the lib directory, respectively.)

3.6.4 Compiling map3d

Compiling map3d now should be as simple as entering the map3dtop directory and running
make

Remember for map3d to run, you should probably add map3d to your path. If, when you run map3d see errors like ``Cannot load library gtk-2.0.dll'' or ``Cannot map so libgtk-2.0.so'', then you need to add the gtk libraries to your runtime path. To do this on windows, follow the directions on the windows install page, otherwise, set the LD_LIBRARY_PATH. To do this, do the following: tcsh users:

   setenv LD_LIBRARY_PATH GTK_LIB:$LD_LIBRARY_PATH
or bash users:
 
    export LD_LIBRARY_PATH=GTK_LIB:$LD_LIBRARY_PATH

Substitute the values that GTK_LIB is set to in the Makefile.incl. You might want to put this line in your .cshrc or .profile file to avoid having to run this multiple times.

3.6.4.1 Contact

If there are problems, feel free to contact map3d@sci.utah.edu

3.7 Documentation

This document should have reached you either as a pdf file or via the map3d web site. If you would like more copies or the latest version, go to the same web site and look for the links under Documentation:

www.sci.utah.edu/software/map3d.html

3.8 Bug reporting

We want to hear your response to using map3d and especially to learn about any bugs you may find. They may be features, rather than bugs, but if so, we will be happy to hear your impressions.

To submit a bug report please send email to map3d@sci.utah.edu or point your browser at software.sci.utah.edu/bugzilla (you will need to register your e-mail address) with the following information:

  1. Type and version of the operating system and hardware you are using.
  2. Version of map3d.
  3. Description of the bug/feature you encountered.
  4. Suggestions for fixing the bug or altering the program behavior.

3.9 How to reach us

We have established an email address for map3d, map3d@sci.utah.edu, and web pages within the website www.sci.utah.edu/ncrr dedicated to map3d. There is also a majordomo mailing list for map3d users called map3d-users@sci.utah.edu. To subscribe to this list, send email to majordomo@sci.utah.edu with the following in the message body

      subscribe map3d-users

Please let us know how you use map3d and how we can make it better for your purposes. We can only develop this program with continued support and the best way to achieve this is to show that others use the program and find it helpful.

Rob Macleod 2007-03-01