mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-13 05:41:17 +00:00
Merge pull request #13511 from FranciscoPombal/bump_versions
Bump minimum dependency versions
This commit is contained in:
commit
3485ad39d9
14
.github/workflows/ci.yaml
vendored
14
.github/workflows/ci.yaml
vendored
@ -12,12 +12,12 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
# Qt: 5.15.0
|
||||
# libtorrent: RC_1_2 HEAD, 1.2.10
|
||||
VCPKG_COMMIT: 32eccc18191fbb57b159784a1724d2d00613ae82
|
||||
# Qt: 5.15.1
|
||||
# libtorrent: RC_1_2 HEAD, 1.2.11
|
||||
VCPKG_COMMIT: 133051b793486ef14e67e9d1f48c9cfe64dc127e
|
||||
VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg
|
||||
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
|
||||
LIBTORRENT_VERSION_TAG: libtorrent-1.2.10
|
||||
LIBTORRENT_VERSION_TAG: v1.2.11
|
||||
|
||||
jobs:
|
||||
|
||||
@ -178,11 +178,11 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
|
||||
# - pkg-config is needed for some vcpkg installations
|
||||
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base
|
||||
- name: install additional required packages with homebrew
|
||||
shell: bash
|
||||
run: |
|
||||
brew install ninja pkg-config
|
||||
brew install automake ninja
|
||||
|
||||
- name: setup vcpkg (cached, if possible)
|
||||
uses: lukka/run-vcpkg@v4
|
||||
@ -197,7 +197,7 @@ jobs:
|
||||
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake `
|
||||
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake
|
||||
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
|
||||
-Value "set(VCPKG_BUILD_TYPE release)"
|
||||
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
|
||||
|
||||
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
|
||||
- name: force AppleClang to compile libtorrent with C++14
|
||||
|
@ -125,7 +125,7 @@ install:
|
||||
pushd "$HOME"
|
||||
git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
git checkout tags/v1.2.10
|
||||
git checkout tags/v1.2.11
|
||||
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
|
@ -11,12 +11,12 @@ project(qBittorrent
|
||||
|
||||
# use CONFIG mode first in find_package
|
||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
|
||||
# version requirements
|
||||
set(requiredBoostVersion 1.40)
|
||||
set(requiredQtVersion 5.9.0)
|
||||
set(requiredOpenSSLVersion 1.0)
|
||||
set(requiredLibtorrentVersion 1.2.0)
|
||||
set(requiredZlibVersion 1.2.5.2)
|
||||
# version requirements - older vesions may work, but you are on your own
|
||||
set(minBoostVersion 1.65)
|
||||
set(minQtVersion 5.9.5)
|
||||
set(minOpenSSLVersion 1.1.1)
|
||||
set(minLibtorrentVersion 1.2.11)
|
||||
set(minZlibVersion 1.2.11)
|
||||
|
||||
# features (some are platform-specific)
|
||||
include(FeatureSummary)
|
||||
|
16
INSTALL
16
INSTALL
@ -3,23 +3,27 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
||||
|
||||
1) Install these dependencies:
|
||||
|
||||
- Boost >= 1.40
|
||||
- Boost >= 1.65
|
||||
|
||||
- libtorrent-rasterbar >= 1.2 (by Arvid Norberg)
|
||||
- libtorrent-rasterbar >= 1.2.11 (by Arvid Norberg)
|
||||
* https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- OpenSSL >= 1.0
|
||||
- OpenSSL >= 1.1.1
|
||||
|
||||
- Qt >= 5.9.0
|
||||
- Qt >= 5.9.5
|
||||
|
||||
- zlib >= 1.2.5.2
|
||||
- zlib >= 1.2.11
|
||||
|
||||
- pkg-config (compile-time only)
|
||||
- pkg-config (compile-time only on *nix systems)
|
||||
|
||||
- Python >= 3.5.0 (optional, runtime only)
|
||||
* Required by the internal search engine
|
||||
|
||||
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
|
||||
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.
|
||||
Please ensure you are building with an officially supported configuration when reporting bugs.
|
||||
|
||||
2a) Compile and install qBittorrent with Qt graphical interface
|
||||
|
||||
$ ./configure
|
||||
|
98
configure
vendored
98
configure
vendored
@ -1427,7 +1427,7 @@ Some influential environment variables:
|
||||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
QT_QMAKE value of host_bins for Qt5Core >= 5.9.0, overriding pkg-config
|
||||
QT_QMAKE value of host_bins for Qt5Core >= 5.9.5, overriding pkg-config
|
||||
Qt5Svg_CFLAGS
|
||||
C compiler flags for Qt5Svg, overriding pkg-config
|
||||
Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
|
||||
@ -4485,8 +4485,8 @@ $as_echo "$enable_webui" >&6; }
|
||||
esac
|
||||
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.5") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
@ -4495,12 +4495,12 @@ if test -n "$QT_QMAKE"; then
|
||||
pkg_cv_QT_QMAKE="$QT_QMAKE"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.5") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.9.0" 2>/dev/null`
|
||||
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.9.5" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -4527,8 +4527,8 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.9.0" >&5
|
||||
$as_echo_n "checking for Qt5 qmake >= 5.9.0... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.9.5" >&5
|
||||
$as_echo_n "checking for Qt5 qmake >= 5.9.5... " >&6; }
|
||||
if test "x$QT_QMAKE" != "x"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
|
||||
$as_echo "$QT_QMAKE" >&6; }
|
||||
@ -4642,11 +4642,11 @@ case "x$enable_qt_dbus" in #(
|
||||
"xyes") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.9.0" >&5
|
||||
$as_echo_n "checking for Qt5DBus >= 5.9.0... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.9.5" >&5
|
||||
$as_echo_n "checking for Qt5DBus >= 5.9.5... " >&6; }
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.9.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.9.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.9.5") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
@ -4716,10 +4716,10 @@ BOOST_CPPFLAGS=""
|
||||
if test "x$want_boost" = "xyes"; then :
|
||||
|
||||
|
||||
if test "x1.40" = "x"; then :
|
||||
if test "x1.65" = "x"; then :
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
|
||||
else
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req="1.40"
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req="1.65"
|
||||
fi
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
|
||||
@ -4763,16 +4763,16 @@ esac
|
||||
|
||||
if test "x$_AX_BOOST_BASE_boost_path" != "x"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.40 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.40 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.65 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.65 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"... " >&6; }
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
|
||||
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.40 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.40 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.65 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.65 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"... " >&6; }
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
@ -4815,8 +4815,8 @@ fi
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.40 ($WANT_BOOST_VERSION)" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.40 ($WANT_BOOST_VERSION)... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.65 ($WANT_BOOST_VERSION)" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.65 ($WANT_BOOST_VERSION)... " >&6; }
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
@ -4985,8 +4985,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
if test "x$_version" = "x0" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.40 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
|
||||
$as_echo "$as_me: We could not detect the boost libraries (version 1.40 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.65 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
|
||||
$as_echo "$as_me: We could not detect the boost libraries (version 1.65 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
|
||||
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
|
||||
@ -5292,12 +5292,12 @@ if test -n "$libtorrent_CFLAGS"; then
|
||||
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.11") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2" 2>/dev/null`
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5309,12 +5309,12 @@ if test -n "$libtorrent_LIBS"; then
|
||||
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.11") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2" 2>/dev/null`
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5335,14 +5335,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.11" 2>&1`
|
||||
else
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.11" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$libtorrent_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2) were not met:
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.11) were not met:
|
||||
|
||||
$libtorrent_PKG_ERRORS
|
||||
|
||||
@ -5385,12 +5385,12 @@ if test -n "$openssl_CFLAGS"; then
|
||||
pkg_cv_openssl_CFLAGS="$openssl_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "openssl >= 1.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_openssl_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.0" 2>/dev/null`
|
||||
pkg_cv_openssl_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.1.1" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5402,12 +5402,12 @@ if test -n "$openssl_LIBS"; then
|
||||
pkg_cv_openssl_LIBS="$openssl_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "openssl >= 1.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.1.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "openssl >= 1.1.1") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_openssl_LIBS=`$PKG_CONFIG --libs "openssl >= 1.0" 2>/dev/null`
|
||||
pkg_cv_openssl_LIBS=`$PKG_CONFIG --libs "openssl >= 1.1.1" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5428,14 +5428,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
openssl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.0" 2>&1`
|
||||
openssl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
|
||||
else
|
||||
openssl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.0" 2>&1`
|
||||
openssl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.1.1" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$openssl_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (openssl >= 1.0) were not met:
|
||||
as_fn_error $? "Package requirements (openssl >= 1.1.1) were not met:
|
||||
|
||||
$openssl_PKG_ERRORS
|
||||
|
||||
@ -5478,12 +5478,12 @@ if test -n "$zlib_CFLAGS"; then
|
||||
pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.5.2" 2>/dev/null`
|
||||
pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5495,12 +5495,12 @@ if test -n "$zlib_LIBS"; then
|
||||
pkg_cv_zlib_LIBS="$zlib_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "zlib >= 1.2.11") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.5.2" 2>/dev/null`
|
||||
pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@ -5521,14 +5521,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
|
||||
zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
|
||||
else
|
||||
zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
|
||||
zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.11" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$zlib_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (zlib >= 1.2.5.2) were not met:
|
||||
as_fn_error $? "Package requirements (zlib >= 1.2.11) were not met:
|
||||
|
||||
$zlib_PKG_ERRORS
|
||||
|
||||
|
@ -157,7 +157,7 @@ AS_CASE(["x$enable_qt_dbus"],
|
||||
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
||||
|
||||
|
||||
AX_BOOST_BASE([1.40],
|
||||
AX_BOOST_BASE([1.65],
|
||||
[AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
|
||||
AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
|
||||
[AC_MSG_ERROR([Could not find Boost])])
|
||||
@ -178,17 +178,17 @@ AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 1.2],
|
||||
[libtorrent-rasterbar >= 1.2.11],
|
||||
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])
|
||||
|
||||
PKG_CHECK_MODULES(openssl,
|
||||
[openssl >= 1.0],
|
||||
[openssl >= 1.1.1],
|
||||
[CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
|
||||
LIBS="$openssl_LIBS $LIBS"])
|
||||
|
||||
PKG_CHECK_MODULES(zlib,
|
||||
[zlib >= 1.2.5.2],
|
||||
[zlib >= 1.2.11],
|
||||
[CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
|
||||
LIBS="$zlib_LIBS $LIBS"])
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QT5],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.0],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.5],
|
||||
[PKG_CHECK_VAR(QT_QMAKE,
|
||||
[Qt5Core >= 5.9.0],
|
||||
[Qt5Core >= 5.9.5],
|
||||
[host_bins])
|
||||
])
|
||||
|
||||
@ -18,7 +18,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
|
||||
[QT_QMAKE=""])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.0])
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.5])
|
||||
AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
[AC_MSG_RESULT([$QT_QMAKE])],
|
||||
[AC_MSG_RESULT([not found])]
|
||||
@ -29,8 +29,8 @@ AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
# Sets the HAVE_QTDBUS variable to true or false.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QTDBUS],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.0])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.0],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.5])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.5],
|
||||
[AC_MSG_RESULT([found])
|
||||
HAVE_QTDBUS=[true]],
|
||||
[AC_MSG_RESULT([not found])
|
||||
|
@ -1,12 +1,12 @@
|
||||
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
find_package(LibtorrentRasterbar QUIET ${requiredLibtorrentVersion} COMPONENTS torrent-rasterbar)
|
||||
find_package(LibtorrentRasterbar QUIET ${minLibtorrentVersion} COMPONENTS torrent-rasterbar)
|
||||
if (NOT LibtorrentRasterbar_FOUND)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${requiredLibtorrentVersion}")
|
||||
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${minLibtorrentVersion}")
|
||||
if (NOT LIBTORRENT_RASTERBAR_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Package LibtorrentRasterbar >= ${requiredLibtorrentVersion} not found"
|
||||
"Package LibtorrentRasterbar >= ${minLibtorrentVersion} not found"
|
||||
" with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing"
|
||||
" a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar"
|
||||
" to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc"
|
||||
@ -18,9 +18,9 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
# force a fake package to show up in the feature summary
|
||||
set_property(GLOBAL APPEND PROPERTY
|
||||
PACKAGES_FOUND
|
||||
"LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
|
||||
"LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
|
||||
)
|
||||
set_package_properties("LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
|
||||
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
|
||||
PROPERTIES
|
||||
TYPE REQUIRED
|
||||
)
|
||||
@ -28,16 +28,16 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
|
||||
endif()
|
||||
else()
|
||||
find_package(LibtorrentRasterbar ${requiredLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
|
||||
find_package(LibtorrentRasterbar ${minLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
|
||||
endif()
|
||||
# force variable type so that it always shows up in ccmake/cmake-gui frontends
|
||||
set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
|
||||
find_package(Boost ${requiredBoostVersion} REQUIRED)
|
||||
find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED)
|
||||
find_package(ZLIB ${requiredZlibVersion} REQUIRED)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
|
||||
find_package(Boost ${minBoostVersion} REQUIRED)
|
||||
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
|
||||
find_package(ZLIB ${minZlibVersion} REQUIRED)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
|
||||
if (DBUS)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS DBus)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS DBus)
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
|
||||
PURPOSE "Required by the DBUS feature"
|
||||
@ -60,11 +60,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectory(base)
|
||||
|
||||
if (GUI)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Widgets Svg)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Widgets Svg)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS MacExtras)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS MacExtras)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS WinExtras)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS WinExtras)
|
||||
endif()
|
||||
add_subdirectory(gui)
|
||||
endif()
|
||||
|
@ -347,11 +347,7 @@ Session::Session(QObject *parent)
|
||||
, m_hashingThreads(BITTORRENT_SESSION_KEY("HashingThreadsCount"), 2)
|
||||
, m_filePoolSize(BITTORRENT_SESSION_KEY("FilePoolSize"), 40)
|
||||
, m_checkingMemUsage(BITTORRENT_SESSION_KEY("CheckingMemUsageSize"), 32)
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
, m_diskCacheSize(BITTORRENT_SESSION_KEY("DiskCacheSize"), -1)
|
||||
#else
|
||||
, m_diskCacheSize(BITTORRENT_SESSION_KEY("DiskCacheSize"), 64)
|
||||
#endif
|
||||
, m_diskCacheTTL(BITTORRENT_SESSION_KEY("DiskCacheTTL"), 60)
|
||||
, m_useOSCache(BITTORRENT_SESSION_KEY("UseOSCache"), true)
|
||||
#ifdef Q_OS_WIN
|
||||
@ -381,11 +377,7 @@ Session::Session(QObject *parent)
|
||||
, m_includeOverheadInLimits(BITTORRENT_SESSION_KEY("IncludeOverheadInLimits"), false)
|
||||
, m_announceIP(BITTORRENT_SESSION_KEY("AnnounceIP"))
|
||||
, m_maxConcurrentHTTPAnnounces(BITTORRENT_SESSION_KEY("MaxConcurrentHTTPAnnounces"), 50)
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
, m_stopTrackerTimeout(BITTORRENT_SESSION_KEY("StopTrackerTimeout"), 5)
|
||||
#else
|
||||
, m_stopTrackerTimeout(BITTORRENT_SESSION_KEY("StopTrackerTimeout"), 1)
|
||||
#endif
|
||||
, m_maxConnections(BITTORRENT_SESSION_KEY("MaxConnections"), 500, lowerLimited(0, -1))
|
||||
, m_maxUploads(BITTORRENT_SESSION_KEY("MaxUploads"), 20, lowerLimited(0, -1))
|
||||
, m_maxConnectionsPerTorrent(BITTORRENT_SESSION_KEY("MaxConnectionsPerTorrent"), 100, lowerLimited(0, -1))
|
||||
@ -1096,9 +1088,6 @@ void Session::initializeNativeSession()
|
||||
// turn them off before `lt::session` ctor to avoid split second effects
|
||||
pack.set_bool(lt::settings_pack::enable_upnp, false);
|
||||
pack.set_bool(lt::settings_pack::enable_natpmp, false);
|
||||
#if (LIBTORRENT_VERSION_NUM < 10204)
|
||||
pack.set_bool(lt::settings_pack::upnp_ignore_nonrouters, true);
|
||||
#endif
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM > 20000)
|
||||
// preserve the same behavior as in earlier libtorrent versions
|
||||
@ -1348,9 +1337,7 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
|
||||
settingsPack.set_bool(lt::settings_pack::coalesce_writes, isCoalesceReadWriteEnabled());
|
||||
#endif
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10202)
|
||||
settingsPack.set_bool(lt::settings_pack::piece_extent_affinity, usePieceExtentAffinity());
|
||||
#endif
|
||||
|
||||
settingsPack.set_int(lt::settings_pack::suggest_mode, isSuggestModeEnabled()
|
||||
? lt::settings_pack::suggest_read_cache : lt::settings_pack::no_piece_suggestions);
|
||||
@ -1387,18 +1374,14 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
|
||||
settingsPack.set_int(lt::settings_pack::outgoing_port, outgoingPortsMin());
|
||||
settingsPack.set_int(lt::settings_pack::num_outgoing_ports, outgoingPortsMax() - outgoingPortsMin() + 1);
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
settingsPack.set_int(lt::settings_pack::upnp_lease_duration, UPnPLeaseDuration());
|
||||
#endif
|
||||
|
||||
// Include overhead in transfer limits
|
||||
settingsPack.set_bool(lt::settings_pack::rate_limit_ip_overhead, includeOverheadInLimits());
|
||||
// IP address to announce to trackers
|
||||
settingsPack.set_str(lt::settings_pack::announce_ip, announceIP().toStdString());
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10207)
|
||||
// Max concurrent HTTP announces
|
||||
settingsPack.set_int(lt::settings_pack::max_concurrent_http_announces, maxConcurrentHTTPAnnounces());
|
||||
#endif
|
||||
// Stop tracker timeout
|
||||
settingsPack.set_int(lt::settings_pack::stop_tracker_timeout, stopTrackerTimeout());
|
||||
// * Max connections limit
|
||||
@ -4509,11 +4492,6 @@ void Session::handleAlert(const lt::alert *a)
|
||||
case lt::file_error_alert::alert_type:
|
||||
handleFileErrorAlert(static_cast<const lt::file_error_alert*>(a));
|
||||
break;
|
||||
#if (LIBTORRENT_VERSION_NUM < 10208)
|
||||
case lt::read_piece_alert::alert_type:
|
||||
handleReadPieceAlert(static_cast<const lt::read_piece_alert*>(a));
|
||||
break;
|
||||
#endif
|
||||
case lt::add_torrent_alert::alert_type:
|
||||
handleAddTorrentAlert(static_cast<const lt::add_torrent_alert*>(a));
|
||||
break;
|
||||
@ -4559,11 +4537,9 @@ void Session::handleAlert(const lt::alert *a)
|
||||
case lt::storage_moved_failed_alert::alert_type:
|
||||
handleStorageMovedFailedAlert(static_cast<const lt::storage_moved_failed_alert*>(a));
|
||||
break;
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||
case lt::socks5_alert::alert_type:
|
||||
handleSocks5Alert(static_cast<const lt::socks5_alert *>(a));
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (const std::exception &exc)
|
||||
@ -4650,12 +4626,6 @@ void Session::createTorrentHandle(const lt::torrent_handle &nativeHandle)
|
||||
// Torrent could have error just after adding to libtorrent
|
||||
if (torrent->hasError())
|
||||
LogMsg(tr("Torrent errored. Torrent: \"%1\". Error: %2.").arg(torrent->name(), torrent->error()), Log::WARNING);
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM < 10208)
|
||||
// Check if file(s) exist when using skip hash check
|
||||
if (nativeHandle.flags() & lt::torrent_flags::seed_mode)
|
||||
nativeHandle.read_piece(lt::piece_index_t {0});
|
||||
#endif
|
||||
}
|
||||
|
||||
void Session::handleAddTorrentAlert(const lt::add_torrent_alert *p)
|
||||
@ -4766,17 +4736,6 @@ void Session::handleFileErrorAlert(const lt::file_error_alert *p)
|
||||
m_recentErroredTorrentsTimer->start();
|
||||
}
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM < 10208)
|
||||
void Session::handleReadPieceAlert(const lt::read_piece_alert *p) const
|
||||
{
|
||||
if (p->error)
|
||||
{
|
||||
p->handle.unset_flags(lt::torrent_flags::auto_managed);
|
||||
p->handle.force_recheck();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Session::handlePortmapWarningAlert(const lt::portmap_error_alert *p)
|
||||
{
|
||||
LogMsg(tr("UPnP/NAT-PMP: Port mapping failure, message: %1").arg(QString::fromStdString(p->message())), Log::CRITICAL);
|
||||
@ -5018,7 +4977,6 @@ void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
||||
enqueueRefresh();
|
||||
}
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||
void Session::handleSocks5Alert(const lt::socks5_alert *p) const
|
||||
{
|
||||
if (p->error)
|
||||
@ -5027,4 +4985,3 @@ void Session::handleSocks5Alert(const lt::socks5_alert *p) const
|
||||
, Log::WARNING);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "sessionstatus.h"
|
||||
#include "torrentinfo.h"
|
||||
|
||||
#if ((LIBTORRENT_VERSION_NUM >= 10206) && !defined(Q_OS_WIN))
|
||||
#if !defined(Q_OS_WIN)
|
||||
#define HAS_HTTPS_TRACKER_VALIDATION
|
||||
#endif
|
||||
|
||||
@ -607,9 +607,6 @@ namespace BitTorrent
|
||||
void handleStateUpdateAlert(const lt::state_update_alert *p);
|
||||
void handleMetadataReceivedAlert(const lt::metadata_received_alert *p);
|
||||
void handleFileErrorAlert(const lt::file_error_alert *p);
|
||||
#if (LIBTORRENT_VERSION_NUM < 10208)
|
||||
void handleReadPieceAlert(const lt::read_piece_alert *p) const;
|
||||
#endif
|
||||
void handleTorrentRemovedAlert(const lt::torrent_removed_alert *p);
|
||||
void handleTorrentDeletedAlert(const lt::torrent_deleted_alert *p);
|
||||
void handleTorrentDeleteFailedAlert(const lt::torrent_delete_failed_alert *p);
|
||||
@ -625,9 +622,7 @@ namespace BitTorrent
|
||||
void handleAlertsDroppedAlert(const lt::alerts_dropped_alert *p) const;
|
||||
void handleStorageMovedAlert(const lt::storage_moved_alert *p);
|
||||
void handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert *p);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10204)
|
||||
void handleSocks5Alert(const lt::socks5_alert *p) const;
|
||||
#endif
|
||||
|
||||
void createTorrentHandle(const lt::torrent_handle &nativeHandle);
|
||||
|
||||
|
@ -447,9 +447,7 @@ void TorrentHandleImpl::removeUrlSeeds(const QVector<QUrl> &urlSeeds)
|
||||
|
||||
void TorrentHandleImpl::clearPeers()
|
||||
{
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10207)
|
||||
m_nativeHandle.clear_peers();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool TorrentHandleImpl::connectPeer(const PeerAddress &peerAddress)
|
||||
@ -1475,7 +1473,7 @@ void TorrentHandleImpl::handleTorrentResumedAlert(const lt::torrent_resumed_aler
|
||||
|
||||
void TorrentHandleImpl::handleSaveResumeDataAlert(const lt::save_resume_data_alert *p)
|
||||
{
|
||||
if (p && !m_hasMissingFiles)
|
||||
if (!m_hasMissingFiles)
|
||||
{
|
||||
// Update recent resume data
|
||||
m_ltAddTorrentParams = p->params;
|
||||
@ -1505,7 +1503,7 @@ void TorrentHandleImpl::handleSaveResumeDataAlert(const lt::save_resume_data_ale
|
||||
|
||||
// TODO: The following code is deprecated. Remove after several releases in 4.3.x.
|
||||
// === BEGIN DEPRECATED CODE === //
|
||||
const bool useDummyResumeData = !p;
|
||||
const bool useDummyResumeData = !hasMetadata();
|
||||
if (useDummyResumeData)
|
||||
{
|
||||
updateStatus();
|
||||
@ -1536,11 +1534,7 @@ void TorrentHandleImpl::handleSaveResumeDataAlert(const lt::save_resume_data_ale
|
||||
void TorrentHandleImpl::handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p)
|
||||
{
|
||||
Q_UNUSED(p);
|
||||
|
||||
// if torrent has no metadata libtorrent doesn't generate "fastresume" data
|
||||
// so we should save dummy "fastresume" data containing the values used to
|
||||
// load torrent and qBittorrent own resume data
|
||||
handleSaveResumeDataAlert(nullptr);
|
||||
Q_ASSERT_X(false, Q_FUNC_INFO, "This point should be unreachable since libtorrent 1.2.11");
|
||||
}
|
||||
|
||||
void TorrentHandleImpl::handleFastResumeRejectedAlert(const lt::fastresume_rejected_alert *p)
|
||||
|
@ -102,9 +102,7 @@ namespace
|
||||
#if (LIBTORRENT_VERSION_NUM < 20000)
|
||||
COALESCE_RW,
|
||||
#endif
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10202)
|
||||
PIECE_EXTENT_AFFINITY,
|
||||
#endif
|
||||
SUGGEST_MODE,
|
||||
SEND_BUF_WATERMARK,
|
||||
SEND_BUF_LOW_WATERMARK,
|
||||
@ -113,9 +111,7 @@ namespace
|
||||
SOCKET_BACKLOG_SIZE,
|
||||
OUTGOING_PORT_MIN,
|
||||
OUTGOING_PORT_MAX,
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
UPNP_LEASE_DURATION,
|
||||
#endif
|
||||
UTP_MIX_MODE,
|
||||
MULTI_CONNECTIONS_PER_IP,
|
||||
#ifdef HAS_HTTPS_TRACKER_VALIDATION
|
||||
@ -129,9 +125,7 @@ namespace
|
||||
ANNOUNCE_ALL_TRACKERS,
|
||||
ANNOUNCE_ALL_TIERS,
|
||||
ANNOUNCE_IP,
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10207)
|
||||
MAX_CONCURRENT_HTTP_ANNOUNCES,
|
||||
#endif
|
||||
STOP_TRACKER_TIMEOUT,
|
||||
PEER_TURNOVER,
|
||||
PEER_TURNOVER_CUTOFF,
|
||||
@ -210,10 +204,8 @@ void AdvancedSettings::saveAdvancedSettings()
|
||||
// Coalesce reads & writes
|
||||
session->setCoalesceReadWriteEnabled(m_checkBoxCoalesceRW.isChecked());
|
||||
#endif
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10202)
|
||||
// Piece extent affinity
|
||||
session->setPieceExtentAffinity(m_checkBoxPieceExtentAffinity.isChecked());
|
||||
#endif
|
||||
// Suggest mode
|
||||
session->setSuggestMode(m_checkBoxSuggestMode.isChecked());
|
||||
// Send buffer watermark
|
||||
@ -227,10 +219,8 @@ void AdvancedSettings::saveAdvancedSettings()
|
||||
// Outgoing ports
|
||||
session->setOutgoingPortsMin(m_spinBoxOutgoingPortsMin.value());
|
||||
session->setOutgoingPortsMax(m_spinBoxOutgoingPortsMax.value());
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
// UPnP lease duration
|
||||
session->setUPnPLeaseDuration(m_spinBoxUPnPLeaseDuration.value());
|
||||
#endif
|
||||
// uTP-TCP mixed mode
|
||||
session->setUtpMixedMode(static_cast<BitTorrent::MixedModeAlgorithm>(m_comboBoxUtpMixedMode.currentIndex()));
|
||||
// multiple connections per IP
|
||||
@ -270,10 +260,8 @@ void AdvancedSettings::saveAdvancedSettings()
|
||||
// Construct a QHostAddress to filter malformed strings
|
||||
const QHostAddress addr(m_lineEditAnnounceIP.text().trimmed());
|
||||
session->setAnnounceIP(addr.toString());
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10207)
|
||||
// Max concurrent HTTP announces
|
||||
session->setMaxConcurrentHTTPAnnounces(m_spinBoxMaxConcurrentHTTPAnnounces.value());
|
||||
#endif
|
||||
// Stop tracker timeout
|
||||
session->setStopTrackerTimeout(m_spinBoxStopTrackerTimeout.value());
|
||||
// Program notification
|
||||
@ -488,11 +476,9 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
addRow(COALESCE_RW, (tr("Coalesce reads & writes") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#coalesce_reads", "(?)"))
|
||||
, &m_checkBoxCoalesceRW);
|
||||
#endif
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10202)
|
||||
// Piece extent affinity
|
||||
m_checkBoxPieceExtentAffinity.setChecked(session->usePieceExtentAffinity());
|
||||
addRow(PIECE_EXTENT_AFFINITY, (tr("Use piece extent affinity") + ' ' + makeLink("https://libtorrent.org/single-page-ref.html#piece_extent_affinity", "(?)")), &m_checkBoxPieceExtentAffinity);
|
||||
#endif
|
||||
// Suggest mode
|
||||
m_checkBoxSuggestMode.setChecked(session->isSuggestModeEnabled());
|
||||
addRow(SUGGEST_MODE, (tr("Send upload piece suggestions") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#suggest_mode", "(?)"))
|
||||
@ -544,7 +530,6 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
addRow(OUTGOING_PORT_MAX, (tr("Outgoing ports (Max) [0: Disabled]")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#outgoing_port", "(?)"))
|
||||
, &m_spinBoxOutgoingPortsMax);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10206)
|
||||
// UPnP lease duration
|
||||
m_spinBoxUPnPLeaseDuration.setMinimum(0);
|
||||
m_spinBoxUPnPLeaseDuration.setMaximum(std::numeric_limits<int>::max());
|
||||
@ -552,7 +537,6 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
m_spinBoxUPnPLeaseDuration.setSuffix(tr(" s", " seconds"));
|
||||
addRow(UPNP_LEASE_DURATION, (tr("UPnP lease duration [0: Permanent lease]") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#upnp_lease_duration", "(?)"))
|
||||
, &m_spinBoxUPnPLeaseDuration);
|
||||
#endif
|
||||
// uTP-TCP mixed mode
|
||||
m_comboBoxUtpMixedMode.addItems({tr("Prefer TCP"), tr("Peer proportional (throttles TCP)")});
|
||||
m_comboBoxUtpMixedMode.setCurrentIndex(static_cast<int>(session->utpMixedMode()));
|
||||
@ -621,13 +605,11 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
addRow(ANNOUNCE_IP, (tr("IP Address to report to trackers (requires restart)")
|
||||
+ ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#announce_ip", "(?)"))
|
||||
, &m_lineEditAnnounceIP);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 10207)
|
||||
// Max concurrent HTTP announces
|
||||
m_spinBoxMaxConcurrentHTTPAnnounces.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxMaxConcurrentHTTPAnnounces.setValue(session->maxConcurrentHTTPAnnounces());
|
||||
addRow(MAX_CONCURRENT_HTTP_ANNOUNCES, (tr("Max concurrent HTTP announces") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_concurrent_http_announces", "(?)"))
|
||||
, &m_spinBoxMaxConcurrentHTTPAnnounces);
|
||||
#endif
|
||||
// Stop tracker timeout
|
||||
m_spinBoxStopTrackerTimeout.setValue(session->stopTrackerTimeout());
|
||||
m_spinBoxStopTrackerTimeout.setSuffix(tr(" s", " seconds"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user