added features to the jamfile for logging and dht-support and updated corresponding documentation. Added Jamplayer to the project page

This commit is contained in:
Arvid Norberg 2006-08-31 00:26:41 +00:00
parent b1411fcdf7
commit 9470a6b726
5 changed files with 150 additions and 83 deletions

15
Jamfile
View File

@ -3,6 +3,7 @@
import modules ;
import os ;
import errors ;
import feature : feature ;
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
@ -27,7 +28,6 @@ project torrent
<include>./zlib
<include>$(BOOST_ROOT)
<variant>release:<define>NDEBUG
<variant>debug:<define>TORRENT_DHT_VERBOSE_LOGGING
<define>BOOST_ALL_NO_LIB
<define>_FILE_OFFSET_BITS=64
<define>BOOST_THREAD_USE_LIB
@ -55,7 +55,6 @@ project torrent
<include>./include
<include>$(BOOST_ROOT)
<variant>release:<define>NDEBUG
<variant>debug:<define>TORRENT_DHT_VERBOSE_LOGGING
<define>BOOST_ALL_NO_LIB
<link>shared:<define>TORRENT_LINKING_SHARED
@ -121,11 +120,15 @@ LIBS = ;
LIBS += wsock32 ;
}
variant release_vlog : release : <define>TORRENT_VERBOSE_LOGGING ;
variant release_log : release : <define>TORRENT_LOGGING ;
variant debug_vlog : debug : <define>TORRENT_VERBOSE_LOGGING ;
variant debug_log : debug : <define>TORRENT_LOGGING ;
feature logging : none default verbose : composite propagated symmetric link-incompatible ;
feature.compose <logging>none : ;
feature.compose <logging>default : <define>TORRENT_LOGGING ;
feature.compose <logging>verbose : <define>TORRENT_VERBOSE_LOGGING ;
feature dht-support : on off logging : composite propagated symmetric link-incompatible ;
feature.compose <dht-support>on : ;
feature.compose <dht-support>off : <define>TORRENT_DISABLE_DHT ;
feature.compose <dht-support>logging : <define>TORRENT_DHT_VERBOSE_LOGGING ;
lib torrent
:

View File

