This file is part of the pdr/pdx project.
Copyright (C) 2010 Torsten Mueller, Bern, Switzerland

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.



INSTALL - pdr/pdx
=================
pdr and pdx are distributed as source code. This means you have to
compile.


Requirements
------------
pdr and pdx depend on the following:

- a C++ compiler like g++ 4.4.2 or later with it's standard C++
  template library

- a make utility like GNU make 3.81

- the boost C++ library 1.42

- the POCO ("portable components") C++ framework 1.36 or later
  (for database access, POP3 access, XML parser, charset
  transformations and more)

- the libboard C++ library 0.8.8
  (for SVG graphics)

The versions given here are those the applications have been
developped and tested with. You can try other versions before you
install anything else. boost 1.39 and POCO 1.35 will probably also
fit.

POCO allows to download two different packages, the Economy and the
Complete Edition. I suggest to download the Complete Edition. So you
will truely have all you need. You could omit some modules like
Data/ODBC, Crypto, Zip, NetSSL and all the samples and testing stuff.

libboard can cause errors on some compilers because of a missing
header for sprintf(). In this case you will have to add <cstdio>
manually in one or two of it's source files, then it will compile
completely.

You do not need to install SQLite itself for pdr/pdx but it could be
very handy for viewing or manipulating data in the case of input
errors. I recommend this.


Compilation
-----------
The build process is configured in Makefile. There are no other steps
to be done before, especially there's no configure script.

First, take a look into Makefile, especially on the paths you can see.
Change them if you need others. The perform the following two steps:

1) set up the Makefile

The Makefile contains at it's beginning some defines to control
several aspects of building the applications, especially the use of
database engines. Set these defines according to your needs. If you
want to use SQLite as database engine define USE_SQLITE. Otherwise if
you want to use a MySQL server define USE_MYSQL. You can define both
to build executables capable for both engines. But you truely cannot
build without any database. If you want to omit an engine just don't
define the symbol (place a "#" before the line).

You can also define the DEBUG symbol to create binaries for debug
purposes. These binaries are much bigger because they contain symbol
informations generated by the compiler to be used later by gdb. They
are indeed much slower, too. Don't call "make install" having built
such binaries.

If you want to install the applications using "make install" check the
installation path. Default is /usr/local.

2) make clean

Normally this just cleans up temporary files. But make clean has
another task here, too: it creates a small header containing the
actual date and a signature containing some informations about your
system. This header is needed for compilation. So the first step is
make clean, otherwise you can't compile completely.

3) make

This builds the binaries, pdr and pdx. The first issue is to create a
private library containing some common used stuff. This lib is linked
in a static way to both applications and will not be installed on the
system.

4) make install

This copies pdr and pdx to the installation directory and sets some
access rights. That's all.


Further steps
-------------
To work with pdr and pdx some further steps are needed:

0) read the manual

Read it.

1) create a local directory, this directory should contain
   - a sub-directory for your report templates
   - a sub-directory for your generated output files

2) create your personal database

3) create an initial local configuration file named ~/.pdrx

4) use pdr to add the data collections you need to the database

5) develop your local report templates

Refer to the manual for detailed information about all these things.
