Update for qBittorrent 4.2

Michał 2019-12-13 21:57:11 +01:00
parent 9b188b7940
commit 9158cebe9a
2 changed files with 72 additions and 61 deletions

@ -0,0 +1,72 @@
This how-to will guide you though the compilation of qBittorrent and libtorrent-rasterbar.<br />
This guide is written for CentOS 7.x, but the process should be similar for other RHEL distributions.
== Required dependencies ==
* General required dependencies
sudo yum groupinstall "Development Tools"
sudo yum install devtoolset-8-gcc devtoolset-8-gcc-c++
sudo yum install qt-devel openssl-devel qt5-qtbase-devel qt5-linguist
* Boost
[https://www.boost.org/users/download/ Download] latest version of Boost. (Actually 1.72.0)<br /><br />
wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
* Qt libraries
qBittorrent 4.0 - 4.1.x requires at least Qt 5.5.1, and qBittorrent 4.2 and later requires at least Qt 5.9.<br /><br />
Check installed version:
rpm -qa | grep qt5-qtbase
qt5-qtbase-common-5.9.7-2.el7.noarch
qt5-qtbase-gui-5.9.7-2.el7.x86_64
qt5-qtbase-5.9.7-2.el7.x86_64
qt5-qtbase-devel-5.9.7-2.el7.x86_64
* Libtorrent
[https://libtorrent.org/ Libtorrent] is a library written by Arvid Norberg that qBittorrent depends on. It is necessary to compile and install libtorrent before compiling qBittorrent.
== Boost ==
Change devtoolsset if you didn't do that already
scl enable devtoolset-8 bash
Compile:
export DIR_BOOST="/opt/boost"
tar -xvf boost_1_72_0.tar.gz
cd boost_1_72_0
./bootstrap.sh --prefix=${DIR_BOOST}
./b2 install --prefix=${DIR_BOOST} --with=all -j$(( $(nproc) - 1 ))
== Libtorrent ==
Change devtoolsset if you didn't do that already
scl enable devtoolset-8 bash
Clone from the repository:
git clone --depth 1 -b RC_1_2 https://github.com/arvidn/libtorrent.git
Compile:
cd libtorrent
./autotool.sh
./configure --disable-debug --enable-encryption --prefix=/usr --with-boost=${DIR_BOOST} CXXFLAGS=--std=c++14
make -j$(( $(nproc) - 1 ))
make install
== Compiling qBittorrent (without the GUI) ==
First, obtain the qBittorrent source code.<br />
Either download and extract a .tar archive from [https://sourceforge.net/projects/qbittorrent/files/qbittorrent/ Sourceforge] or clone the git repository:
git clone --depth 1 -b v4_2_x https://github.com/qbittorrent/qBittorrent
Compile:
cd qBittorrent
./configure --prefix=/usr --disable-gui CPPFLAGS=-I/usr/include/qt5 --with-boost=${DIR_BOOST} CXXFLAGS=--std=c++14
make -j$(( $(nproc) - 1 ))
make install
Since you disabled the graphical user interface, qBittorrent can only be controlled via its WebUI. If you haven't disabled authentication, as a default, you can access it at:
http://localhost:8080
Username: admin
Password: adminadmin
A documentation about running qBittorrent without GUI is available [[Running-qBittorrent-without-X-server|here]].
To set up qbittorrent as a deamon see [https://github.com/qbittorrent/qBittorrent/wiki/Setting-up-qBittorrent-as-a-daemon-on-CentOS-7 this guide] or just run
qbittorrent-nox

@ -1,61 +0,0 @@
After stumbling for about 2 hours _(getting Qt5 to work)_ here is the how to build qbittorrent as per:
**Update for Qt5**
* https://github.com/qbittorrent/qBittorrent/releases/tag/release-4.0.3
* CentOS 7 x64
* 2018-01-04 (Jan 4th)
Install Dependencies (make sure you have epel repo enabled)
```
yum -y groupinstall "Development Tools"
yum -y install qt-devel boost-devel openssl-devel qt5-qtbase-devel qt5-linguist
```
Grab latest libtorrent release
* libtorrent-1.1.6 at the time of last update
> https://github.com/arvidn/libtorrent/releases check for updates and replace as needed
```
wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1_9/libtorrent-rasterbar-1.1.9.tar.gz
tar -zxf libtorrent-rasterbar-1.1.9.tar.gz
cd libtorrent-rasterbar-1.1.9
./configure --prefix=/usr CXXFLAGS=-std=c++11
make
make install
ln -s /usr/lib/pkgconfig/libtorrent-rasterbar.pc /usr/lib64/pkgconfig/libtorrent-rasterbar.pc
ln -s /usr/lib/libtorrent-rasterbar.so.9 /usr/lib64/libtorrent-rasterbar.so.9
```
Grab latest qbittorrent
```
cd
git clone https://github.com/qbittorrent/qBittorrent.git (or git pull if already cloned)
cd qBittorrent
./configure --prefix=/usr --disable-gui CPPFLAGS=-I/usr/include/qt5
make
make install
cd
```
***
**Don't do this if you have a working config file ie. you are upgrading**
```
mkdir -p ~/.config/qBittorrent
cat > ~/.config/qBittorrent/qBittorrent.conf <<- EOM
[Preferences]
WebUI\Enabled=true
EOM
```
***
To set up qbittorrent as a deamon see: https://github.com/qbittorrent/qBittorrent/wiki/Setting-up-qBittorrent-as-a-daemon-on-CentOS-7
or else just run `qbittorrent-nox`
>Kudos to @SoreGums
>ref for qmake bug on centos: https://github.com/qbittorrent/qBittorrent/issues/4197#issuecomment-160654335