@ -111,6 +111,7 @@ using darwin : 3.3 : g++-3.3 ;
using darwin : 4.0 : g++-4.0 ;
</pre>
<p>Note that the spaces around the semi-colons and colons are important!</p>
<p>Also see the <a class="reference" href="http://www.boost.org/doc/html/bbv2/installation.html">official installation instructions</a>.</p>
</div>
<div class="section" id="step-3-building-libtorrent">
<h3><a name="step-3-building-libtorrent">Step 3: Building libtorrent</a></h3>
@ -142,7 +143,8 @@ bjam msvc-7.1 link=static runtime-link=static
<p class="first admonition-title">Warning</p>
<p class="last">If you link statically to the runtime library, you cannot build libtorrent
as a shared library (DLL), since you will get separate heaps in the library
and in the client application. It will result in crashes.</p>
and in the client application. It will result in crashes and possibly link
errors.</p>
</div>
<p>The build targets are put in a directory called bin, and under it they are
sorted in directories depending on the toolset and build variant used.</p>
@ -157,25 +159,51 @@ Also, make sure the paths are correct in the different environments. In cygwin,
<tt class="docutils literal"><span class="pre">/cygdrive/c/boost_1_33_1</span></tt>). In the windows environment, they should have the typical
windows format (<tt class="docutils literal"><span class="pre">c:/boost_1_33_1</span></tt>).</p>
<p>The <tt class="docutils literal"><span class="pre">Jamfile</span></tt> will define <tt class="docutils literal"><span class="pre">NDEBUG</span></tt> when it's building a release build.
There are two other build variants available in the <tt class="docutils literal"><span class="pre">Jamfile</span></tt>. debug_log
and release_log, these two variants inherits from the debug and release
variants respectively, but adds extra logging (<tt class="docutils literal"><span class="pre">TORRENT_VERBOSE_LOGGING</span></tt>).
For more build configuration flags see <a class="reference" href="#build-configurations">Build configurations</a>.</p>
<p>The <tt class="docutils literal"><span class="pre">Jamfile</span></tt> has the following build variants:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">release</span></tt> - release version without any logging</li>
<li><tt class="docutils literal"><span class="pre">release_log</span></tt> - release version with standard logging</li>
<li><tt class="docutils literal"><span class="pre">release_vlog</span></tt> - release version with verbose logging (all peer connections are logged)</li>
<li><tt class="docutils literal"><span class="pre">debug</span></tt> - debug version without any logging</li>
<li><tt class="docutils literal"><span class="pre">debug_log</span></tt> - debug version with standard logging</li>
<li><tt class="docutils literal"><span class="pre">debug_vlog</span></tt> - debug version with verbose logging</li>
<p>Build features:</p>
<table border="1" class="docutils">
<colgroup>
<col width="32%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">boost build feature</th>
<th class="head">values</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="docutils literal"><span class="pre">logging</span></tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal"><span class="pre">none</span></tt> - no logging.</li>
<li><tt class="docutils literal"><span class="pre">default</span></tt> - basic session logging.</li>
<li><tt class="docutils literal"><span class="pre">verbose</span></tt> - verbose peer wire logging.</li>
</ul>
</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">dht-support</span></tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal"><span class="pre">on</span></tt> - build with support for tracker less
torrents and DHT support.</li>
<li><tt class="docutils literal"><span class="pre">logging</span></tt> - build with DHT support and verbose
logging of the DHT protocol traffic.</li>
<li><tt class="docutils literal"><span class="pre">off</span></tt> - build without DHT support.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>The logs created when building vlog or log mode are put in a directory called
<tt class="docutils literal"><span class="pre">libtorrent_logs</span></tt> in the current working directory.</p>
<p>When building the example client on windows, you need to build with
<tt class="docutils literal"><span class="pre">link=static</span></tt> otherwise you may get unresolved external symbols for some
boost.program-options symbols.</p>
<p>For more information, see the <a class="reference" href="http://www.boost.org/tools/build/v2/index.html">Boost build v2 documentation</a>.</p>
<p>To build all possible variants of libtorrent (good for testing when making
sure all build variants will actually compile), you can invoke this command:</p>
<pre class="literal-block">
bjam debug release link=shared link=static logging=verbose logging=default \
logging=none dht-support=on dht-support=logging dht-support=off
</pre>
</div>
</div>
<div class="section" id="building-with-autotools">
@ -365,6 +393,10 @@ when <tt class="docutils literal"><span class="pre">link=shared</span></tt> is s
<td>If this is defined, the support for trackerless
torrents will be disabled.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_DHT_VERBOSE_LOGGING</span></tt></td>
<td>This will enable verbose logging of the DHT
protocol traffic.</td>
</tr>
</tbody>
</table>
<p>If you experience that libtorrent uses unreasonable amounts of cpu, it will

View File

