Now, only one single make command is needed to create the executables. It is, however, still necessary to choose which Makefile to use, and possibly to edit the Makefile. This is because some output modes require external software. However, the basic implementation of MolScript (with the PostScript, Raster3D and VRML 2.0 output modes) needs no external software, and is straightforward to compile.
This description assumes that you have a UNIX computer system. The installation procedure has been tested (so far) only on an SGI IRIX 6.3 system, but should work on other UNIX systems as well.
Information on other computer systems is currently not available, but it shouldn't be too difficult to install MolScript if you know how to compile programs on your computer system. If you port MolScript to another system, you would help others by sending a description of your porting procedure to per.kraulis@gmail.com. The description will be incorporated into this documentation.
Before unpacking the current distribution, move your previous MolScript distribution (if you have one) to some safe location. This applies to the molscript directory, as well as the previous molscript and molauto executable files.
% gunzip molscript.tar.gz
or
% uncompress molscript.tar.Z
This produces a molscript.tar file. This file should
be moved to the directory where you wish to have the
molscript source directory located. For example, the
/usr/local directory is often used for software of
this kind. You probably need root privileges (or the
equivalent) to write anything in the /usr/local
directory.
% mv molscript.tar /usr/local
% cd /usr/local
Then use the tar program to unpack the distribution:
% tar xvof molscript.tar
This creates the molscript directory and its
subdirectories.
The complete implementation of MolScript requires some additional external software and system libraries. You must fetch and install these libraries yourself.
It is possible to compile partial implementations, if only some of the external software libraries are available. For instance, it is possible to compile MolScript to produce GIF image files, without having the PNG image file capability.
Note: Although GNU's bison program is needed to convert the molscript.y file into C source code, it is not necessary for compiling the programs; the C source code files are included in the distribution.
Output mode | Required system libraries | Required external software |
PostScript | none | none |
Raster3D | none | none |
VRML 2.0 | none | none |
Interactive OpenGL | OpenGL (or Mesa) | GLUT library |
SGI (aka RGB) image file |
OpenGL
(or Mesa) and
X windows (implies UNIX) |
GLUT library |
Encapsulated PostScript
(EPS) image file |
OpenGL
(or Mesa) and
X windows (implies UNIX) |
GLUT library |
JPEG image file |
OpenGL
(or Mesa) and
X windows (implies UNIX) |
GLUT library and
JPEG library |
PNG image file |
OpenGL
(or Mesa) and
X windows (implies UNIX) |
GLUT library and
PNG and zlib libraries |
GIF image file |
OpenGL
(or Mesa) and
X windows (implies UNIX) |
GLUT library and
gd 1.3 library |
Several external libraries are required for the complete implementation; see the table above. You must make sure that the various symbols in the Makefile.complete file are set correctly. If you do not wish to include a certain image file format implementation, then you must comment out all symbol definitions in the Makefile.complete which relate to that format.
You must choose which of these Makefiles to
use. You can either make a symbolic link to the
appropriate Makefile variant (the basic one in this
example):
or you can make a proper copy of the chosen
% ln -s Makefile.basic Makefile
Makefile
variant:
% cp Makefile.basic Makefile
The Makefiles contain various symbols which may need to be modified for your system. For instance, the location of the external libraries must be defined, and the optimization flags for the C compiler you are using must be set correctly.
Note that for the SGI IRIX cc compiler, it is necessary to choose the type of object file by specifying one of the following flags: -32, -64 or -n32. It is not possible to mix object files compiled using different flags. The external libraries (if used) must also have been compiled with the same flag.
Go to the molscript directory and give the following
command:
This will compile the source code in the molscript
and molscript/clib directories, and link together the
molscript and molauto executable
files in the molscript directory.
% cd /usr/local/molscript
% make
The clib.a object code archive is compiled automatically by this command, in contrast to the previous v2.0 distribution, where this was a separate command. Indeed, it is not possible to use the Makefile in the molscript/clib directory on its own: it must be called indirectly from the Makefile in the main molscript directory.
You may wish to copy the executables to an appropriate directory on
your system (such as /usr/local/bin):
or make links from that directory to the executables:
% cp molscript molauto /usr/local/bin
You and any other users need to have this directory in their
path if the executable is to be invoked simply by giving the program
name as a command. Check that the PATH environment
variable contains the /usr/local/bin value:
% cd /usr/local/bin
% ln -s /usr/local/molscript/molscript molscript
% ln -s /usr/local/molscript/molauto molauto
% echo $PATH
If the complete implementation has been compiled (all output modes
present), then give the command:
This will run MolScript and any other programs to create the example
files referred to in the documentation.
% make complete
If the basic implementation has been compiled, then give the command:
This will create only the
PostScript,
Raster3D and
VRML 2.0 files.
% make basic