You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-26 06:12:17 +01:00
Compare commits
290 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0061b75200 | ||
|
|
420c93a99e | ||
|
|
93f1183cd7 | ||
|
|
b8fcc1fed2 | ||
|
|
2b91be1905 | ||
|
|
7c9ef96ef8 | ||
|
|
37b4b69199 | ||
|
|
fc18e6f8df | ||
|
|
4793a35e0b | ||
|
|
4599da3ce1 | ||
|
|
dec4e41fdd | ||
|
|
780ece0c25 | ||
|
|
aac8bfc398 | ||
|
|
1a06a18336 | ||
|
|
2d4f963d65 | ||
|
|
b54fe08201 | ||
|
|
d1d0300491 | ||
|
|
7fff06f07b | ||
|
|
3f9351042d | ||
|
|
9e01dbab0f | ||
|
|
d4a4b02cf6 | ||
|
|
1f2c7a6671 | ||
|
|
5a7b88c16c | ||
|
|
93351476e4 | ||
|
|
e1bfa95a63 | ||
|
|
7030cc08e7 | ||
|
|
a1da9812a5 | ||
|
|
8ebc0f529c | ||
|
|
e0d47649bc | ||
|
|
524d503860 | ||
|
|
cffafa8e9f | ||
|
|
0fda919268 | ||
|
|
7d98c34e17 | ||
|
|
93147e787b | ||
|
|
80435bae7e | ||
|
|
b367e5c197 | ||
|
|
5336c71da5 | ||
|
|
27f6db976d | ||
|
|
8223d61fa7 | ||
|
|
3eef12bd8f | ||
|
|
9e70a6c499 | ||
|
|
fec3a87421 | ||
|
|
59aac32eb9 | ||
|
|
5ef3917769 | ||
|
|
2f767d96d9 | ||
|
|
de24fdfdc2 | ||
|
|
3bb6a68c9d | ||
|
|
f2406eb2f3 | ||
|
|
4923ed7da0 | ||
|
|
82056355f6 | ||
|
|
f3bd2a295f | ||
|
|
cc96760839 | ||
|
|
ae95943f69 | ||
|
|
d3067f939e | ||
|
|
b6addd304c | ||
|
|
d1ae6e8d58 | ||
|
|
4445c2dab2 | ||
|
|
fcc1564a62 | ||
|
|
615eeb7144 | ||
|
|
855bb118b5 | ||
|
|
9f1eb3600a | ||
|
|
fb885d89c1 | ||
|
|
a846916beb | ||
|
|
a574c4a70a | ||
|
|
1e367f818d | ||
|
|
00599c8f02 | ||
|
|
332a836746 | ||
|
|
a1992acc16 | ||
|
|
c3f002a544 | ||
|
|
c28cbe0a74 | ||
|
|
435daaceed | ||
|
|
e29ab0087b | ||
|
|
aadd5a3312 | ||
|
|
7e354ffad3 | ||
|
|
ee6a071fb6 | ||
|
|
bc8b838953 | ||
|
|
5251d93b3d | ||
|
|
84f0dbecfe | ||
|
|
bba0c8b2cc | ||
|
|
2f90be8bd2 | ||
|
|
cb6b6296aa | ||
|
|
9d25fdce2a | ||
|
|
12b2732f1a | ||
|
|
8c9ece73ee | ||
|
|
a7db786387 | ||
|
|
e5bf65c9bd | ||
|
|
900e7d3a14 | ||
|
|
f1ff74a926 | ||
|
|
30bc4b837e | ||
|
|
050a4f8b23 | ||
|
|
487103d58f | ||
|
|
eeea69d4c1 | ||
|
|
00360ad418 | ||
|
|
a733253ae5 | ||
|
|
9788ee042b | ||
|
|
e9c9ea3bba | ||
|
|
312dfb989d | ||
|
|
75deafe5b1 | ||
|
|
4ca257a389 | ||
|
|
03375a78f2 | ||
|
|
423c7066d7 | ||
|
|
5cd5cc71a8 | ||
|
|
45d4d22055 | ||
|
|
916a92aa0d | ||
|
|
d1ebbcb35d | ||
|
|
2743d998a8 | ||
|
|
dbbfbaff9f | ||
|
|
0be8439cf6 | ||
|
|
66982c5524 | ||
|
|
85af8547f7 | ||
|
|
e26977ab2c | ||
|
|
ec1cc783a6 | ||
|
|
03b00ec045 | ||
|
|
5e90156e9e | ||
|
|
052206efa1 | ||
|
|
305d73180b | ||
|
|
80000bf0fd | ||
|
|
06ebe756e8 | ||
|
|
5fa3d9f19c | ||
|
|
5b4c6d3665 | ||
|
|
77bd0f17d1 | ||
|
|
03a702cfbd | ||
|
|
a932cd2ec1 | ||
|
|
8e5743380a | ||
|
|
8001eb0368 | ||
|
|
f214dc88fc | ||
|
|
5cff5ab135 | ||
|
|
82ba154b64 | ||
|
|
4ea44bbd2b | ||
|
|
a5e68a8725 | ||
|
|
70291014d1 | ||
|
|
1aabcfc30c | ||
|
|
aba80e2b1c | ||
|
|
be683fbcd3 | ||
|
|
2bcf09cfa5 | ||
|
|
697325af63 | ||
|
|
c21bd77be5 | ||
|
|
d5430adaaa | ||
|
|
9e99a0d3f5 | ||
|
|
d088ab6f43 | ||
|
|
820d510c12 | ||
|
|
676847fcd0 | ||
|
|
0204630ee6 | ||
|
|
b515c7eda4 | ||
|
|
73fcecac76 | ||
|
|
a7b82ebcb5 | ||
|
|
f8598b010d | ||
|
|
93779bcc4b | ||
|
|
938f5b9dd9 | ||
|
|
3b4d9f49d5 | ||
|
|
171c93af50 | ||
|
|
6f81e40106 | ||
|
|
e19b5cb2ce | ||
|
|
2c69faca58 | ||
|
|
9272151d0a | ||
|
|
d45ebf5a43 | ||
|
|
8074be7644 | ||
|
|
c99ac99a99 | ||
|
|
976e2450ec | ||
|
|
7e4db8fafd | ||
|
|
115a409d92 | ||
|
|
c203ab3d16 | ||
|
|
5dff96496d | ||
|
|
f813935011 | ||
|
|
2be719449f | ||
|
|
2094c870d5 | ||
|
|
4fe93ae8b8 | ||
|
|
fff1103cf4 | ||
|
|
8cede43a45 | ||
|
|
9b1fa3a5af | ||
|
|
409e73c074 | ||
|
|
c893729d62 | ||
|
|
945466968c | ||
|
|
54f080b755 | ||
|
|
bfad14d552 | ||
|
|
2972e1596d | ||
|
|
987d2aae88 | ||
|
|
4707d34fad | ||
|
|
2ffc09d097 | ||
|
|
afa8d6bb8f | ||
|
|
a37ead98e8 | ||
|
|
c73cd8d618 | ||
|
|
800a3aa61e | ||
|
|
ebd815be75 | ||
|
|
ef669acf89 | ||
|
|
ac6426eab1 | ||
|
|
b107b745f2 | ||
|
|
3d851a448f | ||
|
|
ce133f01aa | ||
|
|
492d378537 | ||
|
|
7ece484423 | ||
|
|
be5ad63e21 | ||
|
|
bdac8f8db8 | ||
|
|
bb893e70c5 | ||
|
|
57ec9db532 | ||
|
|
0287481001 | ||
|
|
0167496ecb | ||
|
|
d86cf193a0 | ||
|
|
246cad1108 | ||
|
|
23bf86a8a8 | ||
|
|
6ce4c885b9 | ||
|
|
faf84e483a | ||
|
|
576004c840 | ||
|
|
c93b05c293 | ||
|
|
55c3813fac | ||
|
|
725c6857be | ||
|
|
86767c9ab4 | ||
|
|
46aa631d2b | ||
|
|
7c61a937c9 | ||
|
|
b8d65dcc45 | ||
|
|
b9ab83eaf2 | ||
|
|
8b7b563992 | ||
|
|
b813a878d7 | ||
|
|
54e486c389 | ||
|
|
12d0a3acc1 | ||
|
|
6ad2a13386 | ||
|
|
2a9c401db9 | ||
|
|
ea5a29018f | ||
|
|
c8d0a715e8 | ||
|
|
2cfc6514ab | ||
|
|
1d78bc7206 | ||
|
|
e5577e43f8 | ||
|
|
17c0463906 | ||
|
|
4168772904 | ||
|
|
44f2186749 | ||
|
|
0c918bcc3a | ||
|
|
0a8925dc75 | ||
|
|
a446597597 | ||
|
|
54354a2732 | ||
|
|
d94b8f08ab | ||
|
|
0d8189efeb | ||
|
|
00c886e426 | ||
|
|
551fc35439 | ||
|
|
9ff17c8d9d | ||
|
|
ec37732e99 | ||
|
|
8a414f32a8 | ||
|
|
bac06acb49 | ||
|
|
ae1e3c2a81 | ||
|
|
67940eb0f9 | ||
|
|
007aa8480e | ||
|
|
dedec10c58 | ||
|
|
75219e21be | ||
|
|
10f5964f8e | ||
|
|
a4a64d51c0 | ||
|
|
1014313d88 | ||
|
|
e486bb4c29 | ||
|
|
5c3d9ffb46 | ||
|
|
2e474fd8db | ||
|
|
b2b110ae1f | ||
|
|
68a34e0738 | ||
|
|
38fa575958 | ||
|
|
6cfeefe054 | ||
|
|
8007971a53 | ||
|
|
d66bd30fae | ||
|
|
3fa59b1b12 | ||
|
|
20e7aff393 | ||
|
|
4b7ce87f57 | ||
|
|
2075533468 | ||
|
|
a4ad5c8d11 | ||
|
|
35f2f56757 | ||
|
|
e6f4aa6a2f | ||
|
|
92fc62bb0d | ||
|
|
44b57a59f5 | ||
|
|
97b8e02bf5 | ||
|
|
5df42420cb | ||
|
|
0ede11a1b7 | ||
|
|
7d9c282db9 | ||
|
|
bc0e0813a4 | ||
|
|
f3aebb3001 | ||
|
|
800f966df9 | ||
|
|
e33df4dd8c | ||
|
|
96d9d810fd | ||
|
|
8707a1bc86 | ||
|
|
0c988a5fd4 | ||
|
|
b396ca771d | ||
|
|
a37dfcf961 | ||
|
|
31989740cd | ||
|
|
501191289b | ||
|
|
8971e92d78 | ||
|
|
0c96e79d0d | ||
|
|
0704c0f5e6 | ||
|
|
9cb190ebe7 | ||
|
|
667f84995c | ||
|
|
7a93fae6e4 | ||
|
|
0d6deca15c | ||
|
|
f54d7d46f2 | ||
|
|
8cf00ba5e1 | ||
|
|
ecc9c6bbd9 | ||
|
|
e11199f988 | ||
|
|
e9ed621178 |
@@ -51,8 +51,6 @@ before_build:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd "%REPO_DIR%"
|
- cd "%REPO_DIR%"
|
||||||
# scan only as lupdate is prone to hang
|
|
||||||
- lupdate -extensions c,cpp,h,hpp,ui .
|
|
||||||
- qmake qbittorrent.pro && cd src && qmake src.pro
|
- qmake qbittorrent.pro && cd src && qmake src.pro
|
||||||
- jom -j2 -f Makefile.Release
|
- jom -j2 -f Makefile.Release
|
||||||
|
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -3,7 +3,7 @@
|
|||||||
### qBittorrent version and Operating System
|
### qBittorrent version and Operating System
|
||||||
(type here)
|
(type here)
|
||||||
|
|
||||||
### If on linux, libtorrent-rasterbar and Qt version
|
### If on linux, libtorrent and Qt version
|
||||||
(type here)
|
(type here)
|
||||||
|
|
||||||
### What is the problem
|
### What is the problem
|
||||||
|
|||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -4,7 +4,6 @@ src/qbittorrent
|
|||||||
src/qbittorrent-nox
|
src/qbittorrent-nox
|
||||||
src/release
|
src/release
|
||||||
src/debug
|
src/debug
|
||||||
CMakeLists.txt.user*
|
|
||||||
qbittorrent.pro.user*
|
qbittorrent.pro.user*
|
||||||
conf.pri
|
conf.pri
|
||||||
Makefile*
|
Makefile*
|
||||||
@@ -36,10 +35,3 @@ config.status
|
|||||||
src/icons/qbt-theme/build-icons/node_modules/
|
src/icons/qbt-theme/build-icons/node_modules/
|
||||||
src/icons/skin/build-icons/node_modules/
|
src/icons/skin/build-icons/node_modules/
|
||||||
src/icons/skin/build-icons/icons/*.png
|
src/icons/skin/build-icons/icons/*.png
|
||||||
|
|
||||||
# CMake build directory
|
|
||||||
build/
|
|
||||||
|
|
||||||
# Web UI tools
|
|
||||||
node_modules
|
|
||||||
package-lock.json
|
|
||||||
|
|||||||
228
.travis.yml
228
.travis.yml
File diff suppressed because it is too large
Load Diff
12
.tx/config
12
.tx/config
@@ -10,18 +10,10 @@ type = QT
|
|||||||
minimum_perc = 23
|
minimum_perc = 23
|
||||||
mode = developer
|
mode = developer
|
||||||
|
|
||||||
|
|
||||||
[qbittorrent.qbittorrentdesktop_master]
|
[qbittorrent.qbittorrentdesktop_master]
|
||||||
source_file = dist/unix/org.qbittorrent.qBittorrent.desktop
|
source_file = dist/unix/qbittorrent.desktop
|
||||||
source_lang = en
|
source_lang = en
|
||||||
type = DESKTOP
|
type = DESKTOP
|
||||||
minimum_perc = 23
|
minimum_perc = 23
|
||||||
mode = developer
|
mode = developer
|
||||||
|
|
||||||
[qbittorrent.qbittorrent_webui]
|
|
||||||
file_filter = src/webui/www/translations/webui_<lang>.ts
|
|
||||||
lang_map = pt: pt_PT
|
|
||||||
source_file = src/webui/www/translations/webui_en.ts
|
|
||||||
source_lang = en
|
|
||||||
type = QT
|
|
||||||
minimum_perc = 23
|
|
||||||
mode = developer
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
|||||||
|
|
||||||
message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.")
|
message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.")
|
||||||
|
|
||||||
if(POLICY CMP0074)
|
|
||||||
cmake_policy(SET CMP0074 NEW)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||||
include(FunctionReadVersion)
|
include(FunctionReadVersion)
|
||||||
|
|
||||||
@@ -34,10 +30,8 @@ include(GNUInstallDirs)
|
|||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
|
|
||||||
# version requirements
|
# version requirements
|
||||||
set(requiredBoostVersion 1.40)
|
set(requiredBoostVersion 1.35)
|
||||||
set(requiredQtVersion 5.9.0)
|
set(requiredQtVersion 5.5.1)
|
||||||
set(requiredOpensslVersion 1.0)
|
|
||||||
set(requiredLibtorrentVersion 1.1.10)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
include(winconf)
|
include(winconf)
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ Example:
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS // conditional
|
#ifdef Q_OS_MAC // conditional
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
48
INSTALL
48
INSTALL
@@ -1,26 +1,7 @@
|
|||||||
qBittorrent - A BitTorrent client in C++ / Qt
|
qBittorrent - A BitTorrent client in C++ / Qt
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
1) Install these dependencies:
|
1) Compile and install qBittorrent with Qt graphical interface
|
||||||
|
|
||||||
- Boost >= 1.40
|
|
||||||
|
|
||||||
- libtorrent-rasterbar >= 1.1.10 (by Arvid Norberg)
|
|
||||||
* https://www.libtorrent.org/
|
|
||||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
|
||||||
|
|
||||||
- OpenSSL >= 1.0
|
|
||||||
|
|
||||||
- Qt >= 5.9.0
|
|
||||||
|
|
||||||
- zlib >= 1.2.5.2
|
|
||||||
|
|
||||||
- pkg-config (compile-time only)
|
|
||||||
|
|
||||||
- Python >= 3.3.0 (optional, runtime only)
|
|
||||||
* Required by the internal search engine
|
|
||||||
|
|
||||||
2a) Compile and install qBittorrent with Qt graphical interface
|
|
||||||
|
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make && make install
|
$ make && make install
|
||||||
@@ -28,7 +9,21 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
|||||||
|
|
||||||
will install and execute qBittorrent.
|
will install and execute qBittorrent.
|
||||||
|
|
||||||
2b) Compile and install qBittorrent without Qt graphical interface
|
Dependencies:
|
||||||
|
- Qt >= 5.5.1
|
||||||
|
|
||||||
|
- pkg-config
|
||||||
|
|
||||||
|
- libtorrent-rasterbar >= 1.0.6 (by Arvid Norberg)
|
||||||
|
* https://www.libtorrent.org/
|
||||||
|
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||||
|
|
||||||
|
- Boost >= 1.35
|
||||||
|
|
||||||
|
- Python >= 2.7.9 / 3.3.0 (optional, runtime only)
|
||||||
|
* Required by the internal search engine
|
||||||
|
|
||||||
|
2) Compile and install qBittorrent without Qt graphical interface
|
||||||
|
|
||||||
$ ./configure --disable-gui
|
$ ./configure --disable-gui
|
||||||
$ make && make install
|
$ make && make install
|
||||||
@@ -36,6 +31,17 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
|||||||
|
|
||||||
will install and execute qBittorrent.
|
will install and execute qBittorrent.
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
- Qt >= 5.5.1
|
||||||
|
|
||||||
|
- pkg-config
|
||||||
|
|
||||||
|
- libtorrent-rasterbar >= 1.0.6 (by Arvid Norberg)
|
||||||
|
* https://www.libtorrent.org/
|
||||||
|
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||||
|
|
||||||
|
- Boost >= 1.35
|
||||||
|
|
||||||
DOCUMENTATION:
|
DOCUMENTATION:
|
||||||
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
|
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ It aims to be a good alternative to all other bittorrent clients
|
|||||||
out there. qBittorrent is fast, stable and provides unicode
|
out there. qBittorrent is fast, stable and provides unicode
|
||||||
support as well as many features.
|
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/).
|
This product includes GeoLite data created by MaxMind, available from
|
||||||
|
https://www.maxmind.com/
|
||||||
|
|
||||||
### Installation:
|
### Installation:
|
||||||
For installation, follow the instructions from INSTALL file, but simple:
|
For installation, follow the instructions from INSTALL file, but simple:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
@@ -255,8 +255,7 @@ EOF
|
|||||||
echo "compile $scriptversion"
|
echo "compile $scriptversion"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -340,9 +339,9 @@ exit $ret
|
|||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# sh-indentation: 2
|
# sh-indentation: 2
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
966
build-aux/config.guess
vendored
966
build-aux/config.guess
vendored
File diff suppressed because it is too large
Load Diff
2702
build-aux/config.sub
vendored
2702
build-aux/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2018-03-11.20; # UTC
|
scriptversion=2013-12-25.23; # UTC
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
@@ -271,18 +271,15 @@ do
|
|||||||
fi
|
fi
|
||||||
dst=$dst_arg
|
dst=$dst_arg
|
||||||
|
|
||||||
# If destination is a directory, append the input filename.
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
if test -d "$dst"; then
|
if test -d "$dst"; then
|
||||||
if test "$is_target_a_directory" = never; then
|
if test "$is_target_a_directory" = never; then
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dstdir=$dst
|
dstdir=$dst
|
||||||
dstbase=`basename "$src"`
|
dst=$dstdir/`basename "$src"`
|
||||||
case $dst in
|
|
||||||
*/) dst=$dst$dstbase;;
|
|
||||||
*) dst=$dst/$dstbase;;
|
|
||||||
esac
|
|
||||||
dstdir_status=0
|
dstdir_status=0
|
||||||
else
|
else
|
||||||
dstdir=`dirname "$dst"`
|
dstdir=`dirname "$dst"`
|
||||||
@@ -291,11 +288,6 @@ do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
*/) dstdirslash=$dstdir;;
|
|
||||||
*) dstdirslash=$dstdir/;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
if test $dstdir_status != 0; then
|
||||||
@@ -332,43 +324,34 @@ do
|
|||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
|
||||||
# here however when possible just to lower collision chance.
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
||||||
|
|
||||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
|
||||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
|
||||||
# directory is successfully created first before we actually test
|
|
||||||
# 'mkdir -p' feature.
|
|
||||||
if (umask $mkdir_umask &&
|
if (umask $mkdir_umask &&
|
||||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
|
||||||
then
|
then
|
||||||
if test -z "$dir_arg" || {
|
if test -z "$dir_arg" || {
|
||||||
# Check for POSIX incompatibilities with -m.
|
# Check for POSIX incompatibilities with -m.
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
test_tmpdir="$tmpdir/a"
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
case $ls_ld_tmpdir in
|
||||||
d????-?r-*) different_mode=700;;
|
d????-?r-*) different_mode=700;;
|
||||||
d????-?--*) different_mode=755;;
|
d????-?--*) different_mode=755;;
|
||||||
*) false;;
|
*) false;;
|
||||||
esac &&
|
esac &&
|
||||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
then posix_mkdir=:
|
then posix_mkdir=:
|
||||||
fi
|
fi
|
||||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
else
|
else
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
fi
|
fi
|
||||||
trap '' 0;;
|
trap '' 0;;
|
||||||
esac;;
|
esac;;
|
||||||
@@ -444,8 +427,8 @@ do
|
|||||||
else
|
else
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
# Make a couple of temp file names in the proper directory.
|
||||||
dsttmp=${dstdirslash}_inst.$$_
|
dsttmp=$dstdir/_inst.$$_
|
||||||
rmtmp=${dstdirslash}_rm.$$_
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
# Trap to clean up those temp files at exit.
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
@@ -510,9 +493,9 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2013-10-28.13; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -17,7 +17,7 @@ scriptversion=2018-03-07.03; # UTC
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
@@ -101,9 +101,9 @@ else
|
|||||||
exit $st
|
exit $st
|
||||||
fi
|
fi
|
||||||
|
|
||||||
perl_URL=https://www.perl.org/
|
perl_URL=http://www.perl.org/
|
||||||
flex_URL=https://github.com/westes/flex
|
flex_URL=http://flex.sourceforge.net/
|
||||||
gnu_software_URL=https://www.gnu.org/software
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
program_details ()
|
program_details ()
|
||||||
{
|
{
|
||||||
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
|||||||
exit $st
|
exit $st
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# time-stamp-start: "scriptversion="
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
# time-stamp-time-zone: "UTC0"
|
# time-stamp-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
|||||||
@@ -38,9 +38,8 @@ else()
|
|||||||
# libtorrent is very picky about those. Let's take a set of defaults and
|
# libtorrent is very picky about those. Let's take a set of defaults and
|
||||||
# hope that they apply. If not, you the user are on your own.
|
# hope that they apply. If not, you the user are on your own.
|
||||||
set(LibtorrentRasterbar_DEFINITIONS
|
set(LibtorrentRasterbar_DEFINITIONS
|
||||||
-DTORRENT_USE_LIBCRYPTO
|
|
||||||
# TODO: remove the following define as it is not used since OpenSSL >= 1.1
|
|
||||||
-DTORRENT_USE_OPENSSL
|
-DTORRENT_USE_OPENSSL
|
||||||
|
-DTORRENT_DISABLE_GEO_IP
|
||||||
-DBOOST_ASIO_ENABLE_CANCELIO
|
-DBOOST_ASIO_ENABLE_CANCELIO
|
||||||
-DUNICODE -D_UNICODE -D_FILE_OFFSET_BITS=64)
|
-DUNICODE -D_UNICODE -D_FILE_OFFSET_BITS=64)
|
||||||
endif()
|
endif()
|
||||||
@@ -48,7 +47,7 @@ else()
|
|||||||
if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
|
if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
|
||||||
list(APPEND LibtorrentRasterbar_DEFINITIONS
|
list(APPEND LibtorrentRasterbar_DEFINITIONS
|
||||||
-DTORRENT_LINKING_SHARED
|
-DTORRENT_LINKING_SHARED
|
||||||
-DBOOST_SYSTEM_DYN_LINK)
|
-DBOOST_SYSTEM_DYN_LINK -DBOOST_CHRONO_DYN_LINK)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
79
cmake/Modules/FindQtSingleApplication.cmake
Normal file
79
cmake/Modules/FindQtSingleApplication.cmake
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# - Try to find the QtSingleApplication includes and library
|
||||||
|
# which defines
|
||||||
|
#
|
||||||
|
# QtSingleApplication_FOUND - system has QtSingleApplication
|
||||||
|
# QtSingleApplication_INCLUDE_DIR - where to find header QtSingleApplication
|
||||||
|
# QtSingleApplication_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||||
|
# QtSingleApplication_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||||
|
|
||||||
|
# copyright (c) 2013 TI_Eugene ti.eugene@gmail.com
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the FreeBSD license.
|
||||||
|
|
||||||
|
SET(QtSingleApplication_FOUND FALSE)
|
||||||
|
|
||||||
|
if (Qt5Widgets_FOUND)
|
||||||
|
set(_includeFileName qtsingleapplication.h)
|
||||||
|
else()
|
||||||
|
set(_includeFileName qtsinglecoreapplication.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||||
|
FIND_PATH(QtSingleApplication_INCLUDE_DIR ${_includeFileName} ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||||
|
|
||||||
|
IF(QtSingleApplication_INCLUDE_DIR)
|
||||||
|
BREAK()
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
SET(QtSingleApplication_NAMES ${QtSingleApplication_NAMES}
|
||||||
|
Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
|
||||||
|
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||||
|
GET_TARGET_PROPERTY(_QT5_CORELIBRARY Qt5::Core LOCATION)
|
||||||
|
GET_FILENAME_COMPONENT(_QT5_CORELIBRARYPATH ${_QT5_CORELIBRARY} PATH)
|
||||||
|
|
||||||
|
FIND_LIBRARY(QtSingleApplication_LIBRARY
|
||||||
|
NAMES ${QtSingleApplication_NAMES}
|
||||||
|
PATHS ${_QT5_CORELIBRARYPATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||||
|
|
||||||
|
SET(QtSingleApplication_LIBRARIES ${QtSingleApplication_LIBRARY})
|
||||||
|
SET(QtSingleApplication_FOUND TRUE)
|
||||||
|
|
||||||
|
IF (CYGWIN)
|
||||||
|
IF(BUILD_SHARED_LIBS)
|
||||||
|
# No need to define QtSingleApplication_USE_DLL here, because it's default for Cygwin.
|
||||||
|
ELSE(BUILD_SHARED_LIBS)
|
||||||
|
SET (QtSingleApplication_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||||
|
ENDIF(BUILD_SHARED_LIBS)
|
||||||
|
ENDIF (CYGWIN)
|
||||||
|
|
||||||
|
ENDIF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF (QtSingleApplication_FOUND)
|
||||||
|
IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found QtSingleApplication: ${QtSingleApplication_LIBRARY}")
|
||||||
|
MESSAGE(STATUS " includes: ${QtSingleApplication_INCLUDE_DIR}")
|
||||||
|
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||||
|
if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||||
|
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||||
|
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
if(EXISTS "${QtSingleApplication_LIBRARY}")
|
||||||
|
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||||
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||||
|
IMPORTED_LOCATION "${QtSingleApplication_LIBRARY}")
|
||||||
|
endif()
|
||||||
|
endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||||
|
|
||||||
|
ELSE (QtSingleApplication_FOUND)
|
||||||
|
IF (QtSingleApplication_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could not find QtSingleApplication library")
|
||||||
|
ENDIF (QtSingleApplication_FIND_REQUIRED)
|
||||||
|
ENDIF (QtSingleApplication_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(QtSingleApplication_INCLUDE_DIR QtSingleApplication_LIBRARY)
|
||||||
@@ -1,36 +1,38 @@
|
|||||||
macro(configure_msvc_runtime)
|
macro(configure_msvc_runtime)
|
||||||
# Default to statically-linked runtime.
|
if(MSVC)
|
||||||
if("${MSVC_RUNTIME}" STREQUAL "")
|
# Default to statically-linked runtime.
|
||||||
set(MSVC_RUNTIME "static")
|
if("${MSVC_RUNTIME}" STREQUAL "")
|
||||||
endif()
|
set(MSVC_RUNTIME "static")
|
||||||
# Set compiler options.
|
endif()
|
||||||
set(variables
|
# Set compiler options.
|
||||||
CMAKE_C_FLAGS_DEBUG
|
set(variables
|
||||||
CMAKE_C_FLAGS_MINSIZEREL
|
CMAKE_C_FLAGS_DEBUG
|
||||||
CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS_MINSIZEREL
|
||||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_DEBUG
|
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
CMAKE_CXX_FLAGS_DEBUG
|
||||||
CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
CMAKE_CXX_FLAGS_RELEASE
|
||||||
)
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
if(${MSVC_RUNTIME} STREQUAL "static")
|
|
||||||
message(STATUS
|
|
||||||
"MSVC -> forcing use of statically-linked runtime."
|
|
||||||
)
|
)
|
||||||
foreach(variable ${variables})
|
if(${MSVC_RUNTIME} STREQUAL "static")
|
||||||
if(${variable} MATCHES "/MD")
|
message(STATUS
|
||||||
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
"MSVC -> forcing use of statically-linked runtime."
|
||||||
endif()
|
)
|
||||||
endforeach()
|
foreach(variable ${variables})
|
||||||
else()
|
if(${variable} MATCHES "/MD")
|
||||||
message(STATUS
|
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
||||||
"MSVC -> forcing use of dynamically-linked runtime."
|
endif()
|
||||||
)
|
endforeach()
|
||||||
foreach(variable ${variables})
|
else()
|
||||||
if(${variable} MATCHES "/MT")
|
message(STATUS
|
||||||
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
"MSVC -> forcing use of dynamically-linked runtime."
|
||||||
endif()
|
)
|
||||||
endforeach()
|
foreach(variable ${variables})
|
||||||
|
if(${variable} MATCHES "/MT")
|
||||||
|
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
49
cmake/Modules/MacroGlibcDetect.cmake
Normal file
49
cmake/Modules/MacroGlibcDetect.cmake
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
###############################################################
|
||||||
|
#
|
||||||
|
# Copyright 2011 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
||||||
|
# may not use this file except in compliance with the License. You may
|
||||||
|
# obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
###############################################################
|
||||||
|
|
||||||
|
MACRO (GLIBC_DETECT _VERSION)
|
||||||
|
|
||||||
|
# there are multiple ways to detect glibc, but given nmi's
|
||||||
|
# cons'd up paths I will trust only gcc. I guess I could also use
|
||||||
|
# ldd --version to detect.
|
||||||
|
|
||||||
|
set(_GLIB_SOURCE_DETECT "
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
printf(\"%d%d\",__GLIBC__, __GLIBC_MINOR__);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
")
|
||||||
|
|
||||||
|
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/build/cmake/glibc.cpp "${_GLIB_SOURCE_DETECT}\n")
|
||||||
|
|
||||||
|
try_run(POST26_GLIBC_DETECTED
|
||||||
|
POST26_GLIBC_COMPILE
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/build/cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/build/cmake/glibc.cpp
|
||||||
|
RUN_OUTPUT_VARIABLE GLIBC_VERSION )
|
||||||
|
|
||||||
|
if (GLIBC_VERSION AND POST26_GLIBC_COMPILE )
|
||||||
|
set(${_VERSION} ${GLIBC_VERSION})
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTE: Could not detect GLIBC_VERSION from compiler")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ENDMACRO (GLIBC_DETECT)
|
||||||
@@ -10,22 +10,22 @@ macro(qbt_set_compiler_options)
|
|||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
#-Wshadow -Wconversion ?
|
#-Wshadow -Wconversion ?
|
||||||
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
|
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
|
||||||
"-Wcast-qual -Wcast-align"
|
"-Wfloat-equal -Wcast-qual -Wcast-align"
|
||||||
"-Winvalid-pch -Wno-long-long"
|
"-Wsign-conversion -Winvalid-pch -Wno-long-long"
|
||||||
#"-fstack-protector-all"
|
#"-fstack-protector-all"
|
||||||
#"-Werror -Wno-error=deprecated-declarations"
|
#"-Werror -Wno-error=deprecated-declarations"
|
||||||
)
|
)
|
||||||
set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
||||||
"-Woverloaded-virtual -Wold-style-cast"
|
"-Woverloaded-virtual -Wold-style-cast"
|
||||||
"-Wnon-virtual-dtor"
|
"-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align"
|
||||||
#"-Weffc++"
|
#"-Weffc++"
|
||||||
#"-Werror -Wno-error=cpp"
|
#"-Werror -Wno-error=cpp"
|
||||||
# we should modify code to make these ones obsolete
|
# we should modify code to make these ones obsolete
|
||||||
#"-Wno-error=sign-conversion -Wno-error=float-equal"
|
#"-Wno-error=sign-conversion -Wno-error=float-equal"
|
||||||
)
|
)
|
||||||
|
|
||||||
# GCC 4.8 has problems with std::array and its initialization
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||||
|
# GCC 4.8 has problems with std::array and its initialization
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=missing-field-initializers")
|
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=missing-field-initializers")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -39,18 +39,29 @@ macro(qbt_set_compiler_options)
|
|||||||
endif (_PEDANTIC_IS_SUPPORTED)
|
endif (_PEDANTIC_IS_SUPPORTED)
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||||
add_definitions(-D_DEFAULT_SOURCE)
|
# if Glibc version is 2.20 or higher, set -D_DEFAULT_SOURCE
|
||||||
endif()
|
include(MacroGlibcDetect)
|
||||||
|
message(STATUS "Detecting Glibc version...")
|
||||||
|
glibc_detect(GLIBC_VERSION)
|
||||||
|
if(${GLIBC_VERSION})
|
||||||
|
if(GLIBC_VERSION LESS "220")
|
||||||
|
message(STATUS "Glibc version is ${GLIBC_VERSION}")
|
||||||
|
else(GLIBC_VERSION LESS "220")
|
||||||
|
message(STATUS "Glibc version is ${GLIBC_VERSION}, adding -D_DEFAULT_SOURCE")
|
||||||
|
add_definitions(-D_DEFAULT_SOURCE)
|
||||||
|
endif(GLIBC_VERSION LESS "220")
|
||||||
|
endif(${GLIBC_VERSION})
|
||||||
|
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||||
|
|
||||||
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
|
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
|
||||||
check_cxx_compiler_flag(-Wstrict-null-sentinel _STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
check_cxx_compiler_flag(-Wstrict-null-sentinel _STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||||
if (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
if (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||||
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||||
|
|
||||||
# Code should be improved to render this not needed
|
# Code should be improved to render this not needed
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function")
|
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function -Wno-error=inconsistent-missing-override")
|
||||||
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
# GCC supports it
|
# GCC supports it
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||||
@@ -61,14 +72,31 @@ macro(qbt_set_compiler_options)
|
|||||||
|
|
||||||
string(APPEND CMAKE_C_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING}")
|
string(APPEND CMAKE_C_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING}")
|
||||||
string(APPEND CMAKE_CXX_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING} ${_GCC_COMMON_CXX_FLAGS_STRING}")
|
string(APPEND CMAKE_CXX_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING} ${_GCC_COMMON_CXX_FLAGS_STRING}")
|
||||||
|
|
||||||
|
set(QBT_ADDITONAL_FLAGS "${_GCC_COMMON_C_AND_CXX_FLAGS_STRING}" CACHE STRING
|
||||||
|
"Additional qBittorent compile flags" FORCE)
|
||||||
|
set(QBT_ADDITONAL_CXX_FLAGS "${_GCC_COMMON_CXX_FLAGS_STRING}" CACHE STRING
|
||||||
|
"Additional qBittorent C++ compile flags" FORCE)
|
||||||
|
|
||||||
|
# check whether we can enable -Og optimization for debug build
|
||||||
|
# also let's enable -march=native for debug builds
|
||||||
|
check_cxx_compiler_flag(-Og _DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
|
||||||
|
|
||||||
|
if (_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
|
||||||
|
string(APPEND CMAKE_C_FLAGS_DEBUG " -Og -g3 -march=native -pipe" )
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -Og -g3 -march=native -pipe" )
|
||||||
|
else(_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
|
||||||
|
string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g3 -march=native -pipe" )
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g3 -march=native -pipe" )
|
||||||
|
endif (_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
|
||||||
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
set(QBT_ADDITONAL_FLAGS "/wd4251 /wd4275 /wd4290 /W4" CACHE STRING "Additional qBittorent compile flags")
|
set(QBT_ADDITONAL_FLAGS "-wd4290 -wd4275 -wd4251 /W4" CACHE STRING "Additional qBittorent compile flags")
|
||||||
|
string(APPEND CMAKE_C_FLAGS " ${QBT_ADDITONAL_FLAGS}")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS " ${QBT_ADDITONAL_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
string(APPEND CMAKE_C_FLAGS " ${QBT_ADDITONAL_FLAGS}")
|
|
||||||
string(APPEND CMAKE_CXX_FLAGS " ${QBT_ADDITONAL_FLAGS}")
|
|
||||||
|
|
||||||
# endif (NOT QBT_ADDITONAL_FLAGS)
|
# endif (NOT QBT_ADDITONAL_FLAGS)
|
||||||
endmacro(qbt_set_compiler_options)
|
endmacro(qbt_set_compiler_options)
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
|
if (STACKTRACE)
|
||||||
|
if ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||||
|
add_compile_options(-fno-omit-frame-pointer)
|
||||||
|
endif ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||||
|
link_libraries(libdbghelp -Wl,--export-all-symbols)
|
||||||
|
endif (STACKTRACE)
|
||||||
|
|
||||||
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
||||||
link_libraries(-Wl,--dynamicbase)
|
link_libraries(-Wl,--dynamicbase)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
|
||||||
-D_FILE_OFFSET_BITS=64
|
|
||||||
-D__USE_W32_SOCKETS)
|
|
||||||
|
|
||||||
# libraries from winconf.pri
|
|
||||||
link_libraries(advapi32 iphlpapi ole32 shell32 user32 wsock32 ws2_32)
|
|
||||||
|
|
||||||
|
# LIBS += libadvapi32 libshell32 libuser32
|
||||||
|
# LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll
|
||||||
|
# LIBS += libpowrprof
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
|
if (STACKTRACE)
|
||||||
|
if ("${WINXXBITS}" STREQUAL "Win64")
|
||||||
|
add_compile_options(-Zi)
|
||||||
|
else ("${WINXXBITS}" STREQUAL "Win64")
|
||||||
|
# i686 arch requires frame pointer preservation
|
||||||
|
add_compile_options(-Oy-)
|
||||||
|
endif ("${WINXXBITS}" STREQUAL "Win64")
|
||||||
|
link_libraries(dbghelp.lib)
|
||||||
|
endif (STACKTRACE)
|
||||||
|
|
||||||
|
# Enable Wide characters
|
||||||
|
add_definitions(-DTORRENT_USE_WPATH)
|
||||||
|
|
||||||
|
if (NOT QT5)
|
||||||
|
# Qt4 does not detect it itself
|
||||||
|
add_definitions(-DQ_COMPILER_INITIALIZER_LISTS)
|
||||||
|
endif (NOT QT5)
|
||||||
|
|
||||||
include(MacroConfigureMSVCRuntime)
|
include(MacroConfigureMSVCRuntime)
|
||||||
set(MSVC_RUNTIME "dynamic")
|
set(MSVC_RUNTIME "dynamic")
|
||||||
configure_msvc_runtime()
|
configure_msvc_runtime()
|
||||||
|
|
||||||
# libraries from winconf.pri
|
|
||||||
link_libraries(advapi32 crypt32 Iphlpapi ole32 shell32 User32)
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,51 +2,33 @@
|
|||||||
|
|
||||||
list(APPEND CMAKE_LIBRARY_PATH "$ENV{LIB}")
|
list(APPEND CMAKE_LIBRARY_PATH "$ENV{LIB}")
|
||||||
|
|
||||||
|
# We want to link with static version of
|
||||||
|
# libtorrent
|
||||||
|
set(LibtorrentRasterbar_USE_STATIC_LIBS True)
|
||||||
set(LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
set(LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
||||||
-DBOOST_ASIO_DISABLE_CONNECTEX
|
-DBOOST_ALL_NO_LIB -DBOOST_ASIO_HASH_MAP_BUCKETS=1021
|
||||||
|
-DBOOST_ASIO_SEPARATE_COMPILATION
|
||||||
-DBOOST_EXCEPTION_DISABLE
|
-DBOOST_EXCEPTION_DISABLE
|
||||||
-DTORRENT_USE_LIBCRYPTO
|
-DBOOST_SYSTEM_STATIC_LINK=1
|
||||||
# TODO: remove the following define as it is not used since OpenSSL >= 1.1
|
|
||||||
-DTORRENT_USE_OPENSSL
|
-DTORRENT_USE_OPENSSL
|
||||||
# TODO: remove the following define as it is not used since libtorrent >= 1.2
|
-D__USE_W32_SOCKETS
|
||||||
-DTORRENT_DISABLE_RESOLVE_COUNTRIES
|
-D_FILE_OFFSET_BITS=64)
|
||||||
)
|
|
||||||
|
|
||||||
set(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES system)
|
add_definitions(-DUNICODE
|
||||||
|
|
||||||
# If you want to link with static version of libtorrent
|
|
||||||
#set(LibtorrentRasterbar_USE_STATIC_LIBS True)
|
|
||||||
#list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
|
||||||
# -DBOOST_SYSTEM_STATIC_LINK=1)
|
|
||||||
|
|
||||||
# and boost
|
|
||||||
#set(Boost_USE_STATIC_LIBS True)
|
|
||||||
#set(Boost_USE_STATIC_RUNTIME True)
|
|
||||||
|
|
||||||
add_definitions(
|
|
||||||
-DNTDDI_VERSION=0x06010000
|
|
||||||
-D_WIN32_WINNT=0x0601
|
|
||||||
-D_WIN32_IE=0x0601
|
|
||||||
-DUNICODE
|
|
||||||
-D_UNICODE
|
-D_UNICODE
|
||||||
-DWIN32
|
-DWIN32
|
||||||
-D_WIN32
|
-D_WIN32
|
||||||
-DWIN32_LEAN_AND_MEAN
|
-DWIN32_LEAN_AND_MEAN
|
||||||
|
-DNTDDI_VERSION=0x05010000
|
||||||
|
-D_WIN32_WINNT=0x0501
|
||||||
|
-D_WIN32_IE=0x0501
|
||||||
-D_CRT_SECURE_NO_DEPRECATE
|
-D_CRT_SECURE_NO_DEPRECATE
|
||||||
-D_SCL_SECURE_NO_DEPRECATE
|
-D_SCL_SECURE_NO_DEPRECATE
|
||||||
-DNOMINMAX
|
-DNOMINMAX
|
||||||
-DBOOST_ALL_NO_LIB
|
|
||||||
)
|
)
|
||||||
|
# and boost
|
||||||
# Enable if libtorrent was built with this flag defined
|
set(Boost_USE_STATIC_LIBS True)
|
||||||
#list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS -DTORRENT_NO_DEPRECATE)
|
# set(Boost_USE_STATIC_RUNTIME True)
|
||||||
|
|
||||||
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
|
||||||
list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
|
||||||
-DTORRENT_DEBUG)
|
|
||||||
else ()
|
|
||||||
add_definitions(-DNDEBUG)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Here we assume that all required libraries are installed into the same prefix
|
# Here we assume that all required libraries are installed into the same prefix
|
||||||
# with usual unix subdirectories (bin, lib, include)
|
# with usual unix subdirectories (bin, lib, include)
|
||||||
@@ -56,9 +38,17 @@ set(COMMON_INSTALL_PREFIX "c:/usr" CACHE PATH "Prefix used to install all the re
|
|||||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${COMMON_INSTALL_PREFIX}")
|
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${COMMON_INSTALL_PREFIX}")
|
||||||
|
|
||||||
# If two version of Qt are installed, separate prefixes are needed most likely
|
# If two version of Qt are installed, separate prefixes are needed most likely
|
||||||
|
set(QT4_INSTALL_PREFIX "${COMMON_INSTALL_PREFIX}/lib/qt4" CACHE PATH "Prefix where Qt4 is installed")
|
||||||
set(QT5_INSTALL_PREFIX "${COMMON_INSTALL_PREFIX}/lib/qt5" CACHE PATH "Prefix where Qt5 is installed")
|
set(QT5_INSTALL_PREFIX "${COMMON_INSTALL_PREFIX}/lib/qt5" CACHE PATH "Prefix where Qt5 is installed")
|
||||||
|
|
||||||
# it is safe to set Qt dirs even if their files are directly in the prefix
|
# it is safe to set Qt dirs even if their files are directly in the prefix
|
||||||
|
# Qt4
|
||||||
|
if(NOT QT5)
|
||||||
|
# for qt 4 we need qmake, Qt5 provides cmake config files
|
||||||
|
LIST(APPEND CMAKE_PROGRAM_PATH "${QT4_INSTALL_PREFIX}/bin/")
|
||||||
|
endif(NOT QT5)
|
||||||
|
|
||||||
|
# Qt5
|
||||||
set(Qt5_DIR "${QT5_INSTALL_PREFIX}/lib/cmake/Qt5")
|
set(Qt5_DIR "${QT5_INSTALL_PREFIX}/lib/cmake/Qt5")
|
||||||
|
|
||||||
# And now we can set specific values for the Boost and libtorrent libraries.
|
# And now we can set specific values for the Boost and libtorrent libraries.
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ BINDIR = @EXPAND_BINDIR@
|
|||||||
DATADIR = @EXPAND_DATADIR@
|
DATADIR = @EXPAND_DATADIR@
|
||||||
MANPREFIX = @EXPAND_MANDIR@
|
MANPREFIX = @EXPAND_MANDIR@
|
||||||
|
|
||||||
QMAKE_CC = @QBT_CC@
|
|
||||||
QMAKE_CXX = @QBT_CXX@
|
|
||||||
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
|
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
|
||||||
|
|
||||||
EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@
|
EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@
|
||||||
|
|||||||
@@ -35,15 +35,26 @@ LIBS += zlib.lib
|
|||||||
#LIBS += libcrypto libssl
|
#LIBS += libcrypto libssl
|
||||||
#LIBS += libz
|
#LIBS += libz
|
||||||
|
|
||||||
|
DEFINES += NTDDI_VERSION=0x05010000
|
||||||
|
DEFINES += _WIN32_WINNT=0x0501
|
||||||
|
DEFINES += _WIN32_IE=0x0501
|
||||||
|
|
||||||
# Disable to use Boost auto-linking
|
# Disable to use Boost auto-linking
|
||||||
DEFINES += BOOST_ALL_NO_LIB
|
DEFINES += BOOST_ALL_NO_LIB
|
||||||
# Use one of the following options
|
# Use one of the following options
|
||||||
DEFINES += BOOST_SYSTEM_STATIC_LINK
|
DEFINES += BOOST_SYSTEM_STATIC_LINK
|
||||||
#DEFINES += BOOST_SYSTEM_DYN_LINK
|
#DEFINES += BOOST_SYSTEM_DYN_LINK
|
||||||
|
# Boost 1.60+ defaults to Vista+ support. The define below enables XP support again.
|
||||||
|
DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
|
||||||
|
# Enable if building against libtorrent 1.0.x (RC_1_0) (static linking)
|
||||||
|
#DEFINES += BOOST_ASIO_SEPARATE_COMPILATION
|
||||||
|
# Enable if building against libtorrent 1.0.x (RC_1_0) (dynamic linking)
|
||||||
|
#DEFINES += BOOST_ASIO_DYN_LINK
|
||||||
# Enable if encountered build error with boost version <= 1.59
|
# Enable if encountered build error with boost version <= 1.59
|
||||||
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||||
|
|
||||||
# Enable if libtorrent was built with this flag defined
|
# Enable if building against libtorrent 1.1.x (RC_1_1)
|
||||||
|
# built with this flag defined
|
||||||
#DEFINES += TORRENT_NO_DEPRECATE
|
#DEFINES += TORRENT_NO_DEPRECATE
|
||||||
# Enable if linking dynamically against libtorrent
|
# Enable if linking dynamically against libtorrent
|
||||||
#DEFINES += TORRENT_LINKING_SHARED
|
#DEFINES += TORRENT_LINKING_SHARED
|
||||||
|
|||||||
104
configure.ac
104
configure.ac
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([qbittorrent], [v4.2.5], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
AC_INIT([qbittorrent], [v4.1.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@@ -8,12 +8,16 @@ AC_LANG(C++)
|
|||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
# use compiler from env variables if available
|
|
||||||
QBT_CC="$CC"
|
|
||||||
QBT_CXX="$CXX"
|
|
||||||
|
|
||||||
# Define --wth-* and --enable-* arguments
|
# Define --wth-* and --enable-* arguments
|
||||||
|
|
||||||
|
AC_ARG_WITH(qtsingleapplication,
|
||||||
|
[AS_HELP_STRING([--with-qtsingleapplication=@<:@system|shipped@:>@],
|
||||||
|
[Use the shipped qtsingleapplication library or the system one (default=shipped)])],
|
||||||
|
[],
|
||||||
|
[with_qtsingleapplication=shipped])
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[AS_HELP_STRING([--enable-debug],
|
[AS_HELP_STRING([--enable-debug],
|
||||||
[Enable debug build])],
|
[Enable debug build])],
|
||||||
@@ -157,14 +161,15 @@ AS_CASE(["x$enable_qt_dbus"],
|
|||||||
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
||||||
|
|
||||||
|
|
||||||
AX_BOOST_BASE([1.40],
|
AX_BOOST_BASE([1.35],
|
||||||
[AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
|
[AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS"
|
||||||
AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
|
Boost LDFLAGS: "$BOOST_LDFLAGS"])],
|
||||||
[AC_MSG_ERROR([Could not find Boost])])
|
[AC_MSG_ERROR([Could not find Boost])])
|
||||||
CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"
|
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||||
|
|
||||||
# add workaround for problematic boost version
|
# add workaround for problematic boost version
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
# taken from ax_boost_base.m4
|
# taken from ax_boost_base.m4
|
||||||
m4_define([DETECT_BOOST_VERSION_PROGRAM],
|
m4_define([DETECT_BOOST_VERSION_PROGRAM],
|
||||||
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
|
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
|
||||||
@@ -172,57 +177,33 @@ m4_define([DETECT_BOOST_VERSION_PROGRAM],
|
|||||||
|
|
||||||
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
|
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
|
||||||
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
|
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
|
||||||
|
AC_LANG_POP([C++])
|
||||||
|
|
||||||
AX_BOOST_SYSTEM()
|
AX_BOOST_SYSTEM()
|
||||||
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||||
|
|
||||||
PKG_CHECK_MODULES(libtorrent,
|
AC_MSG_CHECKING([which qtsingleapplication to use])
|
||||||
[libtorrent-rasterbar >= 1.1.10],
|
AS_CASE(["x$with_qtsingleapplication"],
|
||||||
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
|
["xshipped"],
|
||||||
LIBS="$libtorrent_LIBS $LIBS"])
|
[AC_MSG_RESULT([shipped])
|
||||||
|
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG usesystemqtsingleapplication"],
|
||||||
|
["xsystem"],
|
||||||
|
[AC_MSG_RESULT([system])
|
||||||
|
QBT_ADD_CONFIG="$QBT_ADD_CONFIG usesystemqtsingleapplication"],
|
||||||
|
[AC_MSG_RESULT([$with_qtsingleapplication])
|
||||||
|
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(openssl,
|
PKG_CHECK_MODULES(libtorrent,
|
||||||
[openssl >= 1.0],
|
[libtorrent-rasterbar >= 1.0.6],
|
||||||
[CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
|
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$openssl_LIBS $LIBS"])
|
LIBS="$libtorrent_LIBS $LIBS"])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(zlib,
|
PKG_CHECK_MODULES(zlib,
|
||||||
[zlib >= 1.2.5.2],
|
[zlib >= 1.2.5.2],
|
||||||
[CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
|
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$zlib_LIBS $LIBS"])
|
LIBS="$zlib_LIBS $LIBS"])
|
||||||
|
|
||||||
# Check if already in >= C++14 mode because of the flags returned by one of the above packages
|
|
||||||
TMP_CXXFLAGS="$CXXFLAGS"
|
|
||||||
CXXFLAGS=""
|
|
||||||
AC_MSG_CHECKING([if compiler defaults to C++14 or later mode])
|
|
||||||
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
QBT_CXX14_FOUND="yes"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_CXX14_FOUND="no"])
|
|
||||||
|
|
||||||
# In case of no, check if the compiler can support at least C++14
|
|
||||||
# and if yes, enable it leaving a warning to the user
|
|
||||||
AS_IF([test "x$QBT_CXX14_FOUND" = "xno"],
|
|
||||||
[AC_MSG_CHECKING([if compiler supports C++14])
|
|
||||||
CXXFLAGS="-std=c++14"
|
|
||||||
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
AC_MSG_CHECKING([if C++14 is disabled by the set compiler flags])
|
|
||||||
# prepend the flag so it won't override conflicting user defined flags
|
|
||||||
CXXFLAGS="-std=c++14 $TMP_CXXFLAGS"
|
|
||||||
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++14"
|
|
||||||
AC_MSG_WARN([C++14 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
AC_MSG_ERROR([The compiler supports C++14 but the user or a dependency has explicitly enabled a lower mode.])])],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
AC_MSG_ERROR([A compiler supporting C++14 is required.])])
|
|
||||||
])
|
|
||||||
CXXFLAGS="$TMP_CXXFLAGS"
|
|
||||||
|
|
||||||
# These are required because autoconf doesn't expand these **particular**
|
# These are required because autoconf doesn't expand these **particular**
|
||||||
# vars automatically. And qmake cannot autoexpand them.
|
# vars automatically. And qmake cannot autoexpand them.
|
||||||
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
|
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
|
||||||
@@ -249,20 +230,18 @@ extract() {
|
|||||||
for i in $string; do
|
for i in $string; do
|
||||||
case "$(echo "$i" | cut -c1)" in
|
case "$(echo "$i" | cut -c1)" in
|
||||||
'') ;;
|
'') ;;
|
||||||
D) QBT_CONF_DEFINES="$QBT_CONF_DEFINES $(echo $i | cut -c2-)";;
|
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";;
|
||||||
I) QBT_CONF_INCLUDES="$QBT_CONF_INCLUDES $(echo $i | cut -c2-)";;
|
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";;
|
||||||
*) QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS -$i";;
|
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
IFS=$SAVEIFS
|
IFS=$SAVEIFS
|
||||||
}
|
}
|
||||||
|
|
||||||
extract "$CFLAGS $CXXFLAGS"
|
extract "$CFLAGS $CPPFLAGS $CXXFLAGS"
|
||||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
|
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
|
||||||
|
|
||||||
# Substitute the values of these vars in conf.pri.in
|
# Substitute the values of these vars in conf.pri.in
|
||||||
AC_SUBST(QBT_CC)
|
|
||||||
AC_SUBST(QBT_CXX)
|
|
||||||
AC_SUBST(QBT_CONF_INCLUDES)
|
AC_SUBST(QBT_CONF_INCLUDES)
|
||||||
AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
|
AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
|
||||||
AC_SUBST(QBT_ADD_CONFIG)
|
AC_SUBST(QBT_ADD_CONFIG)
|
||||||
@@ -274,14 +253,17 @@ AC_OUTPUT(conf.pri)
|
|||||||
AS_IF([test "x$enable_systemd" = "xyes"],
|
AS_IF([test "x$enable_systemd" = "xyes"],
|
||||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
|
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_NOTICE([Running qmake to generate the makefile...])
|
AC_MSG_NOTICE([Running qmake to generate the makefile...])
|
||||||
TOPDIR="$(cd "$(dirname "$0")" && pwd)"
|
CONFDIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
$QT_QMAKE -r "$TOPDIR/qbittorrent.pro" "QMAKE_LRELEASE=$QMAKE_LRELEASE"
|
|
||||||
qmake_ret="$?"
|
$QT_QMAKE -r [$CONFDIR]/qbittorrent.pro "QMAKE_LRELEASE=$QMAKE_LRELEASE"
|
||||||
|
|
||||||
|
ret="$?"
|
||||||
|
|
||||||
AS_ECHO()
|
AS_ECHO()
|
||||||
AS_IF([test "x$qmake_ret" != "x0"],
|
AS_IF([test "x$ret" = "x0"],
|
||||||
[AC_MSG_ERROR([$QT_QMAKE failed to generate the makefile])])
|
[AC_MSG_NOTICE([Good, your configure finished.])],
|
||||||
|
[AC_MSG_ERROR([Failed running $QT_QMAKE to generate the makefile])])
|
||||||
AC_MSG_NOTICE([Good, the configure finished.])
|
|
||||||
AS_ECHO()
|
AS_ECHO()
|
||||||
|
|||||||
32
dist/mac/Info.plist
vendored
32
dist/mac/Info.plist
vendored
@@ -2,10 +2,6 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>qBittorrent</string>
|
|
||||||
<key>CFBundleDocumentTypes</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -25,10 +21,6 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>org.bittorrent.torrent</string>
|
<string>org.bittorrent.torrent</string>
|
||||||
</array>
|
</array>
|
||||||
<key>NSExportableTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>org.bittorrent.torrent</string>
|
|
||||||
</array>
|
|
||||||
<key>LSIsAppleDefaultForType</key>
|
<key>LSIsAppleDefaultForType</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
@@ -36,8 +28,6 @@
|
|||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>magnet</string>
|
<string>magnet</string>
|
||||||
@@ -55,19 +45,21 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.2.5</string>
|
<string>4.1.4</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>qBit</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>@EXECUTABLE@</string>
|
<string>@EXECUTABLE@</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.qbittorrent.qBittorrent</string>
|
<string>org.qbittorrent</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}.0</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>True</string>
|
||||||
<key>NSAppleScriptEnabled</key>
|
<key>NSAppleScriptEnabled</key>
|
||||||
<string>YES</string>
|
<string>YES</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright © 2006-2020 The qBittorrent project</string>
|
<string>Copyright © 2006-2018 The qBittorrent project</string>
|
||||||
<key>UTExportedTypeDeclarations</key>
|
<key>UTExportedTypeDeclarations</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -84,21 +76,17 @@
|
|||||||
<key>UTTypeIdentifier</key>
|
<key>UTTypeIdentifier</key>
|
||||||
<string>org.bittorrent.torrent</string>
|
<string>org.bittorrent.torrent</string>
|
||||||
<key>UTTypeReferenceURL</key>
|
<key>UTTypeReferenceURL</key>
|
||||||
<string>https://www.bittorrent.org/beps/bep_0000.html</string>
|
<string>http://www.bittorrent.org/beps/bep_0000.html</string>
|
||||||
<key>UTTypeTagSpecification</key>
|
<key>UTTypeTagSpecification</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.ostype</key>
|
<key>com.apple.ostype</key>
|
||||||
<array>
|
<string>TORR</string>
|
||||||
<string>TORR</string>
|
|
||||||
</array>
|
|
||||||
<key>public.filename-extension</key>
|
<key>public.filename-extension</key>
|
||||||
<array>
|
<array>
|
||||||
<string>torrent</string>
|
<string>torrent</string>
|
||||||
</array>
|
</array>
|
||||||
<key>public.mime-type</key>
|
<key>public.mime-type</key>
|
||||||
<array>
|
<string>application/x-bittorrent</string>
|
||||||
<string>application/x-bittorrent</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|||||||
BIN
dist/mac/qBitTorrentDocument.icns
vendored
BIN
dist/mac/qBitTorrentDocument.icns
vendored
Binary file not shown.
BIN
dist/mac/qbittorrent_mac.icns
vendored
BIN
dist/mac/qbittorrent_mac.icns
vendored
Binary file not shown.
BIN
dist/qt-translations/qt_ar.qm
vendored
Normal file
BIN
dist/qt-translations/qt_ar.qm
vendored
Normal file
Binary file not shown.
BIN
dist/qt-translations/qt_bg.qm
vendored
Normal file
BIN
dist/qt-translations/qt_bg.qm
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user