@ -111,6 +111,10 @@ use the following toolsets::
Note that the spaces around the semi-colons and colons are important!
Also see the `official installation instructions`_.
.. _`official installation instructions`: http://www.boost.org/doc/html/bbv2/installation.html
Step 3: Building libtorrent
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -146,7 +150,8 @@ the runtime, but on windows you can do both. Example::
If you link statically to the runtime library, you cannot build libtorrent
as a shared library (DLL), since you will get separate heaps in the library
and in the client application. It will result in crashes.
and in the client application. It will result in crashes and possibly link
errors.
The build targets are put in a directory called bin, and under it they are
@ -165,19 +170,23 @@ Also, make sure the paths are correct in the different environments. In cygwin,
windows format (``c:/boost_1_33_1``).
The ``Jamfile`` will define ``NDEBUG`` when it's building a release build.
There are two other build variants available in the ``Jamfile``. debug_log
and release_log, these two variants inherits from the debug and release
variants respectively, but adds extra logging (``TORRENT_VERBOSE_LOGGING``).
For more build configuration flags see `Build configurations`_.
The ``Jamfile`` has the following build variants:
Build features:
* ``release`` - release version without any logging
* ``release_log`` - release version with standard logging
* ``release_vlog`` - release version with verbose logging (all peer connections are logged)
* ``debug`` - debug version without any logging
* ``debug_log`` - debug version with standard logging
* ``debug_vlog`` - debug version with verbose logging
+------------------------+----------------------------------------------------+
| boost build feature | values |
+========================+====================================================+
| ``logging`` | * ``none`` - no logging. |
| | * ``default`` - basic session logging. |
| | * ``verbose`` - verbose peer wire logging. |
+------------------------+----------------------------------------------------+
| ``dht-support`` | * ``on`` - build with support for tracker less |
| | torrents and DHT support. |
| | * ``logging`` - build with DHT support and verbose |
| | logging of the DHT protocol traffic. |
| | * ``off`` - build without DHT support. |
+------------------------+----------------------------------------------------+
The logs created when building vlog or log mode are put in a directory called
``libtorrent_logs`` in the current working directory.
@ -190,6 +199,12 @@ For more information, see the `Boost build v2 documentation`__.
__ http://www.boost.org/tools/build/v2/index.html
To build all possible variants of libtorrent (good for testing when making
sure all build variants will actually compile), you can invoke this command::
bjam debug release link=shared link=static logging=verbose logging=default \
logging=none dht-support=on dht-support=logging dht-support=off
building with autotools
-----------------------
@ -323,60 +338,63 @@ invariant checks and asserts built into it. If you want to disable such checks
(you want to do that in a release build) you can see the table below for which
defines you can use to control the build.
+--------------------------------+-------------------------------------------------+
| macro | description |
+================================+=================================================+
| ``NDEBUG`` | If you define this macro, all asserts, |
| | invariant checks and general debug code will be |
| | removed. This option takes precedence over |
| | other debug settings. |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_LOGGING`` | This macro will enable logging of the session |
| | events, such as tracker announces and incoming |
| | connections (as well as blocked connections). |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_VERBOSE_LOGGING`` | If you define this macro, every peer connection |
| | will log its traffic to a log file as well as |
| | the session log. |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant |
| | checks in the storage, including logging of |
| | piece sorting. |
+--------------------------------+-------------------------------------------------+
| ``UNICODE`` | If building on windows this will make sure the |
| | UTF-8 strings in pathnames are converted into |
| | UTF-16 before they are passed to the file |
| | operations. |
+--------------------------------+-------------------------------------------------+
| ``LITTLE_ENDIAN`` | This will use the little endian version of the |
| | sha-1 code. If defined on a big-endian system |
| | the sha-1 hashes will be incorrect and fail. |
| | If it is not defined and ``__BIG_ENDIAN__`` |
| | isn't defined either (it is defined by Apple's |
| | GCC) both little-endian and big-endian versions |
| | will be built and the correct code will be |
| | chosen at run-time. |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_LINKING_SHARED`` | If this is defined when including the |
| | libtorrent headers, the classes and functions |
| | will be tagged with ``__declspec(dllimport)`` |
| | on msvc and default visibility on GCC 4 and |
| | later. Set this in your project if you're |
| | linking against libtorrent as a shared library. |
| | (This is set by the Jamfile when |
| | ``link=shared`` is set). |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_BUILDING_SHARED`` | If this is defined, the functions and classes |
| | in libtorrent are marked with |
| | ``__declspec(dllexport)`` on msvc, or with |
| | default visibility on GCC 4 and later. This |
| | should be defined when building libtorrent as |
| | a shared library. (This is set by the Jamfile |
| | when ``link=shared`` is set). |
+--------------------------------+-------------------------------------------------+
| ``TORRENT_DISABLE_DHT`` | If this is defined, the support for trackerless |
|Ê | torrents will be disabled. |
+--------------------------------+-------------------------------------------------+
+---------------------------------+-------------------------------------------------+
| macro | description |
+=================================+=================================================+
| ``NDEBUG`` | If you define this macro, all asserts, |
| | invariant checks and general debug code will be |
| | removed. This option takes precedence over |
| | other debug settings. |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_LOGGING`` | This macro will enable logging of the session |
| | events, such as tracker announces and incoming |
| | connections (as well as blocked connections). |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_VERBOSE_LOGGING`` | If you define this macro, every peer connection |
| | will log its traffic to a log file as well as |
| | the session log. |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant |
| | checks in the storage, including logging of |
| | piece sorting. |
+---------------------------------+-------------------------------------------------+
| ``UNICODE`` | If building on windows this will make sure the |
| | UTF-8 strings in pathnames are converted into |
| | UTF-16 before they are passed to the file |
| | operations. |
+---------------------------------+-------------------------------------------------+
| ``LITTLE_ENDIAN`` | This will use the little endian version of the |
| | sha-1 code. If defined on a big-endian system |
| | the sha-1 hashes will be incorrect and fail. |
| | If it is not defined and ``__BIG_ENDIAN__`` |
| | isn't defined either (it is defined by Apple's |
| | GCC) both little-endian and big-endian versions |
| | will be built and the correct code will be |
| | chosen at run-time. |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_LINKING_SHARED`` | If this is defined when including the |
| | libtorrent headers, the classes and functions |
| | will be tagged with ``__declspec(dllimport)`` |
| | on msvc and default visibility on GCC 4 and |
| | later. Set this in your project if you're |
| | linking against libtorrent as a shared library. |
| | (This is set by the Jamfile when |
| | ``link=shared`` is set). |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_BUILDING_SHARED`` | If this is defined, the functions and classes |
| | in libtorrent are marked with |
| | ``__declspec(dllexport)`` on msvc, or with |
| | default visibility on GCC 4 and later. This |
| | should be defined when building libtorrent as |
| | a shared library. (This is set by the Jamfile |
| | when ``link=shared`` is set). |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_DISABLE_DHT`` | If this is defined, the support for trackerless |
| | torrents will be disabled. |
+---------------------------------+-------------------------------------------------+
| ``TORRENT_DHT_VERBOSE_LOGGING`` | This will enable verbose logging of the DHT |
| | protocol traffic. |
+---------------------------------+-------------------------------------------------+
If you experience that libtorrent uses unreasonable amounts of cpu, it will

