added documentation for more build options

This commit is contained in:
Arvid Norberg
2008-01-12 18:44:22 +00:00
parent fd466d891b
commit 57d248c531
2 changed files with 114 additions and 74 deletions

View File

@@ -446,8 +446,8 @@ invariant checks and asserts built into it. If you want to disable such checks
defines you can use to control the build.</p> defines you can use to control the build.</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="40%" /> <col width="44%" />
<col width="60%" /> <col width="56%" />
</colgroup> </colgroup>
<thead valign="bottom"> <thead valign="bottom">
<tr><th class="head">macro</th> <tr><th class="head">macro</th>
@@ -484,8 +484,21 @@ piece sorting.</td>
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_UPNP_LOGGING</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">TORRENT_UPNP_LOGGING</span></tt></td>
<td>Generates a &quot;upnp.log&quot; file with the UPnP <td>Generates a &quot;upnp.log&quot; file with the UPnP
traffic. This is very useful when debugging traffic. This is very useful when debugging
support for various UPnP routers.
support for various UPnP routers.</td> support for various UPnP routers.</td>
</tr> </tr>
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_DISK_STATS</span></tt></td>
<td>This will create a log of all disk activity
which later can parsed and graphed using
<tt class="docutils literal"><span class="pre">parse_disk_log.py</span></tt>.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_STATS</span></tt></td>
<td>This will generate a log with transfer rates,
downloading torrents, seeding torrents, peers,
connecting peers and disk buffers in use. The
log can be parsed and graphed with
<tt class="docutils literal"><span class="pre">parse_session_stats.py</span></tt>.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">UNICODE</span></tt></td> <tr><td><tt class="docutils literal"><span class="pre">UNICODE</span></tt></td>
<td>If building on windows this will make sure the <td>If building on windows this will make sure the
UTF-8 strings in pathnames are converted into UTF-8 strings in pathnames are converted into
@@ -536,6 +549,15 @@ Encryption support is the peer connection
encrypted supported by clients such as encrypted supported by clients such as
uTorrent, Azureus and KTorrent.</td> uTorrent, Azureus and KTorrent.</td>
</tr> </tr>
<tr><td><tt class="docutils literal"><span class="pre">_UNICODE</span></tt></td>
<td>On windows, this will cause the file IO
use wide character API, to properly support
non-ansi characters.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_DISABLE_RESOLVE_COUNTRIES</span></tt></td>
<td>Defining this will disable the ability to
resolve countries of origin for peer IPs.</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>If you experience that libtorrent uses unreasonable amounts of cpu, it will <p>If you experience that libtorrent uses unreasonable amounts of cpu, it will

View File

