You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
108 Commits
release-5.
...
release-4.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
97853f31f2 | ||
![]() |
66ffb7328d | ||
![]() |
9d9101186d | ||
![]() |
621ec4e92f | ||
![]() |
4b752cba4f | ||
![]() |
38c0864bf2 | ||
![]() |
c21c3d2300 | ||
![]() |
3be5273246 | ||
![]() |
37e348ed92 | ||
![]() |
36364121ba | ||
![]() |
df08bd331c | ||
![]() |
abd1ab5539 | ||
![]() |
632d33b266 | ||
![]() |
35f7e1c896 | ||
![]() |
792301dfe4 | ||
![]() |
e31cf5ac23 | ||
![]() |
0bfe6ff64b | ||
![]() |
d40c7e8833 | ||
![]() |
8e81d44b3c | ||
![]() |
97a30218bc | ||
![]() |
e9884b9513 | ||
![]() |
a63269e3e1 | ||
![]() |
d03e715708 | ||
![]() |
927732f190 | ||
![]() |
88c991880f | ||
![]() |
29290fa109 | ||
![]() |
0a8d604ef3 | ||
![]() |
532c985b50 | ||
![]() |
a32182f794 | ||
![]() |
1aebcd3258 | ||
![]() |
9f743aab86 | ||
![]() |
ece839739e | ||
![]() |
2204757eca | ||
![]() |
bfda520ef4 | ||
![]() |
af91f4ed51 | ||
![]() |
41c3a8af01 | ||
![]() |
cc7f8372a8 | ||
![]() |
d20633f9cc | ||
![]() |
961e05e9a8 | ||
![]() |
eb98a04245 | ||
![]() |
5dc1c10848 | ||
![]() |
dcbff74dc0 | ||
![]() |
5e29960da2 | ||
![]() |
aa43fc8ff4 | ||
![]() |
2517e688d9 | ||
![]() |
40d94fd8e9 | ||
![]() |
eb97e640cb | ||
![]() |
2123c1c259 | ||
![]() |
6cf1351a77 | ||
![]() |
c924904308 | ||
![]() |
904bcc14d5 | ||
![]() |
c3abe4c2a6 | ||
![]() |
7144454a1f | ||
![]() |
daaa88fa0d | ||
![]() |
0b7c8497f9 | ||
![]() |
e3562be0d6 | ||
![]() |
e0d0efcc20 | ||
![]() |
fb22b58ce6 | ||
![]() |
c78ac614f5 | ||
![]() |
de15907ea7 | ||
![]() |
a4289a517f | ||
![]() |
967c3bb55d | ||
![]() |
c57896df8f | ||
![]() |
911f0d4039 | ||
![]() |
e822d4fca7 | ||
![]() |
0da132b69e | ||
![]() |
691cb4fe2b | ||
![]() |
97a053916b | ||
![]() |
24bf8eef6d | ||
![]() |
4314bbdf9c | ||
![]() |
65611cd3dc | ||
![]() |
6a4bb1356a | ||
![]() |
06593e3678 | ||
![]() |
18577d9cb0 | ||
![]() |
701b84dc48 | ||
![]() |
9a95237b85 | ||
![]() |
a6a99fbd36 | ||
![]() |
86671bee46 | ||
![]() |
f1432a2e3d | ||
![]() |
480e3f02ca | ||
![]() |
6b05c716a8 | ||
![]() |
c697829b1b | ||
![]() |
9a2ec6912b | ||
![]() |
7601163d32 | ||
![]() |
8e2bda2b7a | ||
![]() |
1761f6c58e | ||
![]() |
419cdde4e1 | ||
![]() |
6ec46a90d1 | ||
![]() |
f4051034d7 | ||
![]() |
1a8ba00f2c | ||
![]() |
de4c1c9265 | ||
![]() |
bff9189e52 | ||
![]() |
076b3628b1 | ||
![]() |
75ccce705e | ||
![]() |
964bf31775 | ||
![]() |
507ced2fa2 | ||
![]() |
e62f9ef56a | ||
![]() |
a5a242377b | ||
![]() |
0758109d15 | ||
![]() |
3970d91d19 | ||
![]() |
4e98b7f0cf | ||
![]() |
27a69d9cca | ||
![]() |
d884ec1731 | ||
![]() |
62b2959cb4 | ||
![]() |
2bdc91c53f | ||
![]() |
d829df99aa | ||
![]() |
4f2ac34440 | ||
![]() |
94e9e9fdb2 |
99
.appveyor.yml
Normal file
99
.appveyor.yml
Normal file
@@ -0,0 +1,99 @@
|
||||
version: '{branch}-{build}'
|
||||
|
||||
# Do not build on tags (GitHub only)
|
||||
skip_tags: true
|
||||
|
||||
image: Visual Studio 2022
|
||||
|
||||
branches:
|
||||
except: # blacklist
|
||||
- coverity_scan
|
||||
|
||||
environment:
|
||||
REPO_DIR: &REPO_DIR c:\qbittorrent
|
||||
CACHE_DIR: &CACHE_DIR c:\qbt_cache
|
||||
|
||||
QBT_VER_URL: https://builds.shiki.hu/appveyor/version_64
|
||||
QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries_64.7z
|
||||
|
||||
# project directory
|
||||
clone_folder: *REPO_DIR
|
||||
|
||||
# cache size should < 100MB (after compressing with fastest option):
|
||||
# see: https://www.appveyor.com/docs/build-cache#save-update-cache-before-build-finishes
|
||||
cache:
|
||||
- *CACHE_DIR
|
||||
|
||||
clone_depth: 50
|
||||
|
||||
install:
|
||||
# check if library needs update
|
||||
- appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
|
||||
- IF EXIST "%CACHE_DIR%\version" (SET /P oldVersion=<"%CACHE_DIR%\version")
|
||||
- IF NOT EXIST "%CACHE_DIR%\version" (SET updateCache=1)
|
||||
- IF NOT "%oldVersion%" == "%newVersion%" (SET updateCache=1)
|
||||
# update library
|
||||
- IF "%updateCache%" == "1" (ECHO "--- Will redownload libraries ---" &&
|
||||
RMDIR /S /Q "%CACHE_DIR%" & MKDIR "%CACHE_DIR%" &&
|
||||
appveyor DownloadFile "%QBT_LIB_URL%" -FileName "c:\qbt_lib.7z" && 7z x "c:\qbt_lib.7z" -o"%CACHE_DIR%" > nul &&
|
||||
COPY "c:\version_new" "%CACHE_DIR%\version")
|
||||
# Qt stay compressed in cache
|
||||
- 7z x "%CACHE_DIR%\qt5_64.7z" -o"c:\qbt" > nul
|
||||
|
||||
before_build:
|
||||
# setup env
|
||||
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
- SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
|
||||
# setup project
|
||||
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
|
||||
# workarounds
|
||||
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
|
||||
|
||||
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
|
||||
- qmake qbittorrent.pro && cd src && qmake src.pro
|
||||
- jom -j2 -f Makefile.Release
|
||||
|
||||
after_build:
|
||||
- cd "%REPO_DIR%"
|
||||
- MKDIR upload
|
||||
- COPY dist\windows\qt.conf upload
|
||||
- COPY src\release\qbittorrent.exe upload
|
||||
- COPY src\release\qbittorrent.pdb upload
|
||||
- COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
|
||||
- COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
|
||||
- COPY "%CACHE_DIR%\base\lib\torrent-rasterbar.dll" upload
|
||||
- COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
|
||||
- MKDIR upload\plugins\iconengines
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
|
||||
- MKDIR upload\plugins\imageformats
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
|
||||
- MKDIR upload\plugins\platforms
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
|
||||
- MKDIR upload\plugins\sqldrivers
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
|
||||
- MKDIR upload\plugins\styles
|
||||
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
|
||||
|
||||
test: off
|
||||
|
||||
artifacts:
|
||||
- path: upload
|
||||
name: qBittorrent-Appveyor_Windows-x64
|
81
.clang-tidy
81
.clang-tidy
@@ -1,81 +0,0 @@
|
||||
Checks: >
|
||||
bugprone-*,
|
||||
cert-*,
|
||||
concurrency-*,
|
||||
cppcoreguidelines-*,
|
||||
misc-*,
|
||||
modernize-*,
|
||||
performance-*,
|
||||
portability-*,
|
||||
readability-*,
|
||||
-# not applicable at all,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-macro-parentheses,
|
||||
-cppcoreguidelines-avoid-c-arrays,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||
-cppcoreguidelines-macro-usage,
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-cppcoreguidelines-pro-type-const-cast,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-cppcoreguidelines-pro-type-union-access,
|
||||
-cppcoreguidelines-pro-type-vararg,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-cppcoreguidelines-virtual-class-destructor,
|
||||
-misc-no-recursion,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-misc-unused-parameters,
|
||||
-modernize-avoid-c-arrays,
|
||||
-modernize-pass-by-value,
|
||||
-modernize-use-auto,
|
||||
-modernize-use-nodiscard,
|
||||
-modernize-use-trailing-return-type,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-function-size,
|
||||
-readability-identifier-length,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-isolate-declaration,
|
||||
-readability-magic-numbers,
|
||||
-readability-named-parameter,
|
||||
-readability-redundant-access-specifiers,
|
||||
-readability-simplify-boolean-expr,
|
||||
-readability-uppercase-literal-suffix,
|
||||
-# only sometimes useful,
|
||||
-bugprone-narrowing-conversions,
|
||||
-cert-dcl58-cpp,
|
||||
-cert-err33-c,
|
||||
-cert-err58-cpp,
|
||||
-clang-analyzer-core.CallAndMessage,
|
||||
-clang-analyzer-cplusplus.NewDelete,
|
||||
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||
-concurrency-mt-unsafe,
|
||||
-cppcoreguidelines-init-variables,
|
||||
-cppcoreguidelines-narrowing-conversions,
|
||||
-cppcoreguidelines-prefer-member-initializer,
|
||||
-cppcoreguidelines-pro-type-static-cast-downcast,
|
||||
-misc-definitions-in-headers,
|
||||
-modernize-concat-nested-namespaces,
|
||||
-modernize-loop-convert,
|
||||
-modernize-raw-string-literal,
|
||||
-modernize-unary-static-assert,
|
||||
-performance-no-automatic-move,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-else-after-return,
|
||||
-readability-redundant-declaration,
|
||||
-# obsoleted,
|
||||
-cert-dcl21-cpp
|
||||
|
||||
CheckOptions:
|
||||
- { key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors, value: true }
|
||||
- { key: modernize-use-override.IgnoreDestructors, value: true }
|
||||
- { key: performance-for-range-copy.AllowedTypes, value: "QJsonValue" }
|
||||
- { key: performance-for-range-copy.WarnOnAllAutoCopies, value: true }
|
||||
- { key: readability-braces-around-statements.ShortStatementLines, value: 3 }
|
||||
|
||||
HeaderFilterRegex: ".+/src/.*\\.h"
|
||||
WarningsAsErrors: "*"
|
@@ -1,10 +1,8 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -5,6 +5,3 @@ core.eol=lf
|
||||
*.png binary
|
||||
*.qm binary
|
||||
*.zip binary
|
||||
|
||||
dist/windows/license.txt text eol=crlf
|
||||
test/testdata/crlf.txt text eol=crlf
|
||||
|
2
.github/SUPPORT.md
vendored
2
.github/SUPPORT.md
vendored
@@ -9,7 +9,7 @@ For such questions, use one of the following community support resources:
|
||||
|
||||
* The [discussions section][discussions-url]
|
||||
|
||||
* The [official forum][forum-url]
|
||||
* The official forum [official forum][forum-url]
|
||||
|
||||
* The [qBittorrent subreddit][subreddit-url]
|
||||
|
||||
|
15
.github/dependabot.yml
vendored
15
.github/dependabot.yml
vendored
@@ -1,15 +0,0 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
commit-message:
|
||||
prefix: "GHA CI"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
labels:
|
||||
- "CI"
|
||||
schedule:
|
||||
interval: "monthly"
|
@@ -30,7 +30,6 @@ from typing import Optional, Sequence
|
||||
import argparse
|
||||
import re
|
||||
|
||||
|
||||
def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('filenames', nargs='*', help='Filenames to check')
|
||||
@@ -48,12 +47,12 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
for line in file:
|
||||
if (match := regex.match(line)) is not None:
|
||||
error_buffer += str(f"Defect file: \"{filename}\"\n"
|
||||
f"Line: {line_counter}\n"
|
||||
f"Column span: {match.span()}\n"
|
||||
f"Part: \"{match.group()}\"\n\n")
|
||||
f"Line: {line_counter}\n"
|
||||
f"Column span: {match.span()}\n"
|
||||
f"Part: \"{match.group()}\"\n\n")
|
||||
line_counter += 1
|
||||
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeDecodeError as error:
|
||||
# not a text file, skip
|
||||
continue
|
||||
|
||||
@@ -65,6 +64,5 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
25
.github/workflows/ci_file_health.yaml
vendored
25
.github/workflows/ci_file_health.yaml
vendored
@@ -14,31 +14,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install tools
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "*"
|
||||
|
||||
- name: Check files
|
||||
uses: pre-commit/action@v3.0.1
|
||||
|
||||
- name: Check doc
|
||||
env:
|
||||
pandoc_path: "${{ github.workspace }}/../pandoc"
|
||||
run: |
|
||||
# install pandoc
|
||||
curl \
|
||||
-L \
|
||||
-o "${{ runner.temp }}/pandoc.tar.gz" \
|
||||
"https://github.com/jgm/pandoc/releases/download/3.1.7/pandoc-3.1.7-linux-amd64.tar.gz"
|
||||
tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
|
||||
mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
|
||||
# run pandoc
|
||||
for lang in doc/*/; do
|
||||
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent.1.md" -o "$lang/qbittorrent.1"
|
||||
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent-nox.1.md" -o "$lang/qbittorrent-nox.1"
|
||||
done
|
||||
# check diff, ignore "Automatically generated by ..." part
|
||||
git diff -I '\.\\".*' --exit-code
|
||||
uses: pre-commit/action@v3.0.0
|
||||
|
114
.github/workflows/ci_macos.yaml
vendored
114
.github/workflows/ci_macos.yaml
vendored
@@ -17,64 +17,51 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
libt_version: ["2.0.10", "1.2.19"]
|
||||
libt_version: ["2.0.8", "1.2.18"]
|
||||
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
||||
qt_version: ["6.7.0"]
|
||||
qt_version: ["5.15.2", "6.4.0"]
|
||||
exclude:
|
||||
- libt_version: "1.2.18"
|
||||
qt_version: "6.4.0"
|
||||
|
||||
env:
|
||||
boost_path: "${{ github.workspace }}/../boost"
|
||||
libtorrent_path: "${{ github.workspace }}/../libtorrent"
|
||||
openssl_root: /usr/local/opt/openssl@1.1
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
uses: Wandalen/wretry.action@v3
|
||||
env:
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
with:
|
||||
attempt_delay: 20000
|
||||
attempt_limit: 6
|
||||
command: |
|
||||
brew update > /dev/null
|
||||
brew install \
|
||||
cmake ninja \
|
||||
openssl@3 zlib
|
||||
run: |
|
||||
export \
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
|
||||
HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
brew update > /dev/null
|
||||
brew install \
|
||||
cmake ninja \
|
||||
openssl@1.1 zlib
|
||||
|
||||
- name: Setup ccache
|
||||
uses: Chocobo1/setup-ccache-action@v1
|
||||
with:
|
||||
store_cache: ${{ github.ref == 'refs/heads/master' }}
|
||||
update_packager_index: false
|
||||
ccache_options: |
|
||||
max_size=2G
|
||||
|
||||
- name: Install boost
|
||||
env:
|
||||
BOOST_MAJOR_VERSION: "1"
|
||||
BOOST_MINOR_VERSION: "85"
|
||||
BOOST_PATCH_VERSION: "0"
|
||||
run: |
|
||||
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
set +e
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
if [ "$_exitCode" -ne "0" ]; then
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
fi
|
||||
curl \
|
||||
-L \
|
||||
-o "${{ runner.temp }}/boost.tar.bz2" \
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_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@v4
|
||||
uses: jurplel/install-qt-action@v3
|
||||
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
|
||||
cache: true
|
||||
|
||||
- name: Install libtorrent
|
||||
run: |
|
||||
@@ -82,22 +69,22 @@ jobs:
|
||||
--branch v${{ matrix.libt_version }} \
|
||||
--depth 1 \
|
||||
--recurse-submodules \
|
||||
https://github.com/arvidn/libtorrent.git \
|
||||
${{ env.libtorrent_path }}
|
||||
cd ${{ env.libtorrent_path }}
|
||||
https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" \
|
||||
-Ddeprecated-functions=OFF
|
||||
-Ddeprecated-functions=OFF \
|
||||
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
- name: Build qBittorrent
|
||||
- name: Build qBittorrent (Qt5)
|
||||
if: ${{ startsWith(matrix.qt_version, 5) }}
|
||||
run: |
|
||||
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
|
||||
LDFLAGS="$LDFLAGS -gz" \
|
||||
@@ -107,6 +94,27 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-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: |
|
||||
CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \
|
||||
LDFLAGS="$LDFLAGS -gz" \
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-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 }}
|
||||
@@ -116,34 +124,14 @@ jobs:
|
||||
|
||||
- name: Prepare build artifacts
|
||||
run: |
|
||||
# create .dmg
|
||||
appName="qbittorrent"
|
||||
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
|
||||
appName="qbittorrent-nox"
|
||||
fi
|
||||
# package
|
||||
pushd build
|
||||
PACKAGE_RETRY=0
|
||||
while [ "$PACKAGE_RETRY" -lt "3" ]; do
|
||||
macdeployqt "$appName.app" -dmg -no-strip
|
||||
if [ -f "$appName.dmg" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
PACKAGE_RETRY=$((PACKAGE_RETRY + 1))
|
||||
echo "Retry $PACKAGE_RETRY..."
|
||||
done
|
||||
popd
|
||||
# prepare upload folder
|
||||
mkdir upload
|
||||
cp "build/$appName.dmg" upload
|
||||
mkdir upload/cmake
|
||||
cp build/compile_commands.json upload/cmake
|
||||
mkdir upload/cmake/libtorrent
|
||||
cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
|
||||
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
|
||||
name: build-info_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
|
||||
path: upload
|
||||
|
89
.github/workflows/ci_python.yaml
vendored
89
.github/workflows/ci_python.yaml
vendored
@@ -1,89 +0,0 @@
|
||||
name: CI - Python
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
permissions: {}
|
||||
|
||||
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@v4
|
||||
|
||||
- name: Setup python (auxiliary scripts)
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3' # use default version
|
||||
|
||||
- name: Install tools (auxiliary scripts)
|
||||
run: pip install bandit pycodestyle pyflakes
|
||||
|
||||
- name: Gather files (auxiliary scripts)
|
||||
run: |
|
||||
export "PY_FILES=$(find . -type f -name '*.py' ! -path '*searchengine*' -printf '%p ')"
|
||||
echo $PY_FILES
|
||||
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Lint code (auxiliary scripts)
|
||||
run: |
|
||||
pyflakes $PY_FILES
|
||||
bandit --skip B314,B405 $PY_FILES
|
||||
|
||||
- name: Format code (auxiliary scripts)
|
||||
run: |
|
||||
pycodestyle \
|
||||
--max-line-length=1000 \
|
||||
--statistics \
|
||||
$PY_FILES
|
||||
|
||||
- name: Build code (auxiliary scripts)
|
||||
run: |
|
||||
python -m compileall $PY_FILES
|
||||
|
||||
- name: Setup python (search engine)
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.7'
|
||||
|
||||
- name: Install tools (search engine)
|
||||
run: pip install bandit mypy pycodestyle pyflakes pyright
|
||||
|
||||
- name: Gather files (search engine)
|
||||
run: |
|
||||
export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
|
||||
echo $PY_FILES
|
||||
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Check typings (search engine)
|
||||
run: |
|
||||
MYPYPATH="src/searchengine/nova3" \
|
||||
mypy \
|
||||
--follow-imports skip \
|
||||
--strict \
|
||||
$PY_FILES
|
||||
pyright \
|
||||
$PY_FILES
|
||||
|
||||
- name: Lint code (search engine)
|
||||
run: |
|
||||
pyflakes $PY_FILES
|
||||
bandit --skip B110,B310,B314,B405 $PY_FILES
|
||||
|
||||
- name: Format code (search engine)
|
||||
run: |
|
||||
pycodestyle \
|
||||
--ignore=E265,E402 \
|
||||
--max-line-length=1000 \
|
||||
--statistics \
|
||||
$PY_FILES
|
||||
|
||||
- name: Build code (search engine)
|
||||
run: |
|
||||
python -m compileall $PY_FILES
|
126
.github/workflows/ci_ubuntu.yaml
vendored
126
.github/workflows/ci_ubuntu.yaml
vendored
@@ -4,7 +4,6 @@ on: [pull_request, push]
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
security-events: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
@@ -18,57 +17,36 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
libt_version: ["2.0.10", "1.2.19"]
|
||||
libt_version: ["2.0.8", "1.2.18"]
|
||||
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
||||
qt_version: ["6.5.2"]
|
||||
|
||||
env:
|
||||
boost_path: "${{ github.workspace }}/../boost"
|
||||
harden_flags: "-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS"
|
||||
libtorrent_path: "${{ github.workspace }}/../libtorrent"
|
||||
qt_version: ["5.15.2", "6.2.0"]
|
||||
exclude:
|
||||
- libt_version: "1.2.18"
|
||||
qt_version: "6.2.0"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install \
|
||||
build-essential cmake ninja-build \
|
||||
libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
|
||||
build-essential cmake ninja-build pkg-config \
|
||||
libboost-dev libssl-dev libxkbcommon-x11-dev zlib1g-dev
|
||||
|
||||
- name: Setup ccache
|
||||
uses: Chocobo1/setup-ccache-action@v1
|
||||
with:
|
||||
store_cache: ${{ github.ref == 'refs/heads/master' }}
|
||||
update_packager_index: false
|
||||
ccache_options: |
|
||||
max_size=2G
|
||||
|
||||
- name: Install boost
|
||||
env:
|
||||
BOOST_MAJOR_VERSION: "1"
|
||||
BOOST_MINOR_VERSION: "76"
|
||||
BOOST_PATCH_VERSION: "0"
|
||||
run: |
|
||||
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
set +e
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
if [ "$_exitCode" -ne "0" ]; then
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
fi
|
||||
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: ${{ matrix.qt_version }}
|
||||
archives: icu qtbase qtdeclarative qtsvg qttools
|
||||
cache: true
|
||||
archives: icu qtbase qtsvg qttools
|
||||
|
||||
- name: Install libtorrent
|
||||
run: |
|
||||
@@ -76,39 +54,27 @@ jobs:
|
||||
--branch v${{ matrix.libt_version }} \
|
||||
--depth 1 \
|
||||
--recurse-submodules \
|
||||
https://github.com/arvidn/libtorrent.git \
|
||||
${{ env.libtorrent_path }}
|
||||
cd ${{ env.libtorrent_path }}
|
||||
CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \
|
||||
https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" \
|
||||
-Ddeprecated-functions=OFF
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
|
||||
with:
|
||||
config-file: ./.github/workflows/helper/codeql/cpp.yaml
|
||||
languages: cpp
|
||||
|
||||
- name: Build qBittorrent
|
||||
- name: Build qBittorrent (Qt5)
|
||||
if: ${{ startsWith(matrix.qt_version, 5) }}
|
||||
run: |
|
||||
CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -Werror" \
|
||||
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
|
||||
LDFLAGS="$LDFLAGS -gz" \
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DTESTING=ON \
|
||||
-DVERBOSE_CONFIGURE=ON \
|
||||
@@ -118,11 +84,25 @@ jobs:
|
||||
cmake --build build --target check
|
||||
DESTDIR="qbittorrent" cmake --install build
|
||||
|
||||
- name: Run CodeQL analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
|
||||
with:
|
||||
category: ${{ github.base_ref || github.ref_name }}
|
||||
- name: Build qBittorrent (Qt6)
|
||||
if: ${{ startsWith(matrix.qt_version, 6) }}
|
||||
run: |
|
||||
CXXFLAGS="$CXXFLAGS -Werror" \
|
||||
LDFLAGS="$LDFLAGS -gz" \
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-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
|
||||
run: |
|
||||
@@ -130,41 +110,37 @@ jobs:
|
||||
mkdir upload/cmake
|
||||
cp build/compile_commands.json upload/cmake
|
||||
mkdir upload/cmake/libtorrent
|
||||
cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
|
||||
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
|
||||
|
||||
- name: Install AppImage
|
||||
- name: 'AppImage: Prepare env'
|
||||
run: |
|
||||
sudo apt install libfuse2
|
||||
curl \
|
||||
-L \
|
||||
-Z \
|
||||
-O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-x86_64.AppImage \
|
||||
-O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-static-x86_64.AppImage \
|
||||
-O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||
chmod +x \
|
||||
linuxdeploy-static-x86_64.AppImage \
|
||||
linuxdeploy-plugin-qt-static-x86_64.AppImage \
|
||||
linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||
|
||||
- name: Prepare files for AppImage
|
||||
- name: 'AppImage: Prepare nox'
|
||||
if: matrix.qbt_gui == 'GUI=OFF'
|
||||
run: |
|
||||
mkdir -p qbittorrent/usr/share/applications
|
||||
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
|
||||
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps
|
||||
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps/
|
||||
mkdir -p qbittorrent/usr/share/applications/
|
||||
cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg
|
||||
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
|
||||
|
||||
- name: Package AppImage
|
||||
- name: 'AppImage: Package'
|
||||
run: |
|
||||
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --plugin qt
|
||||
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --plugin qt
|
||||
rm qbittorrent/apprun-hooks/*
|
||||
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
|
||||
NO_APPSTREAM=1 \
|
||||
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
|
||||
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --output appimage
|
||||
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
|
||||
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --output appimage
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
|
||||
path: upload
|
||||
|
16
.github/workflows/ci_webui.yaml
vendored
16
.github/workflows/ci_webui.yaml
vendored
@@ -2,8 +2,7 @@ name: CI - WebUI
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
permissions:
|
||||
security-events: write
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
@@ -20,10 +19,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup nodejs
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
|
||||
@@ -37,12 +36,3 @@ jobs:
|
||||
run: |
|
||||
npm run format
|
||||
git diff --exit-code
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
config-file: .github/workflows/helper/codeql/js.yaml
|
||||
languages: javascript
|
||||
|
||||
- name: Run CodeQL analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
172
.github/workflows/ci_windows.yaml
vendored
172
.github/workflows/ci_windows.yaml
vendored
@@ -17,87 +17,70 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
libt_version: ["2.0.10", "1.2.19"]
|
||||
libt_version: ["2.0.8", "1.2.18"]
|
||||
|
||||
env:
|
||||
boost_path: "${{ github.workspace }}/../boost"
|
||||
libtorrent_path: "${{ github.workspace }}/../libtorrent"
|
||||
vcpkg_path: "c:/vcpkg"
|
||||
libtorrent_path: "${{ github.workspace }}/libtorrent"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup devcmd
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
if ((Get-Command "ninja.exe" -ErrorAction SilentlyContinue) -eq $null)
|
||||
{
|
||||
choco install ninja
|
||||
}
|
||||
where.exe ninja
|
||||
ninja --version
|
||||
choco install ninja
|
||||
|
||||
# https://learn.microsoft.com/en-us/vcpkg/users/binarycaching#gha
|
||||
- name: Set variables for vcpkg
|
||||
uses: actions/github-script@v7
|
||||
# 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
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', (process.env.ACTIONS_CACHE_URL || ''));
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', (process.env.ACTIONS_RUNTIME_TOKEN || ''));
|
||||
vcpkgDirectory: C:/vcpkg
|
||||
doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
|
||||
|
||||
- name: Install dependencies with vcpkg
|
||||
- name: Install dependencies from vcpkg
|
||||
run: |
|
||||
# create our own triplet
|
||||
# tell vcpkg to only build Release variants of the dependencies
|
||||
New-Item `
|
||||
-Force `
|
||||
-ItemType File `
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake"
|
||||
# OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now, see: https://github.com/openssl/openssl/issues/22554
|
||||
-Path "${{ github.workspace }}" `
|
||||
-Name "triplets_overlay" `
|
||||
-ItemType Directory
|
||||
Copy-Item `
|
||||
"${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake" `
|
||||
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake"
|
||||
Add-Content `
|
||||
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake" `
|
||||
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
|
||||
"set(VCPKG_LIBRARY_LINKAGE static)",
|
||||
"set(VCPKG_CRT_LINKAGE dynamic)",
|
||||
"set(VCPKG_BUILD_TYPE release)")
|
||||
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake" `
|
||||
-Value "set(VCPKG_BUILD_TYPE release)"
|
||||
# clear buildtrees after each package installation to reduce disk space requirements
|
||||
$packages = `
|
||||
"openssl:x64-windows-static-md-release",
|
||||
"zlib:x64-windows-static-md-release"
|
||||
${{ env.vcpkg_path }}/vcpkg.exe upgrade `
|
||||
--no-dry-run `
|
||||
--overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay"
|
||||
${{ env.vcpkg_path }}/vcpkg.exe install `
|
||||
--binarysource="clear;x-gha,readwrite" `
|
||||
"openssl:x64-windows-static-release",
|
||||
"zlib:x64-windows-static-release"
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
|
||||
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
|
||||
--no-dry-run
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install `
|
||||
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
|
||||
--clean-after-build `
|
||||
--overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay" `
|
||||
$packages
|
||||
|
||||
- name: Install boost
|
||||
env:
|
||||
BOOST_MAJOR_VERSION: "1"
|
||||
BOOST_MINOR_VERSION: "85"
|
||||
BOOST_PATCH_VERSION: "0"
|
||||
run: |
|
||||
$boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
$boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
|
||||
if ($LastExitCode -ne 0)
|
||||
{
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
|
||||
}
|
||||
aria2c `
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_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@v4
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: "6.7.0"
|
||||
version: "6.4.0"
|
||||
archives: qtbase qtsvg qttools
|
||||
cache: true
|
||||
|
||||
- name: Install libtorrent
|
||||
run: |
|
||||
@@ -105,40 +88,39 @@ jobs:
|
||||
--branch v${{ matrix.libt_version }} `
|
||||
--depth 1 `
|
||||
--recurse-submodules `
|
||||
https://github.com/arvidn/libtorrent.git `
|
||||
${{ env.libtorrent_path }}
|
||||
cd ${{ env.libtorrent_path }}
|
||||
$env:CXXFLAGS+=" /guard:cf"
|
||||
$env:LDFLAGS+=" /guard:cf"
|
||||
https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
cmake `
|
||||
-B build `
|
||||
-G "Ninja" `
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
||||
-DCMAKE_CXX_FLAGS=/guard:cf `
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
|
||||
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}/install" `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}" `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" `
|
||||
-DBUILD_SHARED_LIBS=OFF `
|
||||
-Ddeprecated-functions=OFF `
|
||||
-Dstatic_runtime=OFF `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release
|
||||
-Dstatic_runtime=ON `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
|
||||
- name: Build qBittorrent
|
||||
run: |
|
||||
$env:CXXFLAGS+=" /WX"
|
||||
cmake `
|
||||
-B build `
|
||||
-G "Ninja" `
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
||||
-DCMAKE_CXX_FLAGS="/WX" `
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" `
|
||||
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/install/lib/cmake/LibtorrentRasterbar" `
|
||||
-DMSVC_RUNTIME_DYNAMIC=ON `
|
||||
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/lib/cmake/LibtorrentRasterbar" `
|
||||
-DMSVC_RUNTIME_DYNAMIC=OFF `
|
||||
-DQT6=ON `
|
||||
-DTESTING=ON `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release `
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
|
||||
-DVERBOSE_CONFIGURE=ON `
|
||||
--graphviz=build/target_graph.dot
|
||||
cmake --build build --target qbt_update_translations
|
||||
@@ -148,51 +130,37 @@ jobs:
|
||||
- name: Prepare build artifacts
|
||||
run: |
|
||||
mkdir upload
|
||||
mkdir upload/qBittorrent
|
||||
copy build/qbittorrent.exe upload/qBittorrent
|
||||
copy build/qbittorrent.pdb upload/qBittorrent
|
||||
copy dist/windows/qt.conf upload/qBittorrent
|
||||
copy build/qbittorrent.exe upload
|
||||
copy build/qbittorrent.pdb upload
|
||||
copy dist/windows/qt.conf upload
|
||||
# runtimes
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Core.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Gui.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Network.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Sql.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Svg.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Widgets.dll" upload/qBittorrent
|
||||
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Xml.dll" upload/qBittorrent
|
||||
mkdir upload/qBittorrent/plugins/iconengines
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/iconengines/qsvgicon.dll" upload/qBittorrent/plugins/iconengines
|
||||
mkdir upload/qBittorrent/plugins/imageformats
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qico.dll" upload/qBittorrent/plugins/imageformats
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qsvg.dll" upload/qBittorrent/plugins/imageformats
|
||||
mkdir upload/qBittorrent/plugins/platforms
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/platforms/qwindows.dll" upload/qBittorrent/plugins/platforms
|
||||
mkdir upload/qBittorrent/plugins/sqldrivers
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/qBittorrent/plugins/sqldrivers
|
||||
mkdir upload/qBittorrent/plugins/styles
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/styles/qmodernwindowsstyle.dll" upload/qBittorrent/plugins/styles
|
||||
mkdir upload/qBittorrent/plugins/tls
|
||||
copy "${{ env.Qt_ROOT_DIR }}/plugins/tls/qschannelbackend.dll" upload/qBittorrent/plugins/tls
|
||||
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
|
||||
mkdir upload/plugins/iconengines
|
||||
copy "${{ env.Qt6_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
|
||||
mkdir upload/plugins/platforms
|
||||
copy "${{ env.Qt6_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
|
||||
mkdir upload/plugins/sqldrivers
|
||||
copy "${{ env.Qt6_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
|
||||
mkdir upload/plugins/styles
|
||||
copy "${{ env.Qt6_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
|
||||
# cmake additionals
|
||||
mkdir upload/cmake
|
||||
copy build/compile_commands.json upload/cmake
|
||||
copy build/target_graph.dot upload/cmake
|
||||
mkdir upload/cmake/libtorrent
|
||||
copy ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
|
||||
copy libtorrent/build/compile_commands.json upload/cmake/libtorrent
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
|
||||
path: upload
|
||||
|
||||
- name: Create installer
|
||||
run: |
|
||||
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
|
||||
makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}-setup
|
||||
path: dist/windows/qbittorrent_*_setup.exe
|
||||
|
115
.github/workflows/coverity-scan.yaml
vendored
115
.github/workflows/coverity-scan.yaml
vendored
@@ -1,115 +0,0 @@
|
||||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
|
||||
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
coverity_scan:
|
||||
name: Scan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
libt_version: ["2.0.10"]
|
||||
qbt_gui: ["GUI=ON"]
|
||||
qt_version: ["6.5.2"]
|
||||
|
||||
env:
|
||||
boost_path: "${{ github.workspace }}/../boost"
|
||||
coverity_path: "${{ github.workspace }}/../coverity"
|
||||
libtorrent_path: "${{ github.workspace }}/../libtorrent"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install \
|
||||
build-essential cmake ninja-build \
|
||||
libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
|
||||
|
||||
- name: Install boost
|
||||
env:
|
||||
BOOST_MAJOR_VERSION: "1"
|
||||
BOOST_MINOR_VERSION: "85"
|
||||
BOOST_PATCH_VERSION: "0"
|
||||
run: |
|
||||
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
|
||||
set +e
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
if [ "$_exitCode" -ne "0" ]; then
|
||||
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
|
||||
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
|
||||
fi
|
||||
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
version: ${{ matrix.qt_version }}
|
||||
archives: icu qtbase qtdeclarative qtsvg qttools
|
||||
cache: true
|
||||
|
||||
- name: Install libtorrent
|
||||
run: |
|
||||
git clone \
|
||||
--branch v${{ matrix.libt_version }} \
|
||||
--depth 1 \
|
||||
--recurse-submodules \
|
||||
https://github.com/arvidn/libtorrent.git \
|
||||
${{ env.libtorrent_path }}
|
||||
cd ${{ env.libtorrent_path }}
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" \
|
||||
-Ddeprecated-functions=OFF
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
- name: Download Coverity Build Tool
|
||||
run: |
|
||||
curl \
|
||||
-L \
|
||||
-d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
|
||||
-o "${{ runner.temp }}/coverity_tool.tgz" \
|
||||
"https://scan.coverity.com/download/linux64"
|
||||
mkdir -p ${{ env.coverity_path }}
|
||||
tar \
|
||||
-xf "${{ runner.temp }}/coverity_tool.tgz" \
|
||||
-C "${{ env.coverity_path }}" \
|
||||
--strip-components 1
|
||||
|
||||
- name: Build qBittorrent
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DBOOST_ROOT="${{ env.boost_path }}" \
|
||||
-DVERBOSE_CONFIGURE=ON \
|
||||
-D${{ matrix.qbt_gui }}
|
||||
PATH="${{ env.coverity_path }}/bin:$PATH" \
|
||||
cov-build \
|
||||
--dir cov-int \
|
||||
cmake --build build
|
||||
|
||||
- name: Submit the result to Coverity Scan
|
||||
run: |
|
||||
tar -caf qbittorrent.xz cov-int
|
||||
curl \
|
||||
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
|
||||
--form email=sledgehammer999@qbittorrent.org \
|
||||
--form file=@qbittorrent.xz \
|
||||
--form version="$(git rev-parse --short HEAD)" \
|
||||
--form description="master" \
|
||||
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent
|
79
.github/workflows/coverity-scan.yml
vendored
Normal file
79
.github/workflows/coverity-scan.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
|
||||
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
coverity_scan:
|
||||
name: Scan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install \
|
||||
build-essential cmake ninja-build pkg-config \
|
||||
libboost-dev libssl-dev zlib1g-dev
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: "6.4.0"
|
||||
archives: icu qtbase qtsvg qttools
|
||||
|
||||
- name: Install libtorrent
|
||||
run: |
|
||||
git clone \
|
||||
--branch "v2.0.8" \
|
||||
--depth 1 \
|
||||
--recurse-submodules \
|
||||
https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-Ddeprecated-functions=OFF
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
- name: Download Coverity Build Tool
|
||||
run: |
|
||||
wget \
|
||||
-q \
|
||||
https://scan.coverity.com/download/linux64 \
|
||||
--post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
|
||||
-O coverity_tool.tgz
|
||||
mkdir coverity_tool
|
||||
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
|
||||
|
||||
- name: Build qBittorrent
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-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
|
||||
|
||||
- name: Submit the result to Coverity Scan
|
||||
run: |
|
||||
tar caf qbittorrent.xz cov-int
|
||||
curl \
|
||||
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
|
||||
--form email=sledgehammer999@qbittorrent.org \
|
||||
--form file=@qbittorrent.xz \
|
||||
--form version="$(git rev-parse --short HEAD)" \
|
||||
--form description="master" \
|
||||
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent
|
4
.github/workflows/helper/appimage/export_vars.sh
vendored
Executable file → Normal file
4
.github/workflows/helper/appimage/export_vars.sh
vendored
Executable file → Normal file
@@ -1,12 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this file is called from AppRun so 'root_dir' will point to where AppRun is
|
||||
root_dir="$(readlink -f "$(dirname "$0")")"
|
||||
|
||||
# Insert the default values because after the test we prepend our path
|
||||
# and it will create problems with DEs (eg KDE) that don't set the variable
|
||||
# and rely on the default paths
|
||||
if [ -z "${XDG_DATA_DIRS}" ]; then
|
||||
if [[ -z ${XDG_DATA_DIRS} ]]; then
|
||||
XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
|
||||
fi
|
||||
|
||||
|
14
.github/workflows/helper/codeql/cpp.yaml
vendored
14
.github/workflows/helper/codeql/cpp.yaml
vendored
@@ -1,14 +0,0 @@
|
||||
name: "CodeQL config for C++"
|
||||
|
||||
queries:
|
||||
- uses: security-and-quality
|
||||
|
||||
query-filters:
|
||||
- exclude:
|
||||
id: cpp/commented-out-code
|
||||
- exclude:
|
||||
id: cpp/include-non-header
|
||||
- exclude:
|
||||
id: cpp/loop-variable-changed
|
||||
- exclude:
|
||||
id: cpp/useless-expression
|
11
.github/workflows/helper/codeql/js.yaml
vendored
11
.github/workflows/helper/codeql/js.yaml
vendored
@@ -1,11 +0,0 @@
|
||||
name: "CodeQL config for Javascript"
|
||||
|
||||
paths-ignore:
|
||||
- "**/lib/*"
|
||||
|
||||
queries:
|
||||
- uses: security-and-quality
|
||||
|
||||
query-filters:
|
||||
- exclude:
|
||||
id: js/superfluous-trailing-arguments
|
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
@@ -1,18 +0,0 @@
|
||||
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
|
||||
# https://github.com/crate-ci/typos/blob/master/docs/design.md#identifiers-and-words
|
||||
|
||||
# try adding to `identifiers` list first, if doesn't work then `words` list
|
||||
|
||||
[default.extend-identifiers]
|
||||
additionals = "additionals"
|
||||
caf = "caf"
|
||||
curren = "curren"
|
||||
FO = "FO"
|
||||
ket = "ket"
|
||||
Q_INVOKABLE = "Q_INVOKABLE"
|
||||
switchs = "switchs"
|
||||
ths = "ths"
|
||||
|
||||
[default.extend-words]
|
||||
BA = "BA"
|
||||
helo = "helo"
|
2
.github/workflows/stale_bot.yaml
vendored
2
.github/workflows/stale_bot.yaml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Mark and close stale PRs
|
||||
uses: actions/stale@v9
|
||||
uses: actions/stale@v5
|
||||
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."
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
.vscode/
|
||||
src/gui/geoip/GeoIP.dat
|
||||
src/gui/geoip/GeoIP.dat.gz
|
||||
src/qbittorrent
|
||||
@@ -17,7 +16,6 @@ Makefile*
|
||||
*.o
|
||||
*.pdb
|
||||
*.exe
|
||||
*.dll
|
||||
|
||||
# Generated MOC, resource and UI files
|
||||
moc_*.cpp
|
||||
@@ -25,7 +23,8 @@ moc_*.h
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
*.moc
|
||||
*.qm
|
||||
src/lang/qbittorrent_*.qm
|
||||
src/webui/www/translations/webui_*.qm
|
||||
.DS_Store
|
||||
.qmake.stash
|
||||
src/qbittorrent.app
|
||||
|
@@ -3,7 +3,7 @@ repos:
|
||||
hooks:
|
||||
- id: check-translation-tag
|
||||
name: Check newline characters in <translation> tag
|
||||
entry: .github/workflows/helper/pre-commit/check_translation_tag.py
|
||||
entry: .github/workflows/check_translation_tag.py
|
||||
language: script
|
||||
exclude: |
|
||||
(?x)^(
|
||||
@@ -13,7 +13,7 @@ repos:
|
||||
- ts
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
||||
rev: v4.5.0
|
||||
rev: v4.3.0
|
||||
hooks:
|
||||
- id: check-json
|
||||
name: Check JSON files
|
||||
@@ -33,20 +33,17 @@ repos:
|
||||
args: ["--fix=lf"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/webui/www/private/css/lib/.* |
|
||||
src/webui/www/private/scripts/lib/.* |
|
||||
dist/windows/license.txt |
|
||||
test/testdata/crlf.txt
|
||||
compile_commands.json |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
|
||||
- id: end-of-file-fixer
|
||||
name: Check trailing newlines
|
||||
exclude: |
|
||||
(?x)^(
|
||||
compile_commands.json |
|
||||
configure |
|
||||
src/webui/www/private/css/lib/.* |
|
||||
src/webui/www/private/scripts/lib/.* |
|
||||
test/testdata/crlf.txt
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- svg
|
||||
@@ -56,54 +53,7 @@ repos:
|
||||
name: Check trailing whitespaces
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/webui/www/private/css/lib/.* |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- ts
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell.git
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
name: Check spelling (codespell)
|
||||
args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*\.desktop |
|
||||
.*\.qrc |
|
||||
build-aux/.* |
|
||||
Changelog |
|
||||
dist/windows/installer-translations/.* |
|
||||
m4/.* |
|
||||
src/base/3rdparty/.* |
|
||||
src/searchengine/nova3/socks.py |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- ts
|
||||
|
||||
- repo: https://github.com/crate-ci/typos.git
|
||||
rev: v1.16.18
|
||||
hooks:
|
||||
- id: typos
|
||||
name: Check spelling (typos)
|
||||
args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*\.asc |
|
||||
.*\.desktop |
|
||||
.*\.qrc |
|
||||
\.pre-commit-config\.yaml |
|
||||
build-aux/.* |
|
||||
Changelog |
|
||||
configure.* |
|
||||
dist/windows/installer-translations/.* |
|
||||
m4/.* |
|
||||
src/base/3rdparty/.* |
|
||||
src/searchengine/nova3/socks.py |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- svg
|
||||
- ts
|
||||
|
16
AUTHORS
16
AUTHORS
@@ -29,17 +29,13 @@ Code from other projects:
|
||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
||||
license: BSD
|
||||
|
||||
* files src/webui/www/private/css/lib/vanillaSelectBox.css src/webui/www/private/scripts/lib/vanillaSelectBox.js
|
||||
copyright: Philippe Meyer <pmg.meyer@gmail.com>
|
||||
license: MIT
|
||||
|
||||
Images Authors:
|
||||
* files: src/icons/qbittorrent-tray.svg
|
||||
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
|
||||
license: GPLv2+
|
||||
|
||||
* files: src/qbittorrent_file.ico src/icons/fileicon.svg
|
||||
copyright: 'unknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlaid above it.
|
||||
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
|
||||
@@ -53,7 +49,7 @@ Images Authors:
|
||||
|
||||
* file: src/icons/qbittorrent-tray-dark.svg src/icons/qbittorrent-tray-light.svg
|
||||
copyright: Daniel Eguren <deguren@gmail.com>
|
||||
modified by: now-im <now-im.d8gcu@simplelogin.com> (@now-im)
|
||||
modified by: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
|
||||
license: LGPL
|
||||
|
||||
* folder: src/icons/
|
||||
@@ -63,7 +59,7 @@ Images Authors:
|
||||
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: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
|
||||
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+
|
||||
|
||||
* folder: src/icons/
|
||||
@@ -76,18 +72,18 @@ Images Authors:
|
||||
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: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
|
||||
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
|
||||
license: MIT
|
||||
|
||||
* folder: src/icons/
|
||||
files: force-recheck.svg
|
||||
copyright: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
|
||||
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
|
||||
|
||||
* 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: now-im <now-im.d8gcu@simplelogin.com> (@now-im)
|
||||
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
|
||||
license: BSD 2-Clause License
|
||||
|
||||
Translations authors:
|
||||
|
@@ -7,13 +7,15 @@ project(qBittorrent
|
||||
)
|
||||
|
||||
# version requirements - older versions may work, but you are on your own
|
||||
set(minBoostVersion 1.76)
|
||||
set(minQt6Version 6.5.0)
|
||||
set(minOpenSSLVersion 3.0.2)
|
||||
set(minLibtorrent1Version 1.2.19)
|
||||
set(minLibtorrentVersion 2.0.10)
|
||||
set(minBoostVersion 1.71)
|
||||
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(minZlibVersion 1.2.11)
|
||||
|
||||
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
|
||||
include(GNUInstallDirs)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||
@@ -23,25 +25,21 @@ include(FeatureOptionsSetup)
|
||||
# features, list is loosely sorted by user's interests
|
||||
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(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" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
feature_option_dependent(DBUS
|
||||
"Enable support for notifications and power-management features via D-Bus"
|
||||
"Enable support for notifications and power-management features via D-Bus on Linux"
|
||||
ON "GUI" OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
feature_option_dependent(SYSTEMD
|
||||
"Install systemd service file. Target directory is overridable with `SYSTEMD_SERVICES_INSTALL_DIR` variable"
|
||||
OFF "NOT GUI" OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
elseif (MSVC)
|
||||
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
|
||||
endif()
|
||||
|
||||
|
@@ -276,7 +276,7 @@ struct StructName {};
|
||||
|
||||
enum EnumName {};
|
||||
|
||||
using SomeList = QList<ClassName>;
|
||||
typedef QList<ClassName> SomeList;
|
||||
|
||||
namespace NamespaceName
|
||||
{
|
||||
@@ -318,7 +318,7 @@ The headers should be ordered alphabetically within each group. \
|
||||
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
|
||||
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
|
||||
|
||||
One exception is the header containing the library version (for example, QtVersionChecks), this particular header isn't constrained by the aforementioned order.
|
||||
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -331,7 +331,7 @@ Example:
|
||||
// exceptions, headers containing version number
|
||||
#include <boost/version.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <QtVersionChecks>
|
||||
#include <QtGlobal>
|
||||
|
||||
// C++ Standard Library headers
|
||||
#include <cstdio>
|
||||
@@ -342,7 +342,7 @@ Example:
|
||||
|
||||
// System headers
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
// Boost library headers
|
||||
|
@@ -200,7 +200,7 @@ Following these guidelines helps maintainers and the community understand your s
|
||||
[coding-guidelines-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md
|
||||
[coding-guidelines-git-commit-message-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md#10-git-commit-message
|
||||
[commit-message-fix-issue-example-url]: https://github.com/qbittorrent/qBittorrent/commit/c07cd440cd46345297debb47cb260f8688975f50
|
||||
[forum-url]: https://forum.qbittorrent.org/
|
||||
[forum-url]: http://forum.qbittorrent.org/
|
||||
[howto-report-bugs-url]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
|
||||
[how-to-translate-url]: https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent
|
||||
[merging-vs-rebasing-url]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing
|
||||
|
26
INSTALL
26
INSTALL
@@ -3,22 +3,22 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
||||
|
||||
1) Install these dependencies:
|
||||
|
||||
- Boost >= 1.76
|
||||
- Boost >= 1.71
|
||||
|
||||
- libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.10 - 2.0.x
|
||||
- libtorrent-rasterbar 1.2.18 - 1.2.x || 2.0.8 - 2.0.x
|
||||
* By Arvid Norberg, https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- OpenSSL >= 3.0.2
|
||||
- OpenSSL >= 1.1.1
|
||||
|
||||
- Qt 6.5.0 - 6.x
|
||||
- Qt 5.15.2 - 5.x || 6.2.0 - 6.x
|
||||
|
||||
- zlib >= 1.2.11
|
||||
|
||||
- CMake >= 3.16
|
||||
* Compile-time only
|
||||
- pkg-config *
|
||||
* Compile-time only on *nix systems
|
||||
|
||||
- Python >= 3.7.0
|
||||
- Python >= 3.5.0
|
||||
* Optional, run-time only
|
||||
* Used by the bundled search engine
|
||||
|
||||
@@ -28,24 +28,22 @@ Please ensure you are building with an officially supported configuration when r
|
||||
|
||||
2a) Compile and install qBittorrent with Qt graphical interface
|
||||
|
||||
$ cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
$ cmake --build build
|
||||
$ cmake --install build
|
||||
$ ./configure
|
||||
$ make && make install
|
||||
$ qbittorrent
|
||||
|
||||
will install and execute qBittorrent.
|
||||
|
||||
2b) Compile and install qBittorrent without Qt graphical interface
|
||||
|
||||
$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGUI=OFF
|
||||
$ cmake --build build
|
||||
$ cmake --install build
|
||||
$ ./configure --disable-gui
|
||||
$ make && make install
|
||||
$ qbittorrent-nox
|
||||
|
||||
will install and execute qBittorrent.
|
||||
|
||||
DOCUMENTATION:
|
||||
Please note that there is a "Compilation" section at https://wiki.qbittorrent.org.
|
||||
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
|
||||
|
||||
------------------------------------------
|
||||
sledgehammer999 <sledgehammer999@qbittorrent.org>
|
||||
|
18
README.md
18
README.md
@@ -1,7 +1,8 @@
|
||||
qBittorrent - A BitTorrent client in Qt
|
||||
------------------------------------------
|
||||
|
||||
[](https://github.com/qbittorrent/qBittorrent/actions)
|
||||
[](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
|
||||
[](https://github.com/qbittorrent/qBittorrent/actions)
|
||||
[](https://scan.coverity.com/projects/5494)
|
||||
********************************
|
||||
### Description:
|
||||
@@ -15,8 +16,15 @@ support as well as many features.
|
||||
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
### Installation:
|
||||
For installation, follow the instructions from INSTALL file, but simple:
|
||||
|
||||
Refer to the [INSTALL](INSTALL) file.
|
||||
```
|
||||
./configure
|
||||
make && make install
|
||||
qbittorrent
|
||||
```
|
||||
|
||||
will install and execute qBittorrent hopefully without any problem.
|
||||
|
||||
### Public key:
|
||||
Starting from v3.3.4 all source tarballs and binaries are signed.<br />
|
||||
@@ -29,13 +37,13 @@ For more information please visit:
|
||||
https://www.qbittorrent.org
|
||||
|
||||
or our wiki here:
|
||||
https://wiki.qbittorrent.org
|
||||
http://wiki.qbittorrent.org
|
||||
|
||||
Use the forum for troubleshooting before reporting bugs:
|
||||
https://forum.qbittorrent.org
|
||||
http://forum.qbittorrent.org
|
||||
|
||||
Please report any bug (or feature request) to:
|
||||
https://bugs.qbittorrent.org
|
||||
http://bugs.qbittorrent.org
|
||||
|
||||
Official IRC channel:
|
||||
[#qbittorrent on irc.libera.chat](ircs://irc.libera.chat:6697/qbittorrent)
|
||||
|
4
bootstrap.sh
Executable file
4
bootstrap.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
aclocal -I m4
|
||||
autoconf
|
348
build-aux/compile
Executable file
348
build-aux/compile
Executable file
File diff suppressed because it is too large
Load Diff
1665
build-aux/config.guess
vendored
Executable file
1665
build-aux/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user