Readme for CPRI
A CGUI and Allegro addon for for formatted printing
by Christer Sandberg and Rasmus Myklebust
Email: christer.sandberg@mdh.se
Homepage: http://www.idt.mdh.se/~csg/cgui/cguix
The readme file of CPRI
CPRI is a library with functions for pretty printing of tables or table-like
printouts. It also provides a dialogue that lets the user modify the printer
settings, and one for administration of the printer queues for the DJGPP
platform. CPRI depends on some features in the lib CGUI.
CPRI compiles on the following platforms: DOS/DJGPP, Linux,
Windows/Mingw32 and Windows/MSVC.
The current version have full functionality only on the DJGPP and Windows
platforms, there is only a stub present for the Linux platform.
You need to have compiled and installed Allegro 4.0.x as well as CGUI 1.6.7 or later.
You have to set the environment variable ALLEGRO to point out your Allegro
installation and set CGUIDIR to point to your CGUI installation.
There are also other requirements like correctly installed compilers etc.
but these are already fulfilled if you succeded in making Allegro (no
additional requirements are needed).
You can find Allegro at:
http://alleg.sourceforge.net/
You can find CGUI at:
http://www.mdh.se/~csg/cgui/
Installation goes in some simple steps, and should be familiar since it is
similar to the installation procedure as of CGUI:
-
Tell the installation process what platform you use. Start a command window
(shell) and set the main directory of CPRI to you current directory
i.e. enter the command
cd c:\cpri
or whatever is the name of your CPRI directory. Then choose platform by
running one of the following commands:
fix.bat djgpp - to compile with DOS/DJGPP
fix.bat mingw32 - to compile with Windows/MinGW32
fix.bat msvc - to compile with Windows/MSVC
./fix.sh unix - to compile with Linux/gcc
-
Specify the path to your allegro installation by setting the environment
variable ALLEGRO. E.g. if your allegro directory is c:\allegro then
you must type
set ALLEGRO=c:\allegro
or alternatively put that line into your autoexec file and restart.
For unix users:
export ALLEGRO=/home/user/allegro-4.0.3
or whatever is the name of your allegro directory.
When CPRI is built some programs in the `tools' directory of Allegro will be
needed, so you have to install an Allegro version built from sources (or
alternatively obtain the required tools some other way, put them in a
directory named `tools' and let the variable ALLEGRO point out the directory
immediately above `tools').
-
Specify the path to your CGUI installation by setting the environment
CGUIDIR the same way as ALLEGRO, e.g.
set CGUIDIR=c:\cgui
export CGUIDIR=/home/user/cgui
-
Ensure that all CGUI's tools has been built:
Make CGUI's directory to the current, e.g. type the command
cd c:\cgui
Build:
make dat2c
make mktext
Return to the main directory of CPRI, e.g.:
cd c:\cpri
-
Compile the CPRI library. This is done by running "make" at the command line.
-
Install the CPRI files to common directories. This is done by running
"make install" at the command line.
Linux/Unix specifics:
You need to be root to succeed with the installation command i.e. type the
command
su -c "make install"
and enter the root password when prompted for.
Alternatively, if you cannot be root you may install CPRI to some other
location by running "make install SYSTEM_DIR=<dir>", which will cause
headers to be installed to <dir>/include and libraries to
<dir>/lib. Default for <dir> is /usr/local.
To be able to link your program to the CPRI files installed at some other
location than the default you need to specifiy the paths to your compiler
and linker.
That's it! Now you are ready to run the example program in the example directory.
You may also want to perform some of the optional steps during the installation:
-
You can compile a debugging library by typing "make DEBUGMODE=1" instead of
just "make" and "make install DEBUGMODE=1" instead of "make install".
To compile both the usual and the debug library in one step,
type "make all" and "make installall".
These debugging libraries require that you also have maked and installed
the debugging versions of Allegro and CGUI.
-
If you want statically linked libraries under Unix or Windows as well as
the default dynamically linked libraries (dll under Windows, .so under
Unix), add "STATICLINK=1" to the make command like "make STATICLINK=1",
or "make DEBUGMODE=1 STATICLINK=1" and also add it to the installation
command.
These static libraries require that you also have maked and installed
the static versions of Allegro and CGUI.
-
Users of the MSys environment needs to set the environment vaariable
UNIX_TOOLS to 1 before make install is run.
-
If you want to read the CPRI documentation with the Rhide online help
system, go to the "Help / Syntax help / Files to search" menu in Rhide,
and add "cpri" after the existing "libc" entry (separated by a space).
-
To link your application with the debugging lib, link with -lcprid
instead of -lcpri.
Users of the MSys environment needs to set the environment variable
UNIX_TOOLS to 1 before make install is run.
Email:
Homepage:
http://www.idt.mdh.se/~csg/cgui/cguix
Telephone: