----------------------------------------------
ECLiPSe - Constraint Logic Programming System
----------------------------------------------

-----------------------------------------------------------------------------
ECLiPSe on UNIX/Linux  (see README_WIN for Windows, README_MACOSX for MacOSX)
-----------------------------------------------------------------------------

***Please read INSTALL first if you are compiling from source. You do not
need the binary files described here.

Unpacking
---------

You should have downloaded the following files from eclipseclp.org,
sourceforge.net or a reputable mirror.
There are different versions of these files for different machine
architectures. These are tar-files compressed with gzip.

Base:
    README_UNIX			The file you are reading now
    eclipse_basic.tgz		Kernel and basic libraries
    eclipse_doc.tgz		Documentation (html,txt,man,pdf)

Optional - interfaces to free LP/MIP solvers:
    if_osiclpcbc.tgz            Interface to COIN-OR solvers CLP and CBC
    if_glpk*.tgz                Interface to the GLPK solver
    if_highs*.tgz               Interface to the HiGHS solver

Support:
    tcltk.tgz			A matching Tcl/Tk release (8.5)
    				(you may have that already).
				Needed for the tkeclipse development GUI.
    editors_eclipse_support.tgz Support for various editors for editing
                                ECLiPSe code.       

These other files are only needed under special circumstances:
    eclipse_rt.tgz		Runtime only (subset of eclipse_basic.tgz)
    if_xpress*.tgz		Interface to commercial XPRESS-MP solver
    if_cplex*.tgz		Interface to commercial CPLEX solver
    if_gurobi*.tgz		Interface to commercial Gurobi solver


Make a directory for ECLiPSe on your machine (in the following
we will write this directory as <eclipsedir>) and move the
distribution files there.

Uncompress and untar the files in this directory using tar, e.g.

    % tar xpfz eclipse_basic.tgz

or, if your version of tar doesn't support the z option, use

    % gunzip -c eclipse_basic.tgz | tar xpf -

Do the same for all the .tgz files you have downloaded.

This will create the ECLiPSe directory structure below the
current directory.

Note that you can always add optional components later without
having to repeat the installation process below.


Installation
------------

If you are installing from source, first compile ECLiPSe as described in
the file INSTALL (see also the file document/internal/SetupGuide.doc for 
more detailed help). After compiling ECLiPSe, you can run the installation 
script as described below.

If you are installing from the binary packages, run the installation script:

    % ./RUNME

This will prompt you for the necessary information and create
the eclipse executables in <eclipsedir>/bin/<arch> (where <arch>
stands for one of the supported machine architectures).


To run ECLiPSe
--------------

Add <eclipsedir>/bin/<arch> to your PATH, e.g.

    % PATH=$PATH:/usr/local/eclipse/bin/sparc_sunos5		(sh/bash)
 or
    % setenv path ($path /usr/local/eclipse/bin/sparc_sunos5)	(csh)

It is normally not necessary to set any environment variables in order
to run eclipse. ECLiPSe is simply called from the command line as:

    % eclipse		(command-line interface)
or
    % tkeclipse		(GUI version, needs Tcl/Tk)

If you use the ECLiPSe embeddable library, your may have to set
$LD_LIBRARY_PATH to include <eclipsedir>/lib/<arch> to enable
the dynamic linker to find it.


Further notes on installation
-----------------------------

The ECLiPSe installation directory may be shared between machines
with different hardware/operating system architectures, e.g.
i386_linux and sparc_sunos5. To do so, just unpack the distributions
for the different architectures in the same installation directory.
All architecture-dependent files will go in separate subdirectories.

When you are doing the installation on a networked file system, it is
recommended that you specify to the installation script a pathname
under which the directory can be found on all the client machines. 
If there is no such unique pathname, then users will have to set the
environment variable ECLIPSEDIR according to where the directory can
be found on the machine they are on.


Documentation
-------------

The installation subdirectory <eclipsedir>/doc contains html,
txt and pdf versions of the user documentation.
To read the html documentation, set your browser to e.g.

    file:<eclipsedir>/doc/index.html


The printable documentation is contained in the files:

    tutorial.pdf	Tutorial

    userman.pdf		Basic user manual

    libman.pdf		Library user manual (constraints libraries)

    embedding.pdf	Interfacing and embedding manual

The Reference Manual (the detailed descriptions of the built-in
predicates and all the libraries) is available exclusively in html
format and via the help/1 predicate from within ECLiPSe.

Unix man pages are under

    <eclipsedir>/man


Installation hints for the 'eplex' library
----------------------------------------------

The ECLiPSe 'eplex' library is an interface to an external LP/MIP solver,
which can be either an open-source COIN-OR solver (www.coin-or.org), or a
commercial Xpress-MP, CPLEX or Gurobi solver.

For the COIN-OR solvers, you do not need a licence to use them. For 
Xpress-MP or CPLEX, you need to own a separate Xpress-MP or CPLEX licence
to use the 'eplex' library with the corresponding solver. In this case, you
need to download a version of 'eplex' that matches the version of the
Xpress-MP licence that you have (although it may be possible to
run an older version with a newer licence). For example, for Xpress-MP X.Y,
you need the package if_xpressXY.tgz. You can install a mix of different
versions by just unpacking multiple packages.

