
THIS IS NOT THE GENERIC GNU INSTALL FILE.

Installation instructions for Maitreya
======================================

Here you can get some hints for successful compilation.

Table of Contents
-----------------

1. Quick Start for the impatient reader (Unix)
2. Installation on UNIX-like systems
3. Installation on Win32 systems
4. Installation on Mac systems


1. Quick Start for the impatient reader (Unix)
==============================================

Type
 ./configure

to execute the configure script. You must have installed wxWindows 2.6 or
higher (including the headers, see http://www.wxWindows.org).
wxWindows 2.4 and 2.5 do _NOT_ compile anymore.

Type
 make            (hope that everything's going right)
 su              (enter your root password)
 make install    

You may start the Application using the command

 /usr/local/bin/maitreya  

or just

maitreya

(there should be a symbolic link to the place where the program resides)

If you don't want to run 'make install' (or you don't have the permission),
change your current directory to "gui" and start the program, i.e.

  cd gui
  ./maitreya

 - End of Quick Start.


2. Installation on UNIX-like systems (comprehensive)
=====================================================

The distribution is based on automake, so the traditional configure/make
should be sufficient on most systems.

The compilation should work on most UNIX or Linux Systems. The program is
known to compile on systems like Redhat Linux, Debian, SuSE and FreeBSD. 

Prerequisites
-------------

You need wxWindows. There are ready-to-install packages for many Linux systems
or FreeBSD. Don't forget to install the headers which can be located in a package
like "wx-headers" (Debian). Other systems like SuSE of FreeBSD have the headers
included in the standard distribution of wxWindows.

If you cant't find any *.rpm's or *.deb's for your operating system, compile
the source code. You need wxGTK >= 2.6.
The compilation is straight forward (configure+make+make install).

configure
---------

Default installation directory is /usr/local/maitreya.

If you want to change this type

 ./configure --prefix=xyz

where xyz could be something like '/usr' or '/opt'. All will be installed then
under /usr/maitreya or /opt/maitreya etc.

ALL the data are installed  under $(prefix)/maitreya.
So there's nothing under /usr/local/share/icons, etc. Only a link from
/usr/local/bin/maitreya to the main binary will be created.
prefix is /opt).

The wx-config script is essential for the platform dependend compiler switches.
configure must find it, otherwise there's no chance to compile the program
well. wx-config is searched in various standard directories. If configure
doesn't find your wx-config, start configure with the option

 --with-wx-config-dir=xyz

The executable (gui/maitreya) will be quite big. You can strip if you don't
want debugging informations (strip gui/maitreya).

- End of *nix notes

3. Installation on Win32 systems
================================

The compilation under Win32 is more complicated. 

This manual only describes the installation process with Cygwin.

First step: install MingW

Second step: Installation of wxWindows
--------------------------------------

Get the source code for wxWindows from wxWindows.org. You can fetch either the
windows packages (like wx-msw) or the wxAll package. Unpack the source code
and read the documentation under doc/msw.

Go to the the root directory of the wxWindows source code distribution.

Type
 ./configure --disable-shared --enable-unicode
 make
 make install

You can also leave the option --disable-shared. You will then get a shared
library of wxWindows. The release will be bigger then.

If everything goes well, you'll have a ready-to-use wxWindows installation.

You can test your installation by compiling one of the samples (e.g. samples
minimal). Just go to the directory, type
 make 
and start the example.


Third step: Installation of Maitreya
------------------------------------
Create a directory for the source code tree, e.g. c:\maitreya. Enter this
directory.

Unpack the source code archive either by
unzip <path>/maitreya-<version>.zip (zip file)

or tar jxvf <path>/maitreya-<version>.tar.bz2 (bzip2 file)

Type
 make -f Makefile.win

Hope that everything's going right.

The executable (gui/maitreya.exe) will be quite big. You can strip if you
don't want debugging informations (strip gui/maitreya.exe).

Important
----------
You need mingw DLL to start the program. So you must either start
the program from the mingw shell or you must provide these files (mingw*.dll).

These files are located n the msys or mingw directory. It's okay to copy them to the
place where the executable or Maitreya is located. Probably you can 
also copy them to the windows directory, try it.

- End of Windows notes

4. Installation on Mac systems
==============================

Should be no problem, but someone must do this.

Currently the program compiles but the GUI is not okay (i.e. event handling is damaged).
Contribution of Mac users is welcome!

- End of Mac notes


