Readme file of CBAR
A CGUI and Allegro addon for serial port communication
by Christer Sandberg
Email: christer.sandberg@mdh.se
Homepage: http://www.idt.mdh.se/~csg/cgui/cguix
Readme file of CBAR
CBAR is a library with functions that let you communicate with a bar code reader
in a simple way. It uses CGUI for dialogs and CCOM for serial communication.
CBAR builds and operates on the following platforms: DOS/DJGPP, Linux,
Windows/Mingw32 and Windows/MSVC.
You need to have compiled and installed
Allegro version 4.0.x
CGUI version 1.6.7 or later
CCOM version 0.9.3 or later
There are also other requirements like correctly installed compilers etc.
but these are already fulfilled if you succeded in making and installing
Allegro and CGUI (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/
You can find CCOM at:
http://www.mdh.se/~csg/cgui/cguix
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 cbar to you current directory
i.e. enter the command
cd c:\cbar
or whatever is the name of your cbar 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 CBAR 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
or for unix users:
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 cbar, e.g.:
cd c:\cbar
-
Compile the library. This is done by running "make" at the command line.
-
Install the CBAR 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 CBAR 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 CBAR 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 CBAR documentation with the Rhide online help
system, go to the "Help / Syntax help / Files to search" menu in Rhide,
and add "cbar" after the existing "libc" entry (separated by a space).
-
To link your application with the debugging lib, link with -lcbard
instead of -lcbar.
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: