ROX-CLib
========

A library for ROX applications written in C.

This is version 2.0, for use with GTK+ 2.x.

Installation - for users
------------

Copy to a suitable place such as ~/lib or make sure it is on 
your $LIBDIRPATH.  It must be called ROX-CLib, otherwise other 
programs can't find it.

Compile using ROX-CLib/AppRun --compile or running ROX-CLib from the filer.

You will need GTK+ 2.x, libxml 2.4.x and GNU make.  Linux users should 
already have GNU make installed /usr/bin.  Other OS's may require you
use a different directory (/usr/bin/local) or program name (gmake).
Set the environment variable MAKE to the correct value before
compiling, e.g.

$ MAKE=gmake ROX-CLib/AppRun --compile

Compiling and linking against the library - for programmers
-----------------------------------------

Compile the library first

Copy the libdir script from ROX-CLib/$PLATFORM/bin/libdir into your app dir.

Add the output of
   `libdir ROX-CLib` --cflags
to your compile line, e.g.
   ROX_CLIB="`$APP_DIR/libdir ROX-CLib`/AppRun"
   gcc `$ROX_CLIB --cflags` -c main.c 

Add the output of
   `libdir ROX-CLib` --cflags
   `libdir ROX-CLib` --libs
to your link line, e.g.
   ROX_CLIB="`$APP_DIR/libdir ROX-CLib`/AppRun"
   gcc `$ROX_CLIB --cflags` -o main main.o `$ROX_CLIB --libs`

If you are using autoconf and building a ROX program then:
    * In src/configure.in add:

   ROX_CLIB(2, 0, 0)

    * Copy ROX-CLib/Help/rox-clib.m4 to your programs src directory then
      execute:
         aclocal -I .

    * In src/Makefile.in add:

   ROX_CLIB = "@ROX_CLIB_PATH@/AppRun"

      and to CFLAGS add: 
   `${ROX_CLIB} --cflags` 
      and to LDFLAGS add: 
   `${ROX_CLIB} --libs`

    * In AppRun (and AppletRun if it is an applet) ensure you have:

   APP_DIR=`dirname $0`
   APP_DIR=`cd $APP_DIR;pwd`; export APP_DIR
   ROX_CLIB=`"$APP_DIR/libdir" ROX-CLib`/AppRun
   if [ -z "$LD_LIBRARY_PATH" ]; then
       LD_LIBRARY_PATH=`"$ROX_CLIB" --runtime`
   else
       LD_LIBRARY_PATH=`"$ROX_CLIB" --runtime`:$LD_LIBRARY_PATH
   fi
   export LD_LIBRARY_PATH

Note that as of version 2.1.2 the only supported way of including files is
  #include <rox/rox.h>
  /* etc... */

To update your programs, change all occurances of
  #include "file.h"
to:
  #include <rox/file.h>

Zero Install
------------
To use ROX-CLib through Zero Install change the use of libdir to:
    ROX_CLIB="`$APP_DIR/libdir --0install www.kerofin.demon.co.uk ROX-CLib`/AppRun"


Brief listing of functions
--------------------------

See ROX-CLib/Help/rox-clib.html
