BEFORE WE START, SOME QUICK NOTES:

A. These instructions are incomplete. As soon as you report a problem,
I'll add the way to solve it.

B. Futher down there are special notes for Mandrake, Fedora and
Debian. Read this document to the end.

C. Currently you must edit the Makefile to compile segusoLand. I don't
know autoconf, it is just too vast for me. If some guru wants to help
me writing an autoconf file, I'd appreciate that.

======================

REQUIREMENTS:

1) BOOST library

In order to compile you need the boost library (a very useful C++
library containing a smart pointer implementation).



Download it from www.boost.org, and unpack it where you want. For
example, put it in /home/gesucristo/boost-1.3.3.

Inside the dir boost-1.3.3 there should be another dir called simply
"boost". This is fine.

IMPORTANT: YOU DON'T NEED TO COMPILE BOOST! JUST EXTRACT THE ARCHIVE! :-)
(Actually, all is needed is boost/shared_ptr.hpp)

Now edit the makefile (src/Makefile) in order to tell the compiler
where the boost library is.: locate the 

-I/dat/pub/src/not-mau/boost-1.30.2

And change it to 

-I/home/gesucristo/boost-1.3.3

or whatever you chose earlier.


2) SWI-prolog

  2.1) Now you must install swi-prolog. Download it from the
       SWI-prolog web site and install it (I used the rpm version).

        In the Makefile, replace the string

        -L/usr/lib/pl-5.2.11/runtime/i686-linux

        with the path that contains the file libplmt.a

   2.2) In the Makefile, replace the string 

       -I/usr/lib/pl-5.2.11/include/
          
        with the dir that contains the file SWI-Prolog.h


DEBIAN USERS BEWARE: the current debian version of swi-prolog (5.2.7)
does not work. You get an error message "insufficient
resources". Nonetheless, Henrik Brink has succeeded using segusoLand
with debian, by installing the rpm at SWI-prolog site, converting it
to deb with alien.


3) You also need to install the following libraries: gtkmm, gtk,
   pthread, ncurses, glibc. And the program pkg-config. All should
   come with your linux distribution.

BEWARE FEDORA USERS: currently (21 dec 2003) glibc is broken in
fedora; this prevents segusoLand to compile.


====

In case you have Mandrake 9.2, like me, I can tell you the packages I
have installed

libgtkmm2.0_1-2.2.8-1mdk
libgtkmm2.0_1-devel-2.2.8-1mdk
libsigc++1.2_5-devel-1.2.5-5mdk
libsigc++1.2_5-1.2.5-5mdk
gtk+2.0-2.2.4-2mdk
libncurses5-devel-5.3-1.20030215.3mdk
pl-5.2.11-128
libgtk+2.0_0-devel-2.2.4-2mdk
libgtk+2.0_0-2.2.4-2mdk
glibc_lsb
libc-base

(some of these package are found in contrib, i.e. are not on the 3-set cds)

I think these should be enough, but I am not sure. Please help me with
your feedback.


======

Now you are ready to compile. Enter the src/ directory and type

  make

The program should compile file.

You will find a file called segusoLand.exe. 

You don't need to "make install" or such useless things :-) Just
execute the program with

./segusoLand.exe

and segusoLand should start.

The first time it starts, you will see many messages about files
discarded. This is because the database contains my files, and
segusoLand does not find them on your disk. It is normal.

Ask me if you have problems.

==============================

CREATING A PRECOMPILED PACKAGE

By default, segusoLand.exe looks for the img/ directory and the
segusoLand.pl file in the same dir as the executable. If you are
creating a precompiled package (RPM, DEB...), you will probably want
to deploy those files in different dirs.

At compile time, you can tell segusoLand where the segusoLand.pl file
and the img/ directory are located. You can do this via the two -D
flags: IMAGEDIR and LIBDIR. 


For example:

1)
  g++   -DIMAGEDIR=\"/usr/share/data/segusoLand/\" 

means that the filesystem contains

   /usr/share/data/segusoLand/img/

2)

   g++  -DLIBDIR=\"/usr/lib/segusoLand\"

means that the filesystem contains

   /usr/lib/segusoLand/segusoLand.pl


====


Maurizio
