Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 1fa92ce922d645587b2ea4fcb1f5bfc5 > files > 215

camstream-0.25-2mdk.i586.rpm

<html>
<head>
<title>Building CamStream</title>
<link rel="stylesheet" href="camstream.css" type="text/css">
</head>

<body>

<p><a href="index.html" target="_top">Frames</a></p>

<h1>Building CamStream</h1>


<h3>Requirements</h3>

<ul>
  <li>The Qt library (version &gt;= 2.2.2)
  <li>(optional) libjpeg and libpng
</ul>

<p>The Qt library can be downloaded from 
<a href="http://www.trolltech.com">http://www.trolltech.com/</a>
and several mirrors. Any version of 2.2.2 or higher will do.

<p>If you are using KDE you already have Qt installed. 

<p>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: <a
href="#rebuild">Rebuilding Qt</a>). If this is not the case, images can only
be saved in (bulky) BMP or PBM format.

<p>Documentation of the <a href="api/index.html">API</a> is generated
with <a href="http://www.stack.nl/~dimitri/doxygen/index.html" target="_blank">Doxygen</a>,
but you should rarely need to regenerate the documentation.



<h3>Configuration</h3>

<p>There is a <span class="filename">configure</span> 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 <span class="command">greenish coloured</span> commands
as they appear below (but of course replace the version number):

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


<p>You are now ready to start using <span class="command">camstream</span>!</p>

<p>To clean up things, use <span class="command">make clean</span>, or
<span class="command">make distclean</span> in case you need to run <span
class="command">./configure</span> again.</p>




<h3><a name="rebuild">Rebuilding Qt</a></h3>

<p>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.

<p>First, make sure you have the jpeg and libpng libaries installed 
(<span class="filename">libjpeg.so.6</span>, 
<span class="filename">libpng.so.0</span> or <span class="filename">libpng.so.1</span> 
and <span class="filename">libz.so.1</span>). If not, install from CD
or compile separately. 

<p>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 <span class="command">./configure
-system-jpeg -system-libpng</a> in the top level directory (add other
options as you see fit).</p>

<p>Then run <span class="command">make</span>; this may take several hours
(!) to finish.</p>

<p>Note: Qt does not have a <span class="command">make install</span>! You
must unpack and compile the library right on the spot where you want it to
be. I usually unpack the Qt package in <span
class="filedir">/usr/local/lib/qt-X.YY</span> 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 <span class="filedir">/usr/local/lib/qt</span>. It's a very bad idea to unpack the Qt sources over your existing source
tree.</p>

<p>After you recompiled the library, run <span
class="command">ldconfig</span> 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 <span class="command">make clean</a>
to reclaim some harddisk space.

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

</body>
</html>