From d6015e3c6380543fec2d6c71cee0bf52fc8cb2c1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 11 Jan 2005 02:13:07 +0000 Subject: [PATCH] *** empty log message *** --- Jamfile | 15 ++++++++++----- docs/manual.rst | 25 +++++++++---------------- examples/Jamfile | 22 ++++------------------ include/libtorrent/session.hpp | 2 +- 4 files changed, 24 insertions(+), 40 deletions(-) diff --git a/Jamfile b/Jamfile index c493aaf22..0df4875c7 100755 --- a/Jamfile +++ b/Jamfile @@ -2,12 +2,20 @@ import modules ; import os ; +import errors ; BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; ECHO "BOOST_ROOT =" $(BOOST_ROOT) ; ECHO "OS =" [ os.name ] ; +if ! $(BOOST_ROOT) +{ + errors.user-error + "BOOST_ROOT must be set to your boost installation path." ; +} + + use-project /boost : $(BOOST_ROOT) ; project torrent @@ -33,6 +41,7 @@ project torrent ./include $(BOOST_ROOT) release:NDEBUG + debug:TORRENT_VERBOSE_LOGGING BOOST_ALL_NO_LIB ; @@ -42,6 +51,7 @@ SOURCES = alert.cpp entry.cpp escape_string.cpp + file.cpp identify_client.cpp peer_connection.cpp piece_picker.cpp @@ -82,11 +92,6 @@ LIBS = ; { lib wsock32 : : wsock32.lib ; LIBS += wsock32 ; - SOURCES += file_win.cpp ; - } - else - { - SOURCES += file.cpp ; } lib torrent diff --git a/docs/manual.rst b/docs/manual.rst index 0e5b4b316..f1f562624 100755 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -91,14 +91,15 @@ on how to do this here__ (see Anonymous CVS access). __ http://sourceforge.net/cvs/?group_id=79942 The easiest way to build libtorrent is probably to use `boost-build`_. Make sure you install it -correctly by setting the environment variable ``BOOST_BUILD_PATH`` and modifying the -``user_config.jam`` to reflect the toolsets you have installed. +correctly by setting the environment variable ``BOOST_BUILD_PATH`` to point to your boost build +installation. Also you have to modify the ``user_config.jam`` to reflect the toolsets you have installed. +(if you're building with gcc, uncomment the line "using gcc ;") -.. _`boost-build`: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=80982 +.. _`boost-build`: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=80982&release_id=278763 -You also need to install `boost 1.31.0`__. +You also need to install boost__ (at least version 1.31.0). -__ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=214915 +__ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=284047 Before you invoke ``bjam`` you have to set the environment variable ``BOOST_ROOT`` to the path where you installed boost. This will be used to build and link against the required @@ -133,19 +134,13 @@ from a cygwin terminal, you'll have to run it from a ``cmd`` terminal. The same cygwin, if you're building with gcc (mingw) 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_31_0``). In the windows environment, they should have the typical -windows format (``c:/boost_1_31_0``). +``/cygdrive/c/boost_1_32_0``). In the windows environment, they should have the typical +windows format (``c:/boost_1_32_0``). If you're building in developer studio, you may have to set the compiler options "force conformance in for loop scope", "treat wchar_t as built-in type" and "Enable Run-Time Type Info" to Yes. -If you're building in developer studio 6, you will probably have to use the previous -version of boost, `boost 1.30.2`__. And you'll definately have to use at least service -pack 5 (sp5). - -__ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=178835 - release and debug builds ------------------------ @@ -177,9 +172,7 @@ table below for which defines you can use to control the build. The ``Jamfile`` If you experience that libtorrent uses unreasonable amounts of cpu, it will definately help to -define ``NDEBUG``. - - +define ``NDEBUG``, since it will remove the invariant checks within the library. using diff --git a/examples/Jamfile b/examples/Jamfile index 7fa51623c..ef1fdcba2 100755 --- a/examples/Jamfile +++ b/examples/Jamfile @@ -4,24 +4,10 @@ project : requirements /torrent multi ; -exe client_test - : client_test.cpp - ; - - -exe simple_client - : simple_client.cpp - ; - - -exe dump_torrent - : dump_torrent.cpp - ; - -exe make_torrent - : make_torrent.cpp - ; - +exe client_test : client_test.cpp ; +exe simple_client : simple_client.cpp ; +exe dump_torrent : dump_torrent.cpp ; +exe make_torrent : make_torrent.cpp ; stage . : dump_torrent make_torrent simple_client client_test ; diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 33ab85e00..b30018603 100755 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -106,7 +106,7 @@ namespace libtorrent struct piece_checker_data { piece_checker_data() - : progress(0.f), abort(false), processing(false) {} + : processing(false), progress(0.f), abort(false) {} boost::shared_ptr torrent_ptr; boost::filesystem::path save_path;