Note that we no longer distribute the CPLEX solver for eplex in binary 
form, as the CPLEX library is statically linked. You need to compile 
ECLiPSe from source if you want to use CPLEX with the `eplex' library.

To tell ECLiPSe which licence you have on which machine, add the
necessary lines to the text file <eclipsedir>/lib/eplex_lic_info.ecl,
according to the instructions provided there.  With this setup, you
can load the eplex library from ECLiPSe by just invoking lib(eplex),
and you will get the correct version for each machine.

Academic licences for CPLEX are available from ILOG at
    http://www.ilog.com/partners/academic/license.cfm
Academic licences for XPRESS-MP are available from Dash Optimization at
    http://www.dashoptimization.com/home/users/app.html


Installation hints for the 'dbi' library
-----------------------------------------

The ECLiPSe 'dbi' library is an interface to an external
database. Currently the MySQL database is supported. Because of licensing
issues, we do not include the MySQL dynamic library (libmysqlclient.so) in
our binary distributions. You will need to obtain these libraries from
MySQL AB:

    http://dev.mysql.com/downloads

When 'dbi' is loaded (for example by lib(dbi)), it will need to find
and load this MySQL dynamic library. If it is in one of the standard system
library paths (such as /usr/lib), then the library can be loaded without
further action. Otherwise, you can either:

 1) Add the pathname of where your libmysqlclient.so is to your shell's
 LD_LIBRARY_PATH environment variable, e.g. if the library is located in
 '/my/mysql/lib', and you are using bash shell:

    export LD_LIBRARY_PATH=/my/mysql/lib:$LD_LIBRARY_PATH
or:
 2) Copy libmysqlclient.so* files to where your ECLiPSe dynamic libraries
 are, i.e. <eclipsedir>/lib/<arch>. Remember that libmysqlclient.so may
 just be a pointer to the real version specific library
 (e.g. libmysqlclient.so.15.0.0).

You need to be able to connect to a running MySQL server in order to use
the library. This can be on your local machine, or on a remote machine
reachable from your network.


Graphics
--------

The Embedding Interface and the TkEclipse Development Environment require
Tcl/Tk version 8.3 or later.  If this is already installed on your machine
(normally the case on Linux), you can use your existing installation by
giving the version and the location of the corresponding library
directories (e.g. /usr/lib) to the RUNME install program.

Alternatively, you can use the tcltk.tgz package which comes with the
ECLiPSe distribution. This goes into the tcltk subdirectory of the
ECLiPSe installation. To make Tcl/Tk/scripts find the files, you
may have to add <eclipsedir>/tcltk/<arch>/bin to your PATH and
possibly add <eclipsedir>/tcltk/<arch>/lib to your $LD_LIBRARY_PATH.

Several visualisation features require Java. The recommended version
is at least 1.4, but versions from 1.2 upwards should still work.


Emacs ECLiPSe mode
------------------

If you use the GNU emacs editor, an ECLiPSe mode is now provided for it.
It is not part of the ECLiPSe distribution, and you need to download it
separately. **Version 20 (or later) of GNU emacs is required.** 
This mode is based on the prolog mode by Umeda, and provides extensive 
syntax colouring for ECLiPSe-specific features.  See http://www.gnu.org/ 
if you need more information on GNU and its software. 

In order to use this mode, add the following line to your .emacs file:

(autoload 'eclipse-mode "<eclipsedir>/lib_public/eclipse.el" "ECLIPSE editing mode" t)

where <eclipsedir> is the path to your ECLiPSe installation directory.

You may also need to add these lines so that the .pl and .ecl extensions
are recognised to be ECLiPSe programs:

(setq auto-mode-alist (cons '("\\.pl" . eclipse-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.ecl" . eclipse-mode) auto-mode-alist))

The eclipse.el file needs to be placed somewhere where your emacs can find
it.

See the start of the eclipse.el file for some instructions on using this mode.


----------------------------------------------
General Topics
----------------------------------------------

Contact Addresses
-----------------

News about ECLiPSe are available from the following sources

    http://www.eclipseclp.org

    http://www.sourceforge.net/projects/eclipse-clp

    comp.constraints    (via news server or e.g. groups.google.com)

Via http://www.eclipseclp.org/mailinglist.html you can subscribe to
one of the ECLiPSe mailing lists

    eclipse-clp-announce@lists.sf.net	(release announcements)
    eclipse-clp-users@lists.sf.net	(user discussion)

Problem and bug reports can be submitted via the web site

    http://www.eclipseclp.org/bugs.html

Please take the time to report problems. Your feedback helps us to
make ECLiPSe more reliable!


Directory structure
-------------------

Directories in the binary distribution:

	bin		executable files
	lib		supported libraries, object files
	lib_public	third party Prolog libraries
	include		include files for C/C++ interface
	doc		online documentation, pdf files and example code
	man		Unix-style man pages

	tcltk		a matching version of Tcl/Tk

