
Compiling monotone-viz from sources
===================================

* OCaml 
Monotone-viz is written in Objective caml, so you'll need the ocaml
compilers [1]. They are binaries available, from the ocaml homepage or
from other vendors (e.g. Linux distributions). It is also easy to
compile from source, something like this should work:

 $ ./configure -prefix /opt/caml 
 $ make world.opt
 $ make install


* GTK+, libgnomecanvas & OpenSSL's libcrypto
You'll need the development packages of GTK+ 2.4 (or newer) and
libgnomecanvas. You'll also need OpenSSL's development package
(monotone-viz uses libcrypto).



* LablGTK
LablGTK is a GTK+ bindings for ocaml [2]. 
Tarballs distributions of monotone-viz include LablGTK so you don't have
to build & install it.

If you pulled monotone-viz from the monotone repository, you need a
compiled LablGTK. It is packaged for some Linux distributions, but
make sure you have a version more recent than 2.4.0. The latest
version is lablgtk2-20050701. 2.4.0 will *not* work. If you're
compiling LablGTK from source, make sure LablGTK is built with
libgnomecanvas support:

  $ ./configure --with-gnomecanvas
  $ make world
  $ make install


* Sqlite
Monotone-viz can either use the sqlite3 library that is statically
linked into the monotone executable, or a shared sqlite3 library. The
former is safer (monotone-viz runs the same code as monotone to access
the database) but you need to have a compiled monotone tree. The
shared library build is the default.

If you want to use the static sqlite3 library, create a link named
monotone to the monotone build tree and run configure:
  
  $ ln -s /path/to/monotone-tree monotone
  $ ./configure --with-shared-sqlite=no

* Monotone-viz
Compiling monotone-viz should now be as simple as:

  $ make
  $ make install


* Cleaning
The ocaml compiler statically links everything caml-related so
you can delete your ocaml installation if you wish:

  $ rm -Rf /opt/ocaml




[1] http://caml.inria.fr/ocaml/release.en.html
[2] http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