@@ -437,78 +437,96 @@ 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 (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. defines you can use to control the build.
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| macro | description | | macro | description |
+=================================+=================================================+ +=======================================+=================================================+
| ``NDEBUG`` | If you define this macro, all asserts, | | ``NDEBUG`` | If you define this macro, all asserts, |
| | invariant checks and general debug code will be | | | invariant checks and general debug code will be |
| | removed. Since there is quite a lot of code in | | | removed. Since there is quite a lot of code in |
| | in header files in libtorrent, it may be | | | in header files in libtorrent, it may be |
| | important to define the symbol consistently | | | important to define the symbol consistently |
| | across compilation units, including the clients | | | across compilation units, including the clients |
| | files. Potential problems is different | | | files. Potential problems is different |
| | compilation units having different views of | | | compilation units having different views of |
| | structs and class layouts and sizes. | | | structs and class layouts and sizes. |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``TORRENT_LOGGING`` | This macro will enable logging of the session | | ``TORRENT_LOGGING`` | This macro will enable logging of the session |
| | events, such as tracker announces and incoming | | | events, such as tracker announces and incoming |
| | connections (as well as blocked connections). | | | connections (as well as blocked connections). |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``TORRENT_VERBOSE_LOGGING`` | If you define this macro, every peer connection | | ``TORRENT_VERBOSE_LOGGING`` | If you define this macro, every peer connection |
| | will log its traffic to a log file as well as | | | will log its traffic to a log file as well as |
| | the session log. | | | the session log. |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant | | ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant |
| | checks in the storage, including logging of | | | checks in the storage, including logging of |
| | piece sorting. | | | piece sorting. |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``TORRENT_UPNP_LOGGING`` | Generates a "upnp.log" file with the UPnP | | ``TORRENT_UPNP_LOGGING`` | Generates a "upnp.log" file with the UPnP |
| | traffic. This is very useful when debugging | | | traffic. This is very useful when debugging |
| | support for various UPnP routers. | | | support for various UPnP routers. |
+---------------------------------+-------------------------------------------------+ | | support for various UPnP routers. |
| ``UNICODE`` | If building on windows this will make sure the | +---------------------------------------+-------------------------------------------------+
| | UTF-8 strings in pathnames are converted into | | ``TORRENT_DISK_STATS`` | This will create a log of all disk activity |
| | UTF-16 before they are passed to the file | | | which later can parsed and graphed using |
| | operations. | | | ``parse_disk_log.py``. |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``LITTLE_ENDIAN`` | This will use the little endian version of the | | ``TORRENT_STATS`` | This will generate a log with transfer rates, |
| | sha-1 code. If defined on a big-endian system | | | downloading torrents, seeding torrents, peers, |
| | the sha-1 hashes will be incorrect and fail. | | | connecting peers and disk buffers in use. The |
| | If it is not defined and ``__BIG_ENDIAN__`` | | | log can be parsed and graphed with |
| | isn't defined either (it is defined by Apple's | | | ``parse_session_stats.py``. |
| | GCC) both little-endian and big-endian versions | +---------------------------------------+-------------------------------------------------+
| | will be built and the correct code will be | | ``UNICODE`` | If building on windows this will make sure the |
| | chosen at run-time. | | | UTF-8 strings in pathnames are converted into |
+---------------------------------+-------------------------------------------------+ | | UTF-16 before they are passed to the file |
| ``TORRENT_LINKING_SHARED`` | If this is defined when including the | | | operations. |
| | libtorrent headers, the classes and functions | +---------------------------------------+-------------------------------------------------+
| | will be tagged with ``__declspec(dllimport)`` | | ``LITTLE_ENDIAN`` | This will use the little endian version of the |
| | on msvc and default visibility on GCC 4 and | | | sha-1 code. If defined on a big-endian system |
| | later. Set this in your project if you're | | | the sha-1 hashes will be incorrect and fail. |
| | linking against libtorrent as a shared library. | | | If it is not defined and ``__BIG_ENDIAN__`` |
| | (This is set by the Jamfile when | | | isn't defined either (it is defined by Apple's |
| | ``link=shared`` is set). | | | GCC) both little-endian and big-endian versions |
+---------------------------------+-------------------------------------------------+ | | will be built and the correct code will be |
| ``TORRENT_BUILDING_SHARED`` | If this is defined, the functions and classes | | | chosen at run-time. |
| | in libtorrent are marked with | +---------------------------------------+-------------------------------------------------+
| | ``__declspec(dllexport)`` on msvc, or with | | ``TORRENT_LINKING_SHARED`` | If this is defined when including the |
| | default visibility on GCC 4 and later. This | | | libtorrent headers, the classes and functions |
| | should be defined when building libtorrent as | | | will be tagged with ``__declspec(dllimport)`` |
| | a shared library. (This is set by the Jamfile | | | on msvc and default visibility on GCC 4 and |
| | when ``link=shared`` is set). | | | later. Set this in your project if you're |
+---------------------------------+-------------------------------------------------+ | | linking against libtorrent as a shared library. |
| ``TORRENT_DISABLE_DHT`` | If this is defined, the support for trackerless | | | (This is set by the Jamfile when |
| | torrents will be disabled. | | | ``link=shared`` is set). |
+---------------------------------+-------------------------------------------------+ +---------------------------------------+-------------------------------------------------+
| ``TORRENT_DHT_VERBOSE_LOGGING`` | This will enable verbose logging of the DHT | | ``TORRENT_BUILDING_SHARED`` | If this is defined, the functions and classes |
| | protocol traffic. | | | in libtorrent are marked with |
+---------------------------------+-------------------------------------------------+ | | ``__declspec(dllexport)`` on msvc, or with |
| ``TORRENT_DISABLE_ENCRYPTION`` | This will disable any encryption support and | | | default visibility on GCC 4 and later. This |
| | the openssl dependency that comes with it. | | | should be defined when building libtorrent as |
| | Encryption support is the peer connection | | | a shared library. (This is set by the Jamfile |
| | encrypted supported by clients such as | | | when ``link=shared`` is set). |
| | uTorrent, Azureus and KTorrent. | +---------------------------------------+-------------------------------------------------+
+---------------------------------+-------------------------------------------------+ | ``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. |
+---------------------------------------+-------------------------------------------------+
| ``TORRENT_DISABLE_ENCRYPTION`` | This will disable any encryption support and |
| | the openssl dependency that comes with it. |
| | Encryption support is the peer connection |
| | encrypted supported by clients such as |
| | uTorrent, Azureus and KTorrent. |
+---------------------------------------+-------------------------------------------------+
| ``_UNICODE`` | On windows, this will cause the file IO |
| | use wide character API, to properly support |
| | non-ansi characters. |
+---------------------------------------+-------------------------------------------------+
| ``TORRENT_DISABLE_RESOLVE_COUNTRIES`` | Defining this will disable the ability to |
| | resolve countries of origin for peer IPs. |
+---------------------------------------+-------------------------------------------------+
If you experience that libtorrent uses unreasonable amounts of cpu, it will If you experience that libtorrent uses unreasonable amounts of cpu, it will