Previous: Package Details, Up: Mathematica

### 9.6 Installing the Mathematica Packages

> BUG: This section is out of date. `Geomview` follows the GNU-installation habits, data goes to `PREFIX/share/geomview/`, user executables to `PREFIX/bin/`, private executables to `PREFIX/libexec/geomview/`, libraries to `PREFIX/lib/` where `PREFIX` denotes the installation prefiex specified for the `TOPSRCDIR/configure` script. Please have a look at the files `TOPSRCDIR/INSTALL` and `TOPSRCDIR/INSTALL.Geomview` for installation instructions.

> The installed Mathematica data-files can be found in `PREFIX/share/geomview/Mathematica/`.

If Geomview is properly installed on your system according to the instructions in See Installation, then the Mathematica-to-Geomview packages should work as described here; there should be no need for additional installation procedures. In practice, however, it is sometimes necessary to taylor the installation of the Mathematica packages and/or of Geomview itself to suit the needs of a particular system. This section contains details about how the installation works; if the Mathematica-to-Geomview connection does not seem to work for you after following the Geomview installation procedure, consult this section to see what might need to be fixed.

In this section, the phrase Geomview installation refers any of the procedures in See Installation. The way the Mathematica packages work and are installed is the same regardless of whether you have one of the binary distributions or the source distribution.

1. The relevant mathematica files are `OOGL.m`, `Geomview.m`, and `BezierPlot.m`; Mathematica must be able to find these files. They are distributed in the `PREFIX/share/geomview/Mathematica` subdirectory of the binary distributions, and in the `TOPSRCDIR/src/bin/geomutil/math2oogl` subdirectory of the source distribution. These files need to be in a directory that is on Mathematica's search path. You can look at the value of the `$Path` variable in a Mathematica session on your system to see a list of the directories on Mathematica's search path.

   The Geomview installation procedure puts copies of the Mathematica packages into a directory that you specify (`MMAPACKAGEDIR`). This should ensure that Mathematica can find them. Alternately, you could arrange to append the pathname of the Mathmematica package subdirectory of the Geomview distribution to the `$Path` variable each time you run Mathematica.

2. The package `OOGL.m` needs to be able to invoke the programs `geomview`, `math2oogl`, and `oogl2rib`. The Geomview installation procedure installs these programs into a directory that you specify for executables (`BINDIR`). Ideally, this directory should be on your shell's `$PATH`. More specifically, it should be on the `$PATH` of the shell in which Mathematica runs; the directory `/usr/local/bin` is usually a good choice. You can see the list of directories on this path by giving the command `!echo $path` in Mathematica.

   If for some reason you can't arrange for `geomview`, `math2oogl`, and `oogl2rib` to be in a directory on the shell's `$path`, you can modify `OOGL.m` to cause it to look for them using absolute pathnames. To do this, change the definitions of the variables `$GeomviewPath` and `$GeomRoot`, which are defined near the top of the file. Change `$GeomviewPath` to the absolute pathname of the `geomview` shell script on your system. Change `$GeomRoot` to the absolute pathname of the `$GEOMROOT` directory on your system. If you do this, you should also make sure there are copies of `geomview`, `math2oogl`, and `oogl2ri`b in the `$GEOMROOT/bin/<CPU>`.

3. The `geomview` shell script, which `OOGL.m` uses to invoke Geomview, needs to be able to find the geomview executable file ( called `gvx`). The Geomview installation procedure should have been taken care of this, but if your Mathematica session doesn't seem to be able to invoke Geomview, it's worth double-checking that the settings in the `geomview` script are correct.