From 07c8c7913bcd8c3faadbe7749ab021527f9237b7 Mon Sep 17 00:00:00 2001 From: Francisco Pombal Date: Tue, 8 Sep 2020 02:29:05 +0100 Subject: [PATCH] improve libtorrent installation instructions. --- Compilation:-Debian-and-Ubuntu.md | 50 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/Compilation:-Debian-and-Ubuntu.md b/Compilation:-Debian-and-Ubuntu.md index 9a52a4a..fa1b154 100644 --- a/Compilation:-Debian-and-Ubuntu.md +++ b/Compilation:-Debian-and-Ubuntu.md @@ -77,7 +77,7 @@ git clone https://github.com/arvidn/libtorrent.git cd libtorrent ``` -To compile, first choose the appropriate `git` and compile commands in the table below, according to the version of `libtorrent` you need: +To compile, first choose the appropriate `git` and compile commands in the table below, according to the version of `libtorrent` you need, then run them: @@ -85,32 +85,34 @@ To compile, first choose the appropriate `git` and compile commands in the table - + - + + - +./configure --disable-debug --enable-encryption CXXFLAGS="-std=c++14" +make clean && make -j$(nproc) + - +./configure --disable-debug --enable-encryption +make clean && make -j$(nproc) @@ -122,25 +124,27 @@ cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../.. (*) Technically, the 4.2.x releases actually support the 1.1.x `libtorrent` series, but it is just life support and not properly tested/developed. -Now you're ready to compile: - -```bash -make clean && make -j$(nproc) -``` - Finally, you can install `libtorrent`. -If you have `checkinstall`, the following command will generate and install a `.deb` package that can be tracked and managed by your package manager: +- If building with CMake: -```bash -sudo checkinstall --nodoc --backup=no --deldesc --pkgname libtorrent-rasterbar --pkgversion 1.x.x-source-compile # change the version to your liking -``` + `sudo cmake --install cmake-build-dir/release` -Alternatively, the traditional way will do just fine: + This generates an `install_manifest.txt` file in the build folder that can later be used to uninstall all installed files with `sudo xargs rm < install_manifest.txt`. The default installation prefix is `/usr/local`, as expected. -```bash -sudo make install -``` +- If building with `autotools`: + + If you have `checkinstall`, the following command will generate and install a `.deb` package that can be tracked and managed by your package manager: + + ```bash + sudo checkinstall --nodoc --backup=no --deldesc --pkgname libtorrent-rasterbar --pkgversion 1.x.x-source-compile # change the version to your liking + ``` + + Alternatively, the traditional way will do just fine (but there is no tracking of the installed files): + + ```bash + sudo make install + ``` For more information on building libtorrent, see [libtorrent downloading and building](https://www.libtorrent.org/building.html).

libtorrent version series

qBittorrent version support

git command (example with most recent tag in series at the time of writing)

Compile commands (after running the git command, choose between using autotools or CMake)

Compile commands - after running the git command, choose between using CMake (recommended) or autotools


autotools

CMake

autotools

1.2.x

>= 4.2.0

git checkout libtorrent-1_2_5
cmake -B cmake-build-dir/release -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14
+cmake --build cmake-build-dir/release
./autotool.sh
-./configure --disable-debug --enable-encryption CXXFLAGS="-std=c++14"
mkdir -p cmake-build-dir/release && cd cmake-build-dir/release
-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -G "Unix Makefiles" ../..

1.1.x

>= 3.3.8 and <4.2.0 (*)

git checkout libtorrent-1_1_14
cmake -B cmake-build-dir/release -DCMAKE_BUILD_TYPE=Release
+cmake --build cmake-build-dir/release
./autotool.sh
-./configure --disable-debug --enable-encryption
mkdir -p cmake-build-dir/release && cd cmake-build-dir/release
-cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../..

1.0.x