1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-09 18:32:15 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
sledgehammer999
b9164adb7a Bump to 4.4.0 2022-01-06 20:41:17 +02:00
1285 changed files with 168042 additions and 241337 deletions

View File

@@ -51,14 +51,8 @@ before_build:
build_script:
- cd "%REPO_DIR%"
# lupdate chokes when it parses headers from system inludes, especially Boost
# it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
# Workaround: temporarily rename them to run lupdate with the .pro file
- RENAME conf.pri conf.pri.temp
- RENAME src\app\qtlocalpeer qtlocalpeer.temp
- lupdate qbittorrent.pro
- RENAME conf.pri.temp conf.pri
- RENAME src\app\qtlocalpeer.temp qtlocalpeer
# scan only as lupdate is prone to hang
- lupdate -extensions c,cpp,h,hpp,ui .
- qmake qbittorrent.pro && cd src && qmake src.pro
- jom -j2 -f Makefile.Release

8
.gitattributes vendored
View File

@@ -1,7 +1,7 @@
core.eol=lf
* text eol=lf
*.icns binary
*.ico binary
*.png binary
*.qm binary
*.zip binary
*.png binary
*.ico binary
*.qm binary
*.icns binary

View File

@@ -14,7 +14,7 @@ body:
#### Prerequisites before submitting an issue!
- Read the issue reporting section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good bug report with the required information.
- Verify that the issue is not fixed and is reproducible in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (currently only on **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Check the **[frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues)** to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.

View File

@@ -2,22 +2,16 @@ name: CI - File health
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Install tools
uses: actions/setup-python@v4
with:
python-version: "*"
uses: actions/setup-python@v2
- name: Check files
uses: pre-commit/action@v3.0.0
uses: pre-commit/action@v2.0.3

View File

@@ -1,11 +1,6 @@
name: CI - macOS
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
@@ -14,48 +9,36 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.8", "1.2.18"]
libt_version: ["2.0.5", "1.2.15"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["5.15.2", "6.4.0"]
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.18"
qt_version: "6.4.0"
- libt_version: "1.2.15"
qt_version: "6.2.0"
env:
boost_path: "${{ github.workspace }}/../boost"
openssl_root: /usr/local/opt/openssl@1.1
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Install dependencies
run: |
brew update > /dev/null
brew install \
cmake ninja \
openssl@1.1 zlib
boost openssl@1.1 zlib
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
- name: Install boost
run: |
curl \
-L \
-o "${{ runner.temp }}/boost.tar.bz2" \
"https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2"
tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
archives: qtbase qtdeclarative qtsvg qttools
# Not sure why Qt made a hard dependency on qtdeclarative, try removing it when Qt > 6.4.0
- name: Install libtorrent
run: |
@@ -71,7 +54,6 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
cmake --build build
@@ -80,50 +62,43 @@ jobs:
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQT6=ON \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Prepare build artifacts
run: |
mkdir upload
mv build/qbittorrent*.app upload
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with:
name: build-info_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -1,29 +1,24 @@
name: CI - Ubuntu
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.8", "1.2.18"]
libt_version: ["2.0.5", "1.2.15"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.18"
- libt_version: "1.2.15"
qt_version: "6.2.0"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Install dependencies
run: |
@@ -40,10 +35,9 @@ jobs:
max_size=2G
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
@@ -65,38 +59,32 @@ jobs:
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DQT6=ON \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Prepare build artifacts
@@ -108,7 +96,7 @@ jobs:
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with:
name: build-info_ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
name: build-info_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -2,10 +2,6 @@ name: CI - WebUI
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
@@ -17,10 +13,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Setup nodejs
uses: actions/setup-node@v3
uses: actions/setup-node@v2
with:
node-version: 'lts/*'

View File

@@ -1,11 +1,6 @@
name: CI - Windows
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
@@ -14,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.8", "1.2.18"]
libt_version: ["2.0.5", "1.2.15"]
env:
boost_path: "${{ github.workspace }}/../boost"
@@ -22,7 +17,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Setup devcmd
uses: ilammy/msvc-dev-cmd@v1
@@ -34,10 +29,11 @@ jobs:
# use the preinstalled vcpkg from image
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management
- name: Setup vcpkg
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@v7
with:
vcpkgDirectory: C:/vcpkg
doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
setupOnly: true
- name: Install dependencies from vcpkg
run: |
@@ -67,17 +63,16 @@ jobs:
- name: Install boost
run: |
aria2c `
"https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.7z" `
"https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.7z" `
-d "${{ runner.temp }}" `
-o "boost.7z"
7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v2
with:
version: "6.4.0"
archives: qtbase qtsvg qttools
version: "5.15.2"
- name: Install libtorrent
run: |
@@ -91,7 +86,6 @@ jobs:
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS=/guard:cf `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
@@ -105,24 +99,20 @@ jobs:
- name: Build qBittorrent
run: |
lupdate -extensions c,cpp,h,hpp,ui .
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS="/WX" `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=OFF `
-DQT6=ON `
-DTESTING=ON `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
-DVERBOSE_CONFIGURE=ON `
--graphviz=build/target_graph.dot
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Prepare build artifacts
run: |
@@ -131,24 +121,25 @@ jobs:
copy build/qbittorrent.pdb upload
copy dist/windows/qt.conf upload
# runtimes
copy "${{ env.Qt6_DIR }}/bin/Qt6Core.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Gui.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Network.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Sql.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Svg.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Widgets.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Xml.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Core.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Gui.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Network.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Sql.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Svg.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Widgets.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5WinExtras.dll" upload
copy "${{ env.Qt5_DIR }}/bin/Qt5Xml.dll" upload
mkdir upload/plugins/iconengines
copy "${{ env.Qt6_DIR }}/plugins/iconengines/qsvgicon.dll" upload/plugins/iconengines
copy "${{ env.Qt5_DIR }}/plugins/iconengines/qsvgicon.dll" upload/plugins/iconengines
mkdir upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qico.dll" upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qsvg.dll" upload/plugins/imageformats
copy "${{ env.Qt5_DIR }}/plugins/imageformats/qico.dll" upload/plugins/imageformats
copy "${{ env.Qt5_DIR }}/plugins/imageformats/qsvg.dll" upload/plugins/imageformats
mkdir upload/plugins/platforms
copy "${{ env.Qt6_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
copy "${{ env.Qt5_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
mkdir upload/plugins/sqldrivers
copy "${{ env.Qt6_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
copy "${{ env.Qt5_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
mkdir upload/plugins/styles
copy "${{ env.Qt6_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
copy "${{ env.Qt5_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
# cmake additionals
mkdir upload/cmake
copy build/compile_commands.json upload/cmake
@@ -157,7 +148,7 @@ jobs:
copy libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
path: upload

View File

@@ -8,11 +8,10 @@ on:
jobs:
coverity_scan:
name: Scan
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Install dependencies
run: |
@@ -22,15 +21,14 @@ jobs:
libboost-dev libssl-dev zlib1g-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v2
with:
version: "6.4.0"
archives: icu qtbase qtsvg qttools
version: "5.15.2"
- name: Install libtorrent
run: |
git clone \
--branch "v2.0.8" \
--branch "v2.0.5" \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
@@ -60,7 +58,6 @@ jobs:
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=ON \
-DQT6=ON \
-DVERBOSE_CONFIGURE=ON
export PATH="$(pwd)/coverity_tool/bin:$PATH"
cov-build --dir cov-int cmake --build build

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark and close stale PRs
uses: actions/stale@v5
uses: actions/stale@v4
with:
stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
close-pr-message: "This PR was closed because it has been stalled for some time with no activity."

View File

@@ -5,15 +5,11 @@ repos:
name: Check newline characters in <translation> tag
entry: .github/workflows/check_translation_tag.py
language: script
exclude: |
(?x)^(
src/lang/.*
)$
types_or:
- ts
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.3.0
rev: v4.0.1
hooks:
- id: check-json
name: Check JSON files

View File

@@ -3,7 +3,7 @@ host = https://www.transifex.com
[qbittorrent.qbittorrent_master]
file_filter = src/lang/qbittorrent_<lang>.ts
lang_map = pt: pt_PT, zh: zh_CN
lang_map = pt: pt_PT
source_file = src/lang/qbittorrent_en.ts
source_lang = en
type = QT
@@ -19,7 +19,7 @@ mode = developer
[qbittorrent.qbittorrent_webui]
file_filter = src/webui/www/translations/webui_<lang>.ts
lang_map = pt: pt_PT, zh: zh_CN
lang_map = pt: pt_PT
source_file = src/webui/www/translations/webui_en.ts
source_lang = en
type = QT

87
AUTHORS
View File

@@ -29,8 +29,16 @@ Code from other projects:
copyright: Dan Haim <negativeiq@users.sourceforge.net>
license: BSD
* file src/app/stacktrace.h
copyright: Timo Bingmann from http://idlebox.net/
license: WTFPL v2.0
* file src/app/stacktrace_win.h
copyright: Quassel Project
license: GPLv2/3
Images Authors:
* files: src/icons/qbittorrent-tray.svg
* files: src/icons/skin/qbittorrent-tray.svg (and related pngs)
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
license: GPLv2+
@@ -38,53 +46,56 @@ Images Authors:
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
license: GPLv3+
* files: src/icons/flags/*.svg
copyright: lipis/flag-icons
license: MIT
url: https://github.com/lipis/flag-icons/
* files: src/icons/*.png
copyright: Gnome Icon Theme
license: GPLv2
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
* file: src/webui/www/private/images/tabs.gif
* files: src/oxygen/*.png
copyright: Oxygen Icon Theme (KDE)
license: LGPL
url: http://www.oxygen-icons.org
* files: src/icons/flags/*.svg
copyright: lipis/flag-icon-css
license: MIT
url: https://github.com/lipis/flag-icon-css/
* files: src/icons/skin/*.png
files: src/menuicons/YYxYY/*.png
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
license: GPLv2
* file: src/icons/tabs.gif
copyright: Greg Houston <gregory.houston@gmail.com>
license: MIT
* file: src/icons/qbittorrent-tray-dark.svg src/icons/qbittorrent-tray-light.svg
* file: src/icons/skin/qbittorrent_mono*
copyright: Daniel Eguren <deguren@gmail.com>
modified by: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: LGPL
* folder: src/icons/
files: application-rss+xml.svg, application-x-mswinurl.svg, connected.svg, disconnected.svg, checked-completed.svg, configure.svg,
edit-copy.svg, edit-rename.svg, folder-documents.svg, folder-new.svg, folder-remote.svg, go-bottom.svg, go-down.svg, go-top.svg,
go-up.svg, hash.svg, inode-directory.svg, insert-link.svg, kt-magnet.svg, media-playback-pause.svg, media-playback-start.svg,
media-seek-forward.svg, network-connect.svg, object-locked.svg, queued.svg, ratio.svg, reannounce.svg, slow_off.svg, slow.svg,
speedometer.svg, system-log-out.svg, tags.svg, task-complete.svg, task-reject.svg, tracker-error.svg, tracker-warning.svg,
trackerless.svg, trackers.svg, view-categories.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
license: GPLv3+
* file: src/search_engine/engines/btjunkie.png
copyright: Downloaded from btjunkie.org
* folder: src/icons/
files: application-exit.svg, collapse.svg, dialog-warning.svg, edit-find-user.svg, edit-find.svg, filter-all.svg, firewalled.svg,
help-about.svg, help-contents.svg, ip-blocked.svg, list-remove.svg, loading.svg, mail-folder-inbox.svg, name.svg, network-server.svg,
office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg, preferences-system-network.svg, security-high.svg,
security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg, user-group-new.svg, view-preview.svg, view-refresh.svg,
view-statistics.svg, wallet-open.svg, webuiapplication-exit.svg, collapse.svg, dialog-warning.svg, edit-find-user.svg, edit-find.svg,
filter-all.svg, firewalled.svg, help-about.svg, help-contents.svg, ip-blocked.svg, list-remove.svg, loading.svg, mail-folder-inbox.svg,
name.svg, network-server.svg, office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg,
preferences-system-network.svg, security-high.svg, security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg,
user-group-new.svg, view-preview.svg, view-refresh.svg, view-statistics.svg, wallet-open.svg, webui.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
license: MIT
* file: src/search_engine/engines/isohunt.png
copyright: Downloaded from isohunt.com
* folder: src/icons/
files: force-recheck.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
license: CC BY 4.0 License
* file: src/search_engine/engines/mininova.png
copyright: Downloaded from mininova.org
* folder: src/icons/
files: downloading.svg, edit-clear.svg, error.svg, filter-active.svg, filter-inactive.svg, filter-stalled.svg, kt-set-max-download-speed.svg,
kt-set-max-upload-speed.svg, list-add.svg, preferences-web-browser-cookies.svg, stalledDL.svg, stalledUP.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: BSD 2-Clause License
* file: src/search_engine/engines/piratebay.png
copyright: Downloaded from thepiratebay.org
* file: src/search_engine/engines/torrentreactor.png
copyright: Downloaded from torrentreactor.net
* file: src/icons/oxygen/checked.png
copyright: Victor Buinsky <allok.victor@gmail.com>
* file: src/icons/skin/ratio.png
copyright: Fatcow Web Hosting
license: Creative Commons Attribution 3.0 License
url: http://www.fatcow.com/free-icons
Translations authors:
* files: src/lang/*.ts

View File

@@ -1,65 +1,67 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default to NEW
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
project(qBittorrent
DESCRIPTION "The qBittorrent BitTorrent client"
HOMEPAGE_URL "https://www.qbittorrent.org/"
LANGUAGES CXX
)
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
# version requirements - older versions may work, but you are on your own
set(minBoostVersion 1.71)
set(minBoostVersion 1.65)
set(minQt5Version 5.15.2)
set(minQt6Version 6.2)
set(minOpenSSLVersion 1.1.1)
set(minLibtorrent1Version 1.2.18)
set(minLibtorrentVersion 2.0.8)
set(minLibtorrent1Version 1.2.14)
set(minLibtorrentVersion 2.0.4)
set(minZlibVersion 1.2.11)
# features (some are platform-specific)
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
include(FeatureSummary)
include(FeatureOptionsSetup)
# features, list is loosely sorted by user's interests
feature_option(QT6 "Use Qt6" OFF)
feature_option(STACKTRACE "Enable stacktraces" ON)
feature_option(GUI "Build GUI application" ON)
feature_option(WEBUI "Enable built-in HTTP server for remote control" ON)
feature_option(QT6 "Build with Qt 6 instead of Qt 5" OFF)
feature_option(STACKTRACE "Enable stacktrace support" ON)
feature_option(TESTING "Build internal testing suite" OFF)
feature_option(WEBUI "Enables built-in HTTP server for headless use" ON)
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
feature_option_dependent(DBUS
"Enable support for notifications and power-management features via D-Bus on Linux"
"Enables support for notifications and power-management features on Linux via D-Bus"
ON "GUI" OFF
)
feature_option_dependent(SYSTEMD
"Install systemd service file. Target directory is overridable with `SYSTEMD_SERVICES_INSTALL_DIR` variable"
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
OFF "NOT GUI" OFF
)
if (STACKTRACE)
check_cxx_source_compiles(
"#include <execinfo.h>
int main(){return 0;}"
QBITTORRENT_HAS_EXECINFO_H
)
if (NOT QBITTORRENT_HAS_EXECINFO_H)
message(FATAL_ERROR "execinfo.h header file not found.\n"
"Please either disable the STACKTRACE feature or use a libc that has this header file, such as glibc (GNU libc)."
)
endif()
endif()
elseif (MSVC)
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
endif()
include(GNUInstallDirs)
add_subdirectory(src)
add_subdirectory(dist)
if (VERBOSE_CONFIGURE)
feature_summary(WHAT ALL)
else()
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
endif()
# go check the packages
include(CheckPackages)
# configure for specific platform
include(CommonConfig)
# Generate version header
configure_file("src/base/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/base/version.h" @ONLY)
add_subdirectory(src)
add_subdirectory(dist)
if (TESTING)
add_subdirectory(test)
endif()

View File

@@ -1,7 +1,6 @@
# Coding Guidelines
All new code **must** follow the following coding guidelines.
All new code **must** follow the following coding guidelines. \
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes. \
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
@@ -457,8 +456,8 @@ class ExampleWidget : public QWidget
* Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // yes
i++, j--; // no
++i, --j; // Yes
i++, j--; // No
```
* private/public/protected must not be indented

View File

@@ -23,7 +23,7 @@ Read the respective section to find out more.
* **Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
* Harsh words or threats won't help your situation. Your complaint will (very likely) be **ignored.** :fearful:
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
# Submitting an issue/bug report
@@ -39,7 +39,7 @@ Developers and contributors are not supposed to deal with issues for which littl
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
Requiring people to investigate as much as possible before opening an issue avoids burdening the project with invalid issues or issues unrelated to qBittorrent.
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:

349
COPYING

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,85 +1,3 @@
Sat Nov 26 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.5.0
- FEATURE: Add `Auto resize columns` functionality (Chocobo1)
- FEATURE: Allow to use Category paths in `Manual` mode (glassez)
- FEATURE: Allow to disable Automatic mode when default "temp" path changed (glassez)
- FEATURE: Add tuning options related to performance warnings (Chocobo1)
- FEATURE: Add right click menu for status filters (An0n)
- FEATURE: Allow setting the number of maximum active checking torrents (An0n)
- FEATURE: Add option to toggle filters sidebar (AbeniMatteo)
- FEATURE: Allow to set `working set limit` on non-Windows OS (Chocobo1)
- FEATURE: Add `Export .torrent` action (Chocobo1)
- FEATURE: Add keyboard navigation keys (itlezy)
- FEATURE: Allow to use POSIX-compliant disk IO type (Coda)
- FEATURE: Add `Filter files` field in new torrent dialog (thalieht)
- FEATURE: Implement new icon/color theme (now-im, xavier2k6)
- FEATURE: Add file name filter/blacklist (mxtsdev, thalieht)
- FEATURE: Add support for custom SMTP ports (Emil M George)
- FEATURE: Split the OS cache settings into Disk IO read/write modes (summer)
- FEATURE: When duplicate torrent is added set metadata to existing one (glassez)
- FEATURE: Greatly improve startup time with many torrents (glassez, jagannatharjun)
- FEATURE: Add keyboard shortcut to Download URL dialog (Chocobo1)
- FEATURE: Add ability to run external program on torrent added (glassez)
- FEATURE: Add infohash and download path columns (tristanleboss)
- FEATURE: Allow to set torrent stop condition (glassez, thalieht)
- FEATURE: Add a `Moving` status filter (tristanleboss)
- FEATURE: Change color palettes for both dark, light themes (Chocobo1)
- FEATURE: Add a `Use proxy for hostname lookup` option (Nathan Lewis)
- FEATURE: Introduce a `change listen port` cmd option (BallsOfSpaghetti)
- FEATURE: Implement `Peer ID Client` column for `Peers` tab (Hanabishi)
- FEATURE: Add port forwarding option for embedded tracker (Chocobo1)
- BUGFIX: Store hybrid torrents using `torrent ID` as basename (glassez)
- BUGFIX: Enable Combobox editor for the `Mixed` file download priority (Aleksandr Cupacenko)
- BUGFIX: Allow shortcut folders for the Open and Save directory dialogs (Aleksandr Cupacenko)
- BUGFIX: Rename content tab `Size` column to `Total Size` (Aleksandr Cupacenko)
- BUGFIX: Fix scrolling to the lowermost visible torrent (Aleksandr Cupacenko)
- BUGFIX: Allow changing file priorities for finished torrents (An0n)
- BUGFIX: Focus save path when Manual mode is selected initially (Aleksandr Cupacenko)
- BUGFIX: Disable force reannounce when it is not possible (An0n)
- BUGFIX: Add horizontal scrolling for tracker list and torrent content (NotTsunami)
- BUGFIX: Enlarge "speed limits" icons (Chocobo1)
- BUGFIX: Change Downloaded to Times Downloaded in trackers tab (An0n)
- BUGFIX: Remove artificial max limits from `Torrent Queueing` related options (Chocobo1)
- BUGFIX: Preserve `skip hash check` when there is no metadata (glassez)
- BUGFIX: Fix DHT/PeX/LSD status when it is globally disabled (Kacper Michajłow)
- BUGFIX: Fix rate calculation when interval is too low (glassez)
- BUGFIX: Add tooltip message when system tray icon isn't available (Chocobo1)
- BUGFIX: Improve sender field in mail notifications (Dmitry Vodopyanov)
- BUGFIX: Fix "Add torrent dialog" spill-over on smaller screens (Chocobo1)
- BUGFIX: Fix peer count issue when tracker responds with zero figure (summer)
- BUGFIX: Don't merge trackers by default (glassez)
- BUGFIX: Don't inhibit system sleep/auto shutdown for torrents stuck at downloading metadata (summer)
- BUGFIX: Allow to pause a checking torrent from context menu (summer)
- BUGFIX: Allow to use subnet notation in reverse proxy list (Chocobo1)
- BUGFIX: Fine tune translations loading for Chinese locales (sledgehammer999)
- BUGFIX: Fix torrent content checkboxes not updated properly (Chocobo1)
- BUGFIX: Correctly load state of `Use another path for incomplete torrents` in Watched folders (glassez)
- BUGFIX: Add confirmation to resume/pause all (BallsOfSpaghetti)
- BUGFIX: Fix wrong count of errored trackers (Chocobo1)
- WEBUI: Allow blank lines in multipart form-data input (Aleksandr Cupacenko)
- WEBUI: Make various dialogs resizable (Chocobo1)
- WEBUI: Fix wrong v2 hash string displayed (Chocobo1)
- WEBUI: WebAPI: return correct status (Requi)
- WEBUI: Fix empty selection in language combobox (Chocobo1)
- WEBUI: Store WebUI port setting in human readable number (Chocobo1)
- WEBUI: Add support for exporting .torrent (Tom Piccirello)
- WEBUI: WebAPI: Add endpoint to set speed limit mode (glassez)
- WEBUI: Improve progress bar rendering (Mike Lei)
- WEBUI: Add transfer list refresh interval settings (summer)
- WEBUI: Use natural sort (Chocobo1)
- WEBUI: Apply i18n translation only to built-in WebUI (Chocobo1)
- WEBUI: Alert when HTTPS settings are incomplete (Chocobo1)
- WEBUI: Handle drag and drop events (Chocobo1)
- WEBUI: Fix wrong behavior for shutdown action (Chocobo1)
- WEBUI: Don't disable combobox for file priority (Chocobo1)
- RSS: Increase limit of maximum number of articles per feed (summer)
- WINDOWS: Fix `Open destination folder` delay on Windows (Andrew)
- WINDOWS: NSIS: Update Russian, Estonian, Japanese, Dutch, Portuguese BR, German and Indonesian translations (Andrei Stepanov, Priit Uring, maboroshin, Thomas De Rocker, Ícaro, schnurlos, Faisal A. F. Rahman)
- LINUX: Mark as single window app in .desktop file (Nicolas Fella)
- LINUX: Add Dockerfile (Amanuense-del-diavolo, Tom Piccirello, Chocobo1)
- LINUX: Remove option of using icons from system theme (now-im)
- MACOS: Fix wrong background color in properties widget (NotTsunami)
- OTHER: Binary distributions of qbittorrent are GPLv3+ licensed (sledgehammer999)
Thu Jan 06 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.4.0
- FEATURE: Support for v2 torrents along with libtorrent 2.0.x support (glassez, Chocobo1)
- FEATURE: Support for Qt6 (glassez)

View File

@@ -3,15 +3,15 @@ qBittorrent - A BitTorrent client in C++ / Qt
1) Install these dependencies:
- Boost >= 1.71
- Boost >= 1.65
- libtorrent-rasterbar 1.2.18 - 1.2.x || 2.0.8 - 2.0.x
- libtorrent-rasterbar 1.2.14 - 1.2.x || 2.0.4 - 2.0.x
* By Arvid Norberg, https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.1.1
- Qt 5.15.2 - 5.x || 6.2.0 - 6.x
- Qt 5.15.2 - 5.x
- zlib >= 1.2.11

4
NEWS Normal file
View File

@@ -0,0 +1,4 @@
See Changelog
*******************************************
Christophe dumez - chris@qbittorrent.org

1
TODO Normal file
View File

@@ -0,0 +1 @@
See https://blueprints.launchpad.net/qbittorrent/

View File

@@ -1,67 +0,0 @@
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
macro(find_libtorrent version)
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
find_package(LibtorrentRasterbar QUIET ${version} COMPONENTS torrent-rasterbar)
if (NOT LibtorrentRasterbar_FOUND)
include(FindPkgConfig)
pkg_check_modules(LibtorrentRasterbar IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${version}")
if (NOT LibtorrentRasterbar_FOUND)
message(
FATAL_ERROR
"Package LibtorrentRasterbar >= ${version} 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"
" file in your system's pkg-config search paths (use the system environment variable PKG_CONFIG_PATH"
" to specify additional search paths if needed)."
)
endif()
add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS PkgConfig::LibtorrentRasterbar)
# force a fake package to show up in the feature summary
set_property(GLOBAL APPEND PROPERTY
PACKAGES_FOUND
"LibtorrentRasterbar via pkg-config (version >= ${version})"
)
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${version})"
PROPERTIES
TYPE REQUIRED
)
else()
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
endif()
else()
find_package(LibtorrentRasterbar ${version} REQUIRED COMPONENTS torrent-rasterbar)
endif()
endmacro()
find_libtorrent(${minLibtorrent1Version})
if (LibtorrentRasterbar_FOUND AND (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL 2.0))
find_libtorrent(${minLibtorrentVersion})
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 ${minBoostVersion} REQUIRED)
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
find_package(ZLIB ${minZlibVersion} REQUIRED)
if (QT6)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
if (DBUS)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS DBus)
set_package_properties(Qt6DBus PROPERTIES
DESCRIPTION "Qt6 module for inter-process communication over the D-Bus protocol"
PURPOSE "Required by the DBUS feature"
)
endif()
else()
find_package(Qt5 ${minQt5Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
if (DBUS)
find_package(Qt5 ${minQt5Version} 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"
)
endif()
endif()

View File

@@ -1,106 +0,0 @@
# Set platform variables and create some interface-only library targets
# that some or all other targets will link to, either directly or transitively,
# to consume common compile options/definitions
# treat value specified by the CXX_STANDARD target property as a requirement by default
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTORCC_OPTIONS --compress 9 --threshold 5)
add_library(qbt_common_cfg INTERFACE)
# Full C++ 17 support is required
# See also https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# for a breakdown of the features that CMake recognizes for each C++ standard
target_compile_features(qbt_common_cfg INTERFACE
cxx_std_17
)
target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_BEFORE=0x050f02
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>
)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_compile_definitions(qbt_common_cfg INTERFACE
_DARWIN_FEATURE_64_BIT_INODE
)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(qbt_common_cfg INTERFACE
NTDDI_VERSION=0x06010000
_WIN32_WINNT=0x0601
_WIN32_IE=0x0601
WIN32_LEAN_AND_MEAN
NOMINMAX
UNICODE
_UNICODE
)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wall
-Wextra
-Wcast-qual
-Wcast-align
-Winvalid-pch
-Woverloaded-virtual
-Wold-style-cast
-Wnon-virtual-dtor
-pedantic
-pedantic-errors
)
# Clang 11 still doesn't support -Wstrict-null-sentinel
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT)
if (SNS_SUPPORT)
target_compile_options(qbt_common_cfg INTERFACE -Wstrict-null-sentinel)
endif()
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
endif()
if (MINGW)
target_link_options(qbt_common_cfg INTERFACE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:LINKER:--dynamicbase>)
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/utf-8
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
/Zc:__cplusplus
)
target_link_options(qbt_common_cfg INTERFACE
/guard:cf
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>
)
if (MSVC_RUNTIME_DYNAMIC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif()
if (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL ${minLibtorrentVersion})
target_compile_definitions(qbt_common_cfg INTERFACE QBT_USES_LIBTORRENT2)
endif()

View File

@@ -1,25 +0,0 @@
# Return Qt translations files as list of paths
# It will return .qm files of qt/qtbase that aren't stub files.
# Requires that Qt has been found first because it depends on qmake being available
function(qbt_get_qt_translations qt_translations)
get_target_property(QT_QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION)
execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query QT_INSTALL_TRANSLATIONS
OUTPUT_VARIABLE QT_TRANSLATIONS_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
FILE(GLOB QT_TEMP_TRANSLATIONS CONFIGURE_DEPENDS
"${QT_TRANSLATIONS_DIR}/qt_??.qm"
"${QT_TRANSLATIONS_DIR}/qt_??_??.qm"
"${QT_TRANSLATIONS_DIR}/qtbase_??.qm"
"${QT_TRANSLATIONS_DIR}/qtbase_??_??.qm")
foreach(TRANSLATION ${QT_TEMP_TRANSLATIONS})
FILE(SIZE "${TRANSLATION}" translation_size)
# Consider files less than 10KB as stub translations
if (translation_size GREATER_EQUAL 10240)
list(APPEND QT_FINAL_TRANSLATIONS "${TRANSLATION}")
endif()
endforeach()
SET(${qt_translations} ${QT_FINAL_TRANSLATIONS} PARENT_SCOPE)
endfunction()

View File

@@ -0,0 +1,102 @@
# Set common variables and create some interface-only library targets
# that some or all other targets will link to, either directly or transitively,
# to consume common compile options/definitions
macro(qbt_common_config)
# treat value specified by the CXX_STANDARD target property as a requirement by default
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(qbt_common_cfg INTERFACE)
# Full C++ 17 support is required
# See also https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# for a breakdown of the features that CMake recognizes for each C++ standard
target_compile_features(qbt_common_cfg INTERFACE
cxx_std_17
)
target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_BEFORE=0x050f02
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>
)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_compile_definitions(qbt_common_cfg INTERFACE
_DARWIN_FEATURE_64_BIT_INODE
)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(qbt_common_cfg INTERFACE
NTDDI_VERSION=0x06010000
_WIN32_WINNT=0x0601
_WIN32_IE=0x0601
WIN32_LEAN_AND_MEAN
NOMINMAX
UNICODE
_UNICODE
)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wall
-Wextra
-Wcast-qual
-Wcast-align
-Winvalid-pch
-Woverloaded-virtual
-Wold-style-cast
-Wnon-virtual-dtor
-pedantic
-pedantic-errors
)
# Clang 11 still doesn't support -Wstrict-null-sentinel
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT)
if (SNS_SUPPORT)
target_compile_options(qbt_common_cfg INTERFACE -Wstrict-null-sentinel)
endif()
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
endif()
if (MINGW)
target_link_options(qbt_common_cfg INTERFACE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:LINKER:--dynamicbase>)
endif()
if (MSVC_RUNTIME_DYNAMIC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/utf-8
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
/Zc:__cplusplus
)
target_link_options(qbt_common_cfg INTERFACE
/guard:cf
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>
)
endif()
if (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL ${minLibtorrentVersion})
target_compile_definitions(qbt_common_cfg INTERFACE QBT_USES_LIBTORRENT2)
endif()
endmacro(qbt_common_config)

View File

@@ -37,8 +37,8 @@ DEFINES += BOOST_ALL_NO_LIB
# Use one of the following options
DEFINES += BOOST_SYSTEM_STATIC_LINK
#DEFINES += BOOST_SYSTEM_DYN_LINK
# Enable it if compiling with libtorrent 3.x
#DEFINES += BOOST_SYSTEM_USE_UTF8
# Enable if encountered build error with boost version <= 1.59
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
# Enable if libtorrent was built with this flag defined
#DEFINES += TORRENT_NO_DEPRECATE

127
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
AC_INIT([qbittorrent], [v4.5.0], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.4.0], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
: ${CFLAGS=""}
@@ -8,7 +8,7 @@ AC_PROG_CXX
AC_PROG_SED
AC_LANG(C++)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign])
AM_INIT_AUTOMAKE
# use compiler from env variables if available
QBT_CC="$CC"
@@ -174,7 +174,7 @@ AS_CASE(["x$enable_qt_dbus"],
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
AX_BOOST_BASE([1.71],
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])])
@@ -187,11 +187,14 @@ m4_define([DETECT_BOOST_VERSION_PROGRAM],
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
[[(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));]])])
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 2.0.8],
[libtorrent-rasterbar >= 2.0.4],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS" QBT_ADD_DEFINES="$QBT_ADD_DEFINES QBT_USES_LIBTORRENT2"],
[PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2.18 libtorrent-rasterbar < 2],
[libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"])])
PKG_CHECK_MODULES(openssl,

8
dist/docker/.env vendored
View File

@@ -1,8 +0,0 @@
# refer to Readme.md for an explanation of the variables
QBT_EULA=
QBT_VERSION=devel
QBT_WEBUI_PORT=8080
QBT_CONFIG_PATH=<your_path>/config
QBT_DOWNLOADS_PATH=<your_path>/downloads

View File

@@ -1,62 +0,0 @@
# image for building
FROM alpine:latest AS builder
ARG QBT_VERSION
# alpine linux qbittorrent package: https://git.alpinelinux.org/aports/tree/community/qbittorrent/APKBUILD
RUN \
apk --update-cache add \
boost-dev \
cmake \
g++ \
libtorrent-rasterbar-dev \
ninja \
qt6-qtbase-dev \
qt6-qttools-dev
RUN \
if [ "$QBT_VERSION" = "devel" ]; then \
wget https://github.com/qbittorrent/qBittorrent/archive/refs/heads/master.zip && \
unzip master.zip && \
cd qBittorrent-master ; \
else \
wget "https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${QBT_VERSION}.tar.gz" && \
tar -xf "release-${QBT_VERSION}.tar.gz" && \
cd "qBittorrent-release-${QBT_VERSION}" ; \
fi && \
cmake \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=OFF \
-DQT6=ON \
-DSTACKTRACE=OFF && \
cmake --build build && \
cmake --install build
# image for running
FROM alpine:latest
RUN \
apk --no-cache add \
doas \
libtorrent-rasterbar \
python3 \
qt6-qtbase \
tini
RUN \
adduser \
-D \
-H \
-s /sbin/nologin \
-u 1000 \
qbtUser && \
echo "permit nopass :root" >> "/etc/doas.d/doas.conf"
COPY --from=builder /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/sbin/tini", "-g", "--", "/entrypoint.sh"]

Some files were not shown because too many files have changed in this diff Show More