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. But you
will not have to compile all components. Indeed this could be
difficult if you don't have other needed components like MySQL or ODBC
installed. What we strictly need from POCO are the Foundation, Util,
Net, Data/SQLite and Tools & Utilities components. You must compile
them successfully. You can omit Data/MySQL and 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) 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.

2) 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.

You can call

   make clean

at any time. This removes all temporary stuff and the binaries, too.

To create binaries for debugging call

  make DEBUG=1

These binaries are much bigger because they contain symbol
informations generated by the compiler to be used by gdb. The are
indeed much slower, too. Don't call make install having built such
binaries.

Installation
------------
The installation is assumed to take place into /usr/local/bin. Type

   make install

to copy pdr and pdx to this location. 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
   - your personal database

2) create your personal database and add the data collections you need

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

4) develop your local report templates

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