From 9470a6b726ae10766b4b5c3ccfbb2ce0d713834b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 31 Aug 2006 00:26:41 +0000 Subject: [PATCH] added features to the jamfile for logging and dht-support and updated corresponding documentation. Added Jamplayer to the project page --- Jamfile | 15 +++-- docs/building.html | 56 +++++++++++++---- docs/building.rst | 148 +++++++++++++++++++++++++-------------------- docs/projects.html | 7 +++ docs/projects.rst | 7 +++ 5 files changed, 150 insertions(+), 83 deletions(-) diff --git a/Jamfile b/Jamfile index 700daf443..ac7199c6b 100755 --- a/Jamfile +++ b/Jamfile @@ -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 ./zlib $(BOOST_ROOT) release:NDEBUG - debug:TORRENT_DHT_VERBOSE_LOGGING BOOST_ALL_NO_LIB _FILE_OFFSET_BITS=64 BOOST_THREAD_USE_LIB @@ -55,7 +55,6 @@ project torrent ./include $(BOOST_ROOT) release:NDEBUG - debug:TORRENT_DHT_VERBOSE_LOGGING BOOST_ALL_NO_LIB shared:TORRENT_LINKING_SHARED @@ -121,11 +120,15 @@ LIBS = ; LIBS += wsock32 ; } -variant release_vlog : release : TORRENT_VERBOSE_LOGGING ; -variant release_log : release : TORRENT_LOGGING ; -variant debug_vlog : debug : TORRENT_VERBOSE_LOGGING ; -variant debug_log : debug : TORRENT_LOGGING ; +feature logging : none default verbose : composite propagated symmetric link-incompatible ; +feature.compose none : ; +feature.compose default : TORRENT_LOGGING ; +feature.compose verbose : TORRENT_VERBOSE_LOGGING ; +feature dht-support : on off logging : composite propagated symmetric link-incompatible ; +feature.compose on : ; +feature.compose off : TORRENT_DISABLE_DHT ; +feature.compose logging : TORRENT_DHT_VERBOSE_LOGGING ; lib torrent : diff --git a/docs/building.html b/docs/building.html index ff42ea32f..360dbc19b 100644 --- a/docs/building.html +++ b/docs/building.html @@ -111,6 +111,7 @@ using darwin : 3.3 : g++-3.3 ; using darwin : 4.0 : g++-4.0 ;

Note that the spaces around the semi-colons and colons are important!

+

Also see the official installation instructions.

Step 3: Building libtorrent

@@ -142,7 +143,8 @@ bjam msvc-7.1 link=static runtime-link=static

Warning

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 sorted in directories depending on the toolset and build variant used.

@@ -157,25 +159,51 @@ Also, make sure the paths are correct in the different environments. In cygwin, /cygdrive/c/boost_1_33_1). In the windows environment, they should have the typical 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:

-
    -
  • 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
  • +

    Build features:

    + ++++ + + + + + + + + + + + + + +
    boost build featurevalues
    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.

    When building the example client on windows, you need to build with link=static otherwise you may get unresolved external symbols for some boost.program-options symbols.

    For more information, see the Boost build v2 documentation.

    +

    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
    +
    @@ -365,6 +393,10 @@ when link=shared is s 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 diff --git a/docs/building.rst b/docs/building.rst index 0ae2da4a9..76dcb871a 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -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 diff --git a/docs/projects.html b/docs/projects.html index 3e67cebad..892ccbfe7 100644 --- a/docs/projects.html +++ b/docs/projects.html @@ -96,6 +96,13 @@ decentralized search facility.

    ziptorrent_thumb.gif
    +

    Jamplayer

    +

    Jamplayer is a remote controlled +music player and downloader using +the jamendo music network.

    + +  +

    FireANT

    FireANT is a video blog available for Windows and Mac OSX.

    diff --git a/docs/projects.rst b/docs/projects.rst index 40c5e31a1..e9664c833 100644 --- a/docs/projects.rst +++ b/docs/projects.rst @@ -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