Below are step-by-step instructions for installing OBVIUS on a Sun
workstations Lucid (Sun) Common Lisp 4.0, with CLOS and LispView.
Currently, OBVIUS runs comfortably on Suns with 8bit frame buffers
(color or gray-scale monitors), or monochrome (1bit) frame buffers.

REQUIREMENTS
------------

You need a fairly large swap space (virtual memory, paging area) in
order to use OBVIUS to its fullest potential (we generally allot 50
Megabytes or more).  20 Megabytes is a bare minimum to get OBVIUS to
load; this amount of swap space will not allow you to do very much in
the way of image processing as the image storage space restrictions
will be overly stringent.

If you are accustomed to working with Lisp, these requirements will
not be very remarkable.  If they do seem somewhat voracious, remember
that if you do image processing with individual binary programs and
shell scripts, as many people do, you will end up storing all of your
results as files on the disk and may soon frequently require easily
this much storage space for your intermediate, temporary results.

The OBVIUS directory, which contains Lisp and C source and binary files
and documentation, occupies around 4Mb of disk space.  The complete
lisp image (including Lucid 4.0, CLOS, LispView, OBVIUS) will occupy
at least 15Mb, so you should have that much disk space to devote to
OBVIUS.

In order to make use of the user interface features, you should also
have GNU emacs. You can obtain GNU emacs via anonymous ftp from
prep.ai.mit.edu.

OBVIUS 2.1 runs under the X window system.  X was developed at MIT and
there are public domain servers available for a number of different
architectures.  You can ftp a copy of X from expo.lcs.mit.edu.  Or,
you can get Openwindows (available from Sun), that includes both the X
and News window systems.

You also need LispView, an object-oriented lisp-interface to X.
LispView is available from Sun Microsystems with Sun (Lucid) Common
Lisp, version 4.0.

INSTALLATION INSTRUCTIONS
-------------------------

The symbol <obv> will be used throughout this document to
indicate the pathname of the primary OBVIUS source directory.

1) Decide where the OBVIUS source directory tree (approx. 3-5 Mbytes)
will live in your filesystem.  We will refer to this directory as
<obv>.  On our machines, this is /usr/local/obvius. Also decide where
the OBVIUS executable binary file (the lisp image, approximately 15
Mbytes) will live. We'll refer to this directory as <bin-path>.  On
our system, this is /usr/local/bin.  Make sure that this directory is
in each OBVIUS user's PATH environment variable.

2) Extract the OBVIUS directory tree from the tape or from the
compressed tarfile (you have probably already done this!):

	a) TAPE:
	- "mkdir <obv>"
	- "cd <obv>/.."
	- Insert the tape and wait for the whirring to stop.
	- "tar xvf /dev/nrst8"

	b) Compressed tarfile (via anonymous ftp):
	- "mkdir <obv>"
	- "cd <obv>/.."
	- Put compressed tarfile (we assume obvius.tar.Z) in .
	- "uncompress obvius.tar.Z"
	- "tar xvf obvius.tar"

The distribution contains several source subdirectories (lisp-source,
c-source and emacs-source), a documentation subdirectory (doc), and a
set of top-level files (README, INSTALL, lucid-defsys.lisp, etc).  You
may move the individual source subdirectories anywhere in your file
system.  Also, decide where you want your Lisp and C binaries to live
(see next instruction).

3) In the directory <obv>/c-source, there are several makefiles:
sun-makefile (for sun 3's), sun4-makefile (for sun 4's), and
hp-makefile, for Hewlett Packards running HP-UX.  Edit these makefiles
to refer to the appropriate binary pathnames.  The default is for the
binaries to go in subdirectories sun4-bin, sun-bin, and hp-bin of the
<obv> directory.  Also edit the {\tt INCLUDES} line in these
makefiles to refer to the appropriate pathnames for the Xlib.h and X.h
include files.  Create the necessary binary directories using mkdir.

4) In file <obv>/site-paths.lisp, edit the definitions for
*obvius-directory-path*, *lisp-source-path*, *c-source-path*,
*binary-path*.  Usually these will be "<obv>/", "<obv>/lisp-source/",
"<obv>/c-source/", and the appropriate binary subdirectory for the given
machine (must be consistent with the directory chosen in the previous
item).  Also, edit the defvars for *lucid-path*, and for
*obvius-image-path*.

5) In file <obv>/site-paths.lisp, edit the defvars for
*temp-ps-directory* (usually "/tmp/"), *default-printer* (pick one of
your postscript printers), and *print-command-string* (this probably
does not need to be changed on most Unix systems).

6) Edit the file <obv>/site-init.lisp.  This file should
load any optional modules that you want to be part of the basic OBVIUS
lisp image at your site.  The list of modules appears in the
lucid-defsys.lisp file.

7) Start up a lisp world that includes CLOS and LispView.  To compile
and load OBVIUS, type (load "<obv>/lucid-defsys") and then type
(obvius::run-obvius).  This takes a while.  Note that if you do not
have a lot of swap space, lisp may die during the compilation.  Do not
worry.  Just quit the lisp and start again.  It will load the files
that have already been compiled and then compile the rest of them.

8) Save an OBVIUS lisp image:

 	a) You should have already compiled all of the OBVIUS source
	(see previous instruction), and tested to see that it works
	(try some of the commands from the tutorial section).

	b) Start up a lisp world that includes CLOS and LispView.

	c) Type (load "<obv>/lucid-defsys") and then type
	(obvius::make-obvius).  WARNING: We have found that attempting
	a disksave over an NFS connection sometimes fails.  If
	your OBVIUS image does not work correctly, then try making it
	from your file server.

9) OBVIUS will run without Gnu Emacs, but there are many advantages to
running with it.  If you will be using emacs, you will need to install the
emacs extensions which are included in the tarfile in the emacs-source
subdirectory.  Copy the directory of emacs-extensions whereever you
like in your filesystem.  If you prefer, you can put them in with your
standard distribution.  On our machines, this is
"<obv>/emacs-source".  We will refer to this directory as
<emacs-extensions>.  Add the following lines to each user's
.emacs file:

	(setq load-path (cons <emacs-extensions> load-path))
	(setq *obvius-program* <obvius-image>)
	(autoload 'run-obvius  "cl-obvius" "" t)

The symbol <obvius-image> should be the pathname for the lisp
image containing OBVIUS.  To start OBVIUS from a saved OBVIUS lisp
image, run emacs and type "M-x run-obvius".  Documentation for the
cl-shell environment is in the file <emacs-extensions>/cl-shell.doc.


10) If you want to use the same emacs environment for running Common Lisp,
you may want to put the following lines in your .emacs file as well:

	(setq *cl-program* <lisp-image>)
	(autoload 'run-cl "cl-shell" "" t)

where <lisp-image> refers to the pathname for a lisp-image.  On
our machines, this is in "/usr/local/bin/Lucid-4.0".  To start up Common
Lisp inside emacs, type "M-x run-cl".  Documentation for the
cl-shell environment is in the file <emacs-extensions>/cl-shell.doc.