View File

@ -96,6 +96,13 @@ decentralized search facility.</p>
<td><div class="image first last"><img alt="ziptorrent_thumb.gif" class="first last" src="ziptorrent_thumb.gif" /></div>
</td>
</tr>
<tr><td><p class="first"><strong>Jamplayer</strong></p>
<p class="last"><a class="reference" href="http://www.jamendo.com/en/static/jamendotools_jamplayer/">Jamplayer</a> is a remote controlled
music player and downloader using
the jamendo music network.</p>
</td>
<td>&nbsp;</td>
</tr>
<tr><td><p class="first"><strong>FireANT</strong></p>
<p class="last"><a class="reference" href="http://antisnottv.net/">FireANT</a> is a video blog available
for Windows and Mac OSX.</p>

View File

@ -67,6 +67,12 @@ project listed here, let me_ know.
| bittorrent client with | |
| decentralized search facility. | |
+-------------------------------------+-----------------------------------------------+
| **Jamplayer** | |
| | |
| Jamplayer_ is a remote controlled | |
| music player and downloader using | |
| the jamendo music network. | |
+-------------------------------------+-----------------------------------------------+
| **FireANT** | |
| | |
| FireANT_ is a video blog available | |
@ -88,6 +94,7 @@ project listed here, let me_ know.
.. _btg: http://developer.berlios.de/projects/btg/
.. _MooPolice: http://www.moopolice.de
.. _BitsCast: http://www.bitscast.com/software/
.. _Jamplayer: http://www.jamendo.com/en/static/jamendotools_jamplayer/
.. _BitSlug: http://bitslug.sourceforge.net/
.. _BitBuddy: http://www.btvampire.com
.. _`Arctic Torrent`: http://www.int64.org/arctic.html