====================
Installing Rgraphviz
====================

Windows
=======

Nov 17, 2008

Here are the steps to build Rgraphviz on Windows:

o. install graphviz ***2.20.3*** Windows ***binary*** distribution from

      http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.20.3.msi

   in a directory that we'll call $DIR.  We use the following as an example:

         C:\Graphviz-2.21
   
   If you install it in other dir, just use your dir correspondingly.

o. set the following Windows environment variables accordingly
   (control panel -> systems -> Advanced -> Environment Variables ):
   (a) create new user variables:
     GRAPHVIZ_INSTALL_DIR   (e.g., C:\Graphviz-2.21)
     GRAPHVIZ_INSTALL_MAJOR (e.g., 2)
     GRAPHVIZ_INSTALL_MINOR (e.g., 20)

     Notice the way "\/" are used for the paths above.

   (b) add to user variable 'path': $GRAPHVIZ_INSTALL_DIR/bin
     e.g., C:\Graphviz-2.21\bin

o. run "R CMD INSTALL Rgraphviz" or "biocLite("Rgraphviz")' as usual

OSX installation
================
according to Eric Wexler (ewexler@ucla.edu):

FYI: Rgraphviz will not load (at least under leopard) unless the user  
has the developer Xcode tools installed.  It was very frustrating  
untill I figured this out.  PLease pass it on in the Rgraphviz install  
under OSX instructions

Source based installation
=========================

The Rgraphviz package depends on the Graphviz library which can be
obtained from http://www.graphviz.org/.

At present, Rgraphviz is known to work with Graphviz versions greater
than or equal to 2.2 (note however that a bug in the neato layout
routine makes it preferable not to use versions 2.4, 2.6 and 2.8)

To install Graphviz:

 1. Download the source tarball from http://www.graphviz.org/
 2. Unpack the distribution (tar -xzvf)
 3. Read the Graphviz installation instructions.  Basically, you
    should be able to do:

      ./configure
      make
      make install

A word of warning, especially on the Mac OS X platform: Rgraphviz may
not work if Graphviz is compiled with optimization.

For the most recent version of Graphviz, you will also need to make
sure that pkg-config (http://pkgconfig.freedesktop.org/wiki/) is
installed on your system.  If you install Graphviz to a non-standard
location, you may need to set the PKG_CONFIG_PATH environment variable
to tell pkg-config where the Graphviz metadata lives.  Here is an example:

    export PKG_CONFIG_PATH=/home/me/graphviz/lib/pkgconfig

At this point you should be able to install Rgraphviz either via R CMD
INSTALL or by starting R and using install.packages.

Note that older versions of Graphviz use a configure script called
dotneato-config which must be in your PATH for Rgraphviz to find it.
This is instead of the pkg-config setup.
