Frames

# Building CamStream

### Requirements

- The Qt library (version >= 2.2.2)
- (optional) libjpeg and libpng

The Qt library can be downloaded from http://www.trolltech.com/ and several mirrors. Any version of 2.2.2 or higher will do.

If you are using KDE you already have Qt installed.

To save images in JPG and/or PNG format, you need the apropriate libraries and Qt must be built with JPEG/PNG support. The configuration script will detect if this is the case (otherwise, see below: Rebuilding Qt). If this is not the case, images can only be saved in (bulky) BMP or PBM format.

Documentation of the API is generated with Doxygen, but you should rarely need to regenerate the documentation.

### Configuration

There is a configure script available, that should make life easier for you (and me!). For those of you who are not familiair with building and compiling programs, here are step by step instructions. You should type in the greenish coloured commands as they appear below (but of course replace the version number):

- Download the package; you may need to use <Shift>-button1 or right-click to download the .tar.gz file properly with Netscape;
- Uncompress with: gunzip camstream-version.tar.gz
- Extract package: tar -xvf camstream-version.tar
- Go into the directory: cd camstream-version
- Run ./configure; you will see bunch of messages scrolling by about your system configuration;
- If that goes well, type make; compilation will now start (this may take a while)
- If make completes succesfully, type make install. By default the camstream binary is installed in /usr/local/bin and related files (like icons) in /usr/local/share/camstream.

You are now ready to start using camstream!

To clean up things, use make clean, or make distclean in case you need to run ./configure again.

### Rebuilding Qt

In case `configure' complains about not being able to save in JPG format, and you really want to do this, you must recompile the Qt library (the default installation of Qt has JPG disabled). This is a bit tricky, though.

First, make sure you have the jpeg and libpng libaries installed (libjpeg.so.6, libpng.so.0 or libpng.so.1 and libz.so.1). If not, install from CD or compile separately.

Then, locate your Qt source directory (this is not where the libraries are stored!). In case the sources are not installed on your system: install them from CD or download the sources from www.trolltech.com. After you installed or unpacked the Qt sources, run ./configure -system-jpeg -system-libpng in the top level directory (add other options as you see fit).

Then run make; this may take several hours (!) to finish.

Note: Qt does not have a make install! You must unpack and compile the library right on the spot where you want it to be. I usually unpack the Qt package in /usr/local/lib/qt-X.YY where X.YY is the version number and use a symlink named 'qt' to point to the correct version; My QTDIR environment variable is set to /usr/local/lib/qt. It's a very bad idea to unpack the Qt sources over your existing source tree.

After you recompiled the library, run ldconfig once to update library links. You may have to remove old versions of the libraries or re-route a few symlinks first. Then, if everything works you can do a make clean to reclaim some harddisk space.

Note: it is not necessary to recompile camstream after you upgrade Qt, unless you link against the static library (libqt.a).