merged RC_1_1 into master
This commit is contained in:
commit
9bf0658090
|
@ -77,6 +77,8 @@
|
|||
* resume data no longer has timestamps of files
|
||||
* require C++11 to build libtorrent
|
||||
|
||||
1.1.5 release
|
||||
|
||||
* fix IPv6 tracker support by performing the second announce in more cases
|
||||
* fix utf-8 encoding check in torrent parser
|
||||
* fix infinite loop when parsing maliciously crafted torrents
|
||||
|
|
|
@ -169,7 +169,7 @@ AC_ARG_ENABLE(
|
|||
[logging],
|
||||
[AS_HELP_STRING(
|
||||
[--enable-logging],
|
||||
[enable logging support, enabled by alert mask [default=yes]])],
|
||||
[enable logging alerts [default=yes]])],
|
||||
[[ARG_ENABLE_LOGGING=$enableval]],
|
||||
[[ARG_ENABLE_LOGGING=yes]]
|
||||
)
|
||||
|
@ -339,7 +339,7 @@ AS_CASE(["$ARG_ENABLE_LOGGING"],
|
|||
],
|
||||
["no"|"none"], [
|
||||
AC_MSG_RESULT([no])
|
||||
AC_DEFINE([TORRENT_DISABLE_LOGGING],[1],[Define to enable support for logging alerts])
|
||||
AC_DEFINE([TORRENT_DISABLE_LOGGING],[1],[Define to disable support for logging alerts])
|
||||
COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DTORRENT_DISABLE_LOGGING "
|
||||
],
|
||||
[AC_MSG_RESULT([$ARG_ENABLE_LOGGING])
|
||||
|
@ -383,7 +383,7 @@ AS_CASE(["$ARG_ENABLE_DHT"],
|
|||
COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DTORRENT_DISABLE_DHT "
|
||||
],
|
||||
[AC_MSG_RESULT([$ARG_ENABLE_DHT])
|
||||
AC_MSG_ERROR([Unknown option "$ARG_ENABLE_DHT". Use either "yes", "no" or "logging".])]
|
||||
AC_MSG_ERROR([Unknown option "$ARG_ENABLE_DHT". Use either "yes" or "no".])]
|
||||
)
|
||||
|
||||
AS_IF([test "x$ac_cv_hidden_visibility_attribute" = "xyes"], [
|
||||
|
@ -570,7 +570,7 @@ Build options:
|
|||
deprecated functions: ${ARG_ENABLE_DEPRECATED:-yes}
|
||||
debug build: ${ARG_ENABLE_DEBUG:-no}
|
||||
invariant checks: ${ARG_ENABLE_INVARIANT:-no}
|
||||
logging support: ${ARG_ENABLE_LOGGING:-no}
|
||||
logging support: ${ARG_ENABLE_LOGGING:-yes}
|
||||
|
||||
Features:
|
||||
encryption support: ${ARG_ENABLE_ENCRYPTION:-yes}
|
||||
|
|
|
@ -12,10 +12,9 @@ libtorrent manual
|
|||
downloading and building
|
||||
========================
|
||||
|
||||
To acquire the latest version of libtorrent, you'll have to grab it from SVN.
|
||||
You'll find instructions on how to do this here__ (see subversion access).
|
||||
To download the latest version of libtorrent, clone the `github repo`__.
|
||||
|
||||
__ http://sourceforge.net/svn/?group_id=79942
|
||||
__ https://github.com/arvidn/libtorrent
|
||||
|
||||
The build systems supported "out of the box" in libtorrent are boost-build v2
|
||||
(BBv2) and autotools (for unix-like systems). If you still can't build after
|
||||
|
@ -38,15 +37,18 @@ IRC channel on ``irc.freenode.net``.
|
|||
configuration options in the pkg-config file. Always use pkg-config
|
||||
when linking against libtorrent.
|
||||
|
||||
building from svn
|
||||
building from git
|
||||
-----------------
|
||||
|
||||
To build libtorrent from svn you need to check out the libtorrent sources from
|
||||
sourceforge. If you downloaded a release tarball, you can skip this section.
|
||||
To build libtorrent from git you need to clone the libtorrent repo from
|
||||
github. If you downloaded a release `tarball`__, you can skip this section.
|
||||
|
||||
To check out libtorrent follow these instructions__.
|
||||
__ https://github.com/arvidn/libtorrent/releases/latest
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/arvidn/libtorrent.git
|
||||
|
||||
__ http://sourceforge.net/svn/?group_id=79942
|
||||
|
||||
building with BBv2
|
||||
------------------
|
||||
|
@ -75,7 +77,7 @@ You'll find boost here__.
|
|||
__ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=619445
|
||||
|
||||
Extract the archive to some directory where you want it. For the sake of this
|
||||
guide, let's assume you extract the package to ``c:\boost_1_55_0`` (I'm using
|
||||
guide, let's assume you extract the package to ``c:\boost_1_64_0`` (I'm using
|
||||
a windows path in this example since if you're on linux/unix you're more likely
|
||||
to use the autotools). You'll need at least version 1.49 of the boost library
|
||||
in order to build libtorrent.
|
||||
|
@ -86,7 +88,7 @@ Step 2: Setup BBv2
|
|||
|
||||
First you need to build ``bjam``. You do this by opening a terminal (In
|
||||
windows, run ``cmd``). Change directory to
|
||||
``c:\boost_1_55_0\tools\jam\src``. Then run the script called
|
||||
``c:\boost_1_64_0\tools\jam\src``. Then run the script called
|
||||
``build.bat`` or ``build.sh`` on a unix system. This will build ``bjam`` and
|
||||
place it in a directory starting with ``bin.`` and then have the name of your
|
||||
platform. Copy the ``bjam.exe`` (or ``bjam`` on a unix system) to a place
|
||||
|
@ -101,16 +103,16 @@ set the environment variable ``BOOST_BUILD_PATH``. This is the path that tells
|
|||
``bjam`` where it can find boost-build, your configuration file and all the
|
||||
toolsets (descriptions used by boost-build to know how to use different
|
||||
compilers on different platforms). Assuming the boost install path above, set
|
||||
it to ``c:\boost_1_55_0\tools\build\v2``.
|
||||
it to ``c:\boost_1_64_0\tools\build\v2``.
|
||||
|
||||
To set an environment variable in windows, type for example::
|
||||
|
||||
set BOOST_BUILD_PATH=c:\boost_1_55_0\tools\build\v2
|
||||
set BOOST_BUILD_PATH=c:\boost_1_64_0\tools\build\v2
|
||||
|
||||
In a terminal window.
|
||||
|
||||
The last thing to do to complete the setup of BBv2 is to modify your
|
||||
``user-config.jam`` file. It is located in ``c:\boost_1_55_0\tools\build\v2``.
|
||||
``user-config.jam`` file. It is located in ``c:\boost_1_64_0\tools\build\v2``.
|
||||
Depending on your platform and which compiler you're using, you should add a
|
||||
line for each compiler and compiler version you have installed on your system
|
||||
that you want to be able to use with BBv2. For example, if you're using
|
||||
|
@ -148,7 +150,7 @@ Step 3: Building libtorrent
|
|||
When building libtorrent, the ``Jamfile`` expects the environment variable
|
||||
``BOOST_ROOT`` to be set to the boost installation directory. It uses this to
|
||||
find the boost libraries it depends on, so they can be built and their headers
|
||||
files found. So, set this to ``c:\boost_1_55_0``. You only need this if you're
|
||||
files found. So, set this to ``c:\boost_1_64_0``. You only need this if you're
|
||||
building against a source distribution of boost.
|
||||
|
||||
Then the only thing left is simply to invoke ``bjam``. If you want to specify
|
||||
|
@ -224,8 +226,8 @@ from a cygwin terminal, you'll have to run it from a ``cmd`` terminal. The same
|
|||
cygwin, if you're building with gcc in cygwin you'll have to run it from a cygwin terminal.
|
||||
Also, make sure the paths are correct in the different environments. In cygwin, the paths
|
||||
(``BOOST_BUILD_PATH`` and ``BOOST_ROOT``) should be in the typical unix-format (e.g.
|
||||
``/cygdrive/c/boost_1_55_0``). In the windows environment, they should have the typical
|
||||
windows format (``c:/boost_1_55_0``).
|
||||
``/cygdrive/c/boost_1_64_0``). In the windows environment, they should have the typical
|
||||
windows format (``c:/boost_1_64_0``).
|
||||
|
||||
.. note::
|
||||
In Jamfiles, spaces are separators. It's typically easiest to avoid spaces
|
||||
|
@ -384,12 +386,12 @@ building with autotools
|
|||
First of all, you need to install ``automake`` and ``autoconf``. Many
|
||||
unix/linux systems comes with these preinstalled.
|
||||
|
||||
The prerequisites for building libtorrent are boost.thread, boost.date_time
|
||||
and boost.filesystem. Those are the *compiled* boost libraries needed. The
|
||||
headers-only libraries needed include (but is not necessarily limited to)
|
||||
boost.bind, boost.ref, boost.multi_index, boost.optional, boost.lexical_cast,
|
||||
boost.integer, boost.iterator, boost.tuple, boost.array, boost.function,
|
||||
boost.smart_ptr, boost.preprocessor, boost.static_assert.
|
||||
The prerequisites for building libtorrent are boost.system, boost.chrono and
|
||||
boost.random. Those are the *compiled* boost libraries needed. The headers-only
|
||||
libraries needed include (but is not necessarily limited to) boost.bind,
|
||||
boost.ref, boost.multi_index, boost.optional, boost.lexical_cast, boost.integer,
|
||||
boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr,
|
||||
boost.preprocessor, boost.static_assert.
|
||||
|
||||
If you want to build the ``client_test`` example, you'll also need boost.regex
|
||||
and boost.program_options.
|
||||
|
@ -448,12 +450,14 @@ the suffix ``mt``.
|
|||
You know that the boost libraries were found if you see the following output
|
||||
from the configure script::
|
||||
|
||||
checking whether the Boost::DateTime library is available... yes
|
||||
checking for main in -lboost_date_time... yes
|
||||
checking whether the Boost::Filesystem library is available... yes
|
||||
checking for main in -lboost_filesystem... yes
|
||||
checking whether the Boost::Thread library is available... yes
|
||||
checking for main in -lboost_thread... yes
|
||||
Checking for boost libraries:
|
||||
checking for boostlib >= 1.53... yes
|
||||
checking whether the Boost::System library is available... yes
|
||||
checking for exit in -lboost_system... yes
|
||||
checking whether the Boost::Chrono library is available... yes
|
||||
checking for exit in -lboost_chrono-mt... yes
|
||||
checking whether the Boost::Random library is available... yes
|
||||
checking for exit in -lboost_random-mt... yes
|
||||
|
||||
Another possible source of problems may be if the path to your libtorrent
|
||||
directory contains spaces. Make sure you either rename the directories with
|
||||
|
@ -528,10 +532,6 @@ defines you can use to control the build.
|
|||
| | peer_log_alert. With this build flag, you |
|
||||
| | cannot enable those alerts. |
|
||||
+----------------------------------------+-------------------------------------------------+
|
||||
| ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant |
|
||||
| | checks in the storage, including logging of |
|
||||
| | piece sorting. |
|
||||
+----------------------------------------+-------------------------------------------------+
|
||||
| ``TORRENT_DISABLE_MUTABLE_TORRENTS`` | Disables mutable torrent support (`BEP 38`_) |
|
||||
+----------------------------------------+-------------------------------------------------+
|
||||
| ``TORRENT_LINKING_SHARED`` | If this is defined when including the |
|
||||
|
|
|
@ -13,7 +13,7 @@ libtorrent version 1.2 comes with some significant updates in the API.
|
|||
This document summarizes the changes affecting library users.
|
||||
|
||||
C++98 no longer supported
|
||||
-------------------------
|
||||
=========================
|
||||
|
||||
With libtorrent 1.2, C++98 is no longer supported, you need a compiler capable
|
||||
of at least C++11 to build libtorrent.
|
||||
|
@ -21,7 +21,7 @@ of at least C++11 to build libtorrent.
|
|||
This also means libtorrent types now support move.
|
||||
|
||||
forward declaring libtorrent types deprecated
|
||||
---------------------------------------------
|
||||
=============================================
|
||||
|
||||
Clients are discouraged from forward declaring types from libtorrent.
|
||||
Instead, include the <libtorrent/fwd.hpp> header.
|
||||
|
@ -33,7 +33,7 @@ In the future, ``libtorrent`` will be the alias and ``lt`` the namespace name.
|
|||
With no forward declarations inside libtorrent's namespace though, there should not be any reason for clients to re-open the namespace.
|
||||
|
||||
resume data handling
|
||||
--------------------
|
||||
====================
|
||||
|
||||
To significantly simplify handling of resume data, the previous way of handling it is deprecated.
|
||||
resume data is no longer passed in as a flat buffer in the add_torrent_params.
|
||||
|
@ -51,13 +51,13 @@ The old API is still supported as long as libtorrent is built with deprecated fu
|
|||
It will be performing slightly better without deprecated functions present.
|
||||
|
||||
announce entry multi-home support
|
||||
---------------------------------
|
||||
=================================
|
||||
|
||||
The announce_entry type now captures status on individual endpoints, as opposed to treating every tracker behind the same name as a single tracker.
|
||||
This means some properties has moved into the ``announce_endpoint`` structure, and an announce entry has 0 or more endpoints.
|
||||
|
||||
alerts no longer cloneable
|
||||
--------------------------
|
||||
==========================
|
||||
|
||||
As part of the transition to a more efficient handling of alerts, 1.1 allocated them in a contiguous, heterogeneous, vector.
|
||||
This means they are no longer heap allocated nor held by a smart pointer.
|
||||
|
@ -65,14 +65,14 @@ The ``clone()`` member on alerts was deprecated in 1.1 and removed in 1.2.
|
|||
To pass alerts across threads, instead pull out the relevant information from the alerts and pass that across.
|
||||
|
||||
boost replaced by std
|
||||
---------------------
|
||||
=====================
|
||||
|
||||
``boost::shared_ptr`` has been replaced by ``std::shared_ptr`` in the libtorrent API.
|
||||
The same goes for ``<cstdint>`` types, instead of ``boost::int64_t``, libtorrent now uses ``std::int64_t``.
|
||||
Instead of ``boost::array``, ``std::array`` is used, and ``boost::function`` has been replaced by ``std::fuction``.
|
||||
|
||||
strong typedefs
|
||||
---------------
|
||||
===============
|
||||
|
||||
In order to strengthen type-safety, libtorrent now uses special types to represent certain indexes and ID types.
|
||||
Any integer referring to a piece index, now has the type ``piece_index_t``, and indices to files in a torrent, use ``file_index_t``.
|
||||
|
@ -81,7 +81,7 @@ Similarly, time points and duration now use ``time_point`` and ``duration`` from
|
|||
The specific types have typedefs at ``lt::time_point`` and ``lt::duration``, and the clock used by libtorrent is ``lt::clock_type``.`
|
||||
|
||||
strongly typed flags
|
||||
--------------------
|
||||
====================
|
||||
|
||||
Enum flags have been replaced by strongly typed flags.
|
||||
This means their implicit conversion to and from ``int`` is deprecated.
|
||||
|
@ -100,14 +100,14 @@ Insted say::
|
|||
(Also note that in this specific example, the flags moved out of the ``add_torrent_params`` structure, but this is unrelated to them also having stronger types).
|
||||
|
||||
span<> and string_view
|
||||
----------------------
|
||||
======================
|
||||
|
||||
The interface has adopted ``string_view`` (from boost for now) and ``span<>`` (custom implementation for now).
|
||||
This means some function calls that previously took ``char const*`` or ``std::string`` may now take an ``lt::string_view``.
|
||||
Similarly, functions that previously would take a pointer and length pair will now take a ``span<>``.
|
||||
|
||||
periphery utility functions no longer exported
|
||||
----------------------------------------------
|
||||
==============================================
|
||||
|
||||
Historically, libtorrent has exported functions not essential to its core bittorrent functionality.
|
||||
Such as filesystem functions like ``directory``, ``file`` classes and ``remove``, ``create_directory`` functions.
|
||||
|
@ -117,14 +117,14 @@ Time functions like ``time_now``. These functions are no longer available to cli
|
|||
Instead, it is recommended to use boost.filesystem or the experimental filesystem TS.
|
||||
|
||||
plugins
|
||||
-------
|
||||
=======
|
||||
|
||||
libtorrent session plugins no longer have all callbacks called unconditionally.
|
||||
The callback has to register which callbacks it's interested in receiving by returning a bitmask from ``std::uint32_t implemented_features()``.
|
||||
The return value is documented in the plugin class.
|
||||
|
||||
RSS functions removed
|
||||
---------------------
|
||||
=====================
|
||||
|
||||
The deprecated RSS functions have been removed from the library interface.
|
||||
|
||||
|
|
Loading…
Reference in New Issue