Delete unnecessary files
|
@ -1,58 +0,0 @@
|
||||||
version: '{branch}-{build}'
|
|
||||||
|
|
||||||
# Do not build on tags (GitHub only)
|
|
||||||
skip_tags: true
|
|
||||||
|
|
||||||
image: Visual Studio 2017
|
|
||||||
|
|
||||||
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
|
|
||||||
QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries.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_32.7z" -o"c:\qbt" > nul
|
|
||||||
|
|
||||||
before_build:
|
|
||||||
# setup env
|
|
||||||
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
|
|
||||||
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
|
|
||||||
# setup project
|
|
||||||
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
|
|
||||||
- COPY /Y "%CACHE_DIR%\winconf-msvc.pri" "%REPO_DIR%"
|
|
||||||
# workarounds
|
|
||||||
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- cd "%REPO_DIR%"
|
|
||||||
- qmake qbittorrent.pro && cd src && qmake src.pro
|
|
||||||
- jom -j2 -f Makefile.Release
|
|
||||||
|
|
||||||
test: off
|
|
|
@ -1,12 +0,0 @@
|
||||||
# EditorConfig is awesome: http://EditorConfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
[**.yml]
|
|
||||||
indent_size = 2
|
|
14
.github/ISSUE_TEMPLATE.md
vendored
|
@ -1,14 +0,0 @@
|
||||||
**Please provide the following information**
|
|
||||||
|
|
||||||
### qBittorrent version and Operating System:
|
|
||||||
|
|
||||||
### If on linux, libtorrent and Qt version:
|
|
||||||
|
|
||||||
### What is the problem:
|
|
||||||
|
|
||||||
### What is the expected behavior:
|
|
||||||
|
|
||||||
### Steps to reproduce:
|
|
||||||
|
|
||||||
### Extra info(if any):
|
|
||||||
|
|
196
.travis.yml
|
@ -1,196 +0,0 @@
|
||||||
language: cpp
|
|
||||||
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
osx_image: xcode7.3
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
|
|
||||||
#- lt_branch=dist gui=true
|
|
||||||
#- lt_branch=dist gui=false
|
|
||||||
- lt_branch=RC_1_0 gui=true build_system=cmake
|
|
||||||
- lt_branch=RC_1_0 gui=false build_system=cmake
|
|
||||||
- lt_branch=RC_1_0 gui=true build_system=qmake
|
|
||||||
- lt_branch=RC_1_0 gui=false build_system=qmake
|
|
||||||
global:
|
|
||||||
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
|
|
||||||
- coverity_branch: coverity_scan
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- env: lt_branch=RC_1_0 gui=true build_system=cmake
|
|
||||||
- env: lt_branch=RC_1_0 gui=false build_system=cmake
|
|
||||||
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- search_encoding_windows
|
|
||||||
- v2_9_x
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: change
|
|
||||||
on_failure: change
|
|
||||||
|
|
||||||
cache:
|
|
||||||
ccache: true
|
|
||||||
directories:
|
|
||||||
- $HOME/hombebrew_cache
|
|
||||||
|
|
||||||
# opt-in Ubuntu Trusty
|
|
||||||
dist: trusty
|
|
||||||
# container-based builds
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
addons:
|
|
||||||
coverity_scan:
|
|
||||||
project:
|
|
||||||
name: "qbittorrent/qBittorrent"
|
|
||||||
description: "Build submitted via Travis CI"
|
|
||||||
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
|
|
||||||
build_command: make
|
|
||||||
branch_pattern: $coverity_branch
|
|
||||||
notification_email: sledgehammer999@qbittorrent.org
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
#- boost-latest
|
|
||||||
- sourceline: 'ppa:qbittorrent-team/qbittorrent-stable'
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt551-trusty'
|
|
||||||
- sourceline: 'ppa:adrozdoff/cmake'
|
|
||||||
packages:
|
|
||||||
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
|
||||||
- [autoconf, automake, colormake]
|
|
||||||
- [cmake, ninja-build]
|
|
||||||
- libssl-dev
|
|
||||||
- [libboost-dev, libboost-system-dev]
|
|
||||||
- libtorrent-rasterbar-dev
|
|
||||||
- [qt55base, qt55svg, qt55tools]
|
|
||||||
- [gcc-6, g++-6]
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# only allow specific build for coverity scan, others will stop
|
|
||||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true -a "$build_system" = "qmake" ]; then exit ; fi
|
|
||||||
|
|
||||||
- shopt -s expand_aliases
|
|
||||||
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
|
|
||||||
#- libt_path="$HOME/libt_install"
|
|
||||||
#- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
|
|
||||||
- qbt_path="$HOME/qbt_install"
|
|
||||||
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
|
|
||||||
# options for specific branches
|
|
||||||
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
||||||
# setup virtual display for after_success target
|
|
||||||
if [ "$gui" = true ]; then export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ; fi ;
|
|
||||||
|
|
||||||
# Qt 5
|
|
||||||
PATH=/opt/qt55/bin:${PATH}
|
|
||||||
|
|
||||||
if [ "$build_system" = "cmake" ]; then
|
|
||||||
COMPILER_VERSION=6
|
|
||||||
export CXX="${CXX}-${COMPILER_VERSION}" CC="${CC}-${COMPILER_VERSION}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# print settings
|
|
||||||
- echo $lt_branch
|
|
||||||
- echo $gui
|
|
||||||
- echo $build_system
|
|
||||||
- echo $ltconf
|
|
||||||
- echo $qbtconf
|
|
||||||
|
|
||||||
install:
|
|
||||||
#- |
|
|
||||||
#if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
||||||
# build libtorrent from source
|
|
||||||
#if [ "$lt_branch" != "dist" ]; then
|
|
||||||
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch
|
|
||||||
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install
|
|
||||||
#fi
|
|
||||||
#fi
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
# dependencies
|
|
||||||
brew update > /dev/null
|
|
||||||
brew outdated "pkg-config" || brew upgrade "pkg-config"
|
|
||||||
brew install colormake ccache zlib qt
|
|
||||||
PATH="/usr/local/opt/ccache/libexec:$PATH"
|
|
||||||
brew link --force zlib qt
|
|
||||||
|
|
||||||
wget https://builds.shiki.hu/homebrew/version
|
|
||||||
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
|
|
||||||
echo "Cached files are different from server. Downloading new ones."
|
|
||||||
# First delete old files
|
|
||||||
rm -r "$HOME/hombebrew_cache"
|
|
||||||
mkdir "$HOME/hombebrew_cache"
|
|
||||||
cp "version" $HOME/hombebrew_cache
|
|
||||||
cd "$HOME/hombebrew_cache"
|
|
||||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb
|
|
||||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it
|
|
||||||
# Also install our custom libtorrent formula by passing the local path to it
|
|
||||||
# These 2 files are restored from Travis' cache.
|
|
||||||
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
|
||||||
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb"
|
|
||||||
|
|
||||||
if [ "$build_system" = "cmake" ]; then
|
|
||||||
brew outdated cmake || brew upgrade cmake
|
|
||||||
brew install ninja
|
|
||||||
|
|
||||||
ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
|
|
||||||
ln -s /usr/local/opt/qt/plugins /usr/local/plugins
|
|
||||||
fi
|
|
||||||
|
|
||||||
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
|
|
||||||
fi
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
|
|
||||||
export use_ccache=true
|
|
||||||
ccache -V && ccache --show-stats && ccache --zero-stats
|
|
||||||
fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # skip usual build when running coverity scan
|
|
||||||
- |
|
|
||||||
cd "$TRAVIS_BUILD_DIR"
|
|
||||||
if [ "$build_system" = "cmake" ]; then
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
|
||||||
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
|
|
||||||
BUILD_TOOL="ninja"
|
|
||||||
fi
|
|
||||||
if [ "$build_system" = "qmake" ]; then
|
|
||||||
./bootstrap.sh && ./configure $qbtconf
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
|
|
||||||
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
|
|
||||||
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
|
|
||||||
fi
|
|
||||||
BUILD_TOOL="make"
|
|
||||||
fi
|
|
||||||
- $BUILD_TOOL && $BUILD_TOOL install
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
|
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
if [ "$build_system" = "qmake" ]; then
|
|
||||||
macdeployqt "$TRAVIS_BUILD_DIR/src/$qbt_exe.app"
|
|
||||||
cd "$TRAVIS_BUILD_DIR/src/$qbt_exe.app/Contents/MacOS"
|
|
||||||
else
|
|
||||||
cd "$qbt_path/$qbt_exe.app/Contents/MacOS"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
- ./$qbt_exe --version
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- if [ "$use_ccache" = true ]; then ccache --show-stats ; fi
|
|
19
.tx/config
|
@ -1,19 +0,0 @@
|
||||||
[main]
|
|
||||||
host = https://www.transifex.com
|
|
||||||
|
|
||||||
[qbittorrent.qbittorrent_master]
|
|
||||||
file_filter = src/lang/qbittorrent_<lang>.ts
|
|
||||||
lang_map = pt: pt_PT
|
|
||||||
source_file = src/lang/qbittorrent_en.ts
|
|
||||||
source_lang = en
|
|
||||||
type = QT
|
|
||||||
minimum_perc = 23
|
|
||||||
mode = developer
|
|
||||||
|
|
||||||
|
|
||||||
[qbittorrent.qbittorrentdesktop_master]
|
|
||||||
source_file = src/icons/qBittorrent.desktop
|
|
||||||
source_lang = en
|
|
||||||
type = DESKTOP
|
|
||||||
minimum_perc = 23
|
|
||||||
mode = developer
|
|
92
5B7CC9A2.asc
|
@ -1,92 +0,0 @@
|
||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v2
|
|
||||||
|
|
||||||
mQINBFcNIIwBEACpGHvHW9ku7rwCSc2Dv4gh3MO3HPoP7Ba4RiEKwa7SCbPzc0DL
|
|
||||||
JypV4gNfnrpiO7bWVh5v+otbZTkQeNXWbx6hDUa2e5GCCuJifIu3PxpmMcNJFvvF
|
|
||||||
nk5QRf6dtz4Sm2x6joYprvsEUjyk+wHC016/0g7yhc/w0sclXlpKK+8Pl5DFrf5C
|
|
||||||
i5uljy3oJgl54D2yYAvxu3BrdTVKhLVYADUf1Fl3b5pV7VJwr+9wGuTqkORe1rpi
|
|
||||||
9NGWXUaTmKF8+XAJxlbYIUOZQpQ02clFxz0T7o/+m74N8tK9j7g8H2Q3QwtKi0q1
|
|
||||||
gI48LqI/EuZHIaRz/3pEVISlIpWzGqBL/G4I/UtzJLHyvySsqWXAKllKpk97XX77
|
|
||||||
XxFy3VL3fR7o4IohAj5fD083X8tuBIP2dxmHzxHTWveKBlEV6C4MdtVRow8ia3lu
|
|
||||||
RKLz6PF0hBBpebAP4MWAN8cy4ePBCe9BvyI2+3tPgqtlC2tEZLnRru6mtagPi4sj
|
|
||||||
Yo/iFkSQdTXrxeyrMJh161gsWl16JeAfz4Dq8IBoUA1hXIjfM9FcIv1rCY6Y8JwS
|
|
||||||
TtWMGYtzIcqE71wZxqnJuyFZkgC14NDTLgUwLf8XJOTWlMW9CY+tStjjw+sNoIPf
|
|
||||||
p7YQCmss4p5J8flnxH4xJ8ogOHxENidA+Z/J9mtGjxXIXHavPlO3IEg/DwARAQAB
|
|
||||||
tHFzbGVkZ2VoYW1tZXI5OTkgKFVzZWQgZm9yIHNpZ25pbmcgcUJpdHRvcnJlbnQg
|
|
||||||
c291cmNlIHRhcmJhbGxzIGFuZCBiaW5hcmllcyB2Mi4pIDxzbGVkZ2VoYW1tZXI5
|
|
||||||
OTlAcWJpdHRvcnJlbnQub3JnPokCNwQTAQgAIQUCVw0gjAIbAwULCQgHAgYVCAkK
|
|
||||||
CwIEFgIDAQIeAQIXgAAKCRBuSi0CW3zJojB2D/0bKlelRDQDtWzfRyxrdhe5pgAt
|
|
||||||
x1AsN/Cl7h8zlbAw38bL+jQ2/GmtzwzEqPfQc7IFnbeg0PZ58p7Hikj9h6JEhkyA
|
|
||||||
1qekkriclUmblEwDne3TjPixqgoBfNcDQu74dT08XpM8auFQo31/jJ104903o0O5
|
|
||||||
+CPOPn2KTdwpcSpwAVIj/3H96gZWegJDNpdByJUVbzYCt1erJ6I0ZURKhzU1VTJj
|
|
||||||
ZdEGB2YsvYpt5rsi41IYZZG33jMsPxSDDNJ/MiLXxkn08ZawNET6fnkEJJ37n9Pw
|
|
||||||
82lTZjFEFU+KTMT7dNjIejWCRgHVLgW8sO2lCPqMiFfWymD/N3sFpBO+UI86y5ds
|
|
||||||
hfGFAWcgSq9pVjuW4sbX3PntBnoNd+geDD1Ic4rP3jHRe5HuYGhtHO6xv/r7HeY5
|
|
||||||
HiShCTSSDBJqFmhfjrCo0nISKnzyxgO/rY9vFlwXsKkTyL7s53ONkjwK34WmGnya
|
|
||||||
tXdjBWShzAiTfF5hephfBSszmoBG2C8Jcu6P5n4buBY4RCsEa+6jE0R1vCtmpVwx
|
|
||||||
WrXOeN2kGYMpAkPK1L69Le0FofgUDKlaFMv7KRl4R367xNRukYrsKwVlontJ+Y72
|
|
||||||
X5t1BeRn8VSp0IzhssNXM8a4bTE8lvs889DOS2vgWEHIi0iyIesJYWPs4AKUw4rG
|
|
||||||
EDwWxtTS0a7Rfx3DxLRWc2xlZGdlaGFtbWVyOTk5IChVc2VkIGZvciBzaWduaW5n
|
|
||||||
IGdpdCBjb21taXRzL3RhZ3MvZXRjLikgPGhhbW1lcmVkOTk5QHFiaXR0b3JyZW50
|
|
||||||
Lm9yZz6JAh8EMAEIAAkFAlhie1ICHQAACgkQbkotAlt8yaILIhAAp25o1BbUG2Zk
|
|
||||||
At3cSrTFnZSCA7nEygbSUv1Uek33JZfY0Apw5qEM8lQCMZk+mhdrSQCYUJcQlruN
|
|
||||||
zJcJf4CH+VGE23xkI3Kf0nGp9Cjn/q6b1hLIPe5rimvw5pTAejFtebcYY/ZJIB8Z
|
|
||||||
H1ebuzfqBZ/9k7eYTarZ/ZsgG8YptB0RXBQWOMaSEKwdeo2m7HXHgK3blQiqbuJJ
|
|
||||||
uyPbid01Wus4AVN47/FKgDNswPs8irYZsu5yakgpi2KLycGDtSiN5XFHI4xbC0zM
|
|
||||||
srR7Cz0/fC+klhGcuxbw0V0It7UUIitgCcTPHXkukUU8i2+AGMyKa1HjchsXDdLg
|
|
||||||
DIs6KIurp2ve7znKOz7h1aX8cOBmB/QYeYAx9jRRkePMIRT8V1lRwfvJlJxx1+G3
|
|
||||||
e2gJLjqTN8a08KHHjdY/S0ZFERxSlmOym2uf/y6di1ipDPxo8xvDuS5kDbdZLC0t
|
|
||||||
XijlsH8ONK27KNuWhucG8zHzKQvnPw2qN06SZq4FjbSmAkkuYs56heLEXMzFr75k
|
|
||||||
SE8rUoQQ+ABG9gU46GEvKlZxqSwXgGnb1X6K7h8svjMh/NlAU358p8Sra4Ru5tz4
|
|
||||||
jUu9MoVEw5Lbjcrsnp6/4Kk1Q2ckBNt43nv8/+C7NsC3xi6BrOInuaKHZ4QsTuzJ
|
|
||||||
m1/A4zlKRnUi6T98DXfIYnNuV9NSmAWJAjkEEwEIACMFAlhiemMCGwMHCwkIBwMC
|
|
||||||
AQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBuSi0CW3zJor6yD/9N2U0INx0nYpGkmvah
|
|
||||||
yVG/vw2S6hhKK+03AN+RrtddNRg4aBf/gmOvRWQhAmFnXOBA7fO09wgcljaV5tVb
|
|
||||||
MYyYZvHhK0o2/sli2p/M5N8ZxchRHypjxUSEyG9ZQ06QG5DVhh4HtM8nIN+UcwTV
|
|
||||||
C5QjyoWZvHf+tNroyFeh7zT+w4kX1VxgynTQr5LGdYsrVA3CFyT3zsBWV3dMae23
|
|
||||||
22CHOirsBBLwairHUsWW+BdThT3MkKYpTEV0jkH4OyAXhJYcS5IjjtKQ8UpZE9dw
|
|
||||||
f4saJ0TnXNe7goPRZtH7UjPwfVbtYK4y8QklWUTRxgoBxNwSC5X7Flg+3xXxE/VU
|
|
||||||
U4cehyRkH64i7MJDoFkqh5JtjkgIz+kuTTXb7xR0Wf+JXrGMybZTR8xth2TEMC20
|
|
||||||
1FT5L5+0vH1WRzL7bhlaU3EXyCnoH8sDvMEClZbibbew+rf7fC3tFU41ohUT0HDl
|
|
||||||
zlyfVjRvBHWMTgfpWKBV2m/qP941xTJ9VHxOlAB02XKUZYwFt07CpH+yjMOCOzA4
|
|
||||||
cTPBD3mGRuft0V0BJ8bA5bcTly/GBciRX0Y5oIeHZGgq2czb0sywSYT6mPoQMFNM
|
|
||||||
B+Cwr4pm90r1DMMfW518onF2itwyN/Id0FsWDhsLJHKluBJw52C3OnxCuToVutTm
|
|
||||||
xntqpPVv62LaeVeWQqxIieTJErRQc2xlZGdlaGFtbWVyXzk5OSAoVXNlZCBmb3Ig
|
|
||||||
c2lnbmluZyBnaXQgY29tbWl0cy90YWdzL2V0YykgPGhhbW1lcmVkOTk5QGdtYWls
|
|
||||||
LmNvbT6JAjkEEwEIACMFAlhifeICGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIX
|
|
||||||
gAAKCRBuSi0CW3zJolcCD/9xPBNEkFtnhTW89th0TFZnB5oykCQjyefquvQs8KWT
|
|
||||||
C92/1VizHi4ZxDehHWP9IKVWT3ZJthj5ZXBSedyl1tHnwkyrUYBW9roQwtDWPncK
|
|
||||||
pXl/HsE6p3q6EIus+g6YJo4UvYachJFAZATZp1WDBPIswziHGzaL0tndFWZuVM8V
|
|
||||||
QD0tfPQsS1qCDVv6+B1JWZDnA1JzdSG/uzPhL95q/ff6JmNbfSAVedK2PyqYshnC
|
|
||||||
KWBx6Yna/0ColBuDFho8+bDuHPQcM35xyjPosVD7moXQiY4yMAJ+VzwEBaCFleI0
|
|
||||||
RBWw8/+qyoFqfIKwdq8G+7I9LjWpBiN2+uQBZ+OAvsMWyRShLopxt3JluPTtL6xb
|
|
||||||
Ca6dglOdlaOS/A6FK7u05k/8kQMDS5Jq2/rpfTPRl1/weCaJZgfRIBosk1Mon/pR
|
|
||||||
p1zd0abM4t7BcGQpwSkKAmqlKCrWf886EFQT0CJTBo8q7pzgpVraWWPVsmAOdkfU
|
|
||||||
YcKBgz1A2uMSAxypkSzaDZkIVj6I7gwiGk7IMYx1OK7Ev46h/x4Z7kgT0y3DYYOq
|
|
||||||
ggVEKQ+15Krn7bZ35s8vbZdfnVKPSXdCC8jkIMBmGmRX6cgZZ3OXZlrrHht5icgJ
|
|
||||||
5Z2d1M4JUoEZVUr2xNZkkaMk01NAIpGgKvIS6yHuj6vE4GMJ+A/qEW6J60/3YHRe
|
|
||||||
0bkCDQRXDSCMARAAqMIVJizEJp205c546IN75xeYiFszNXcs3768IY8bOoWj+rTw
|
|
||||||
t2wIwtL/3O5K2dG79CSt2H5o6BPKmq43tOO60YW3Yk3m9BB/gnAVqk0QOPr5O8+y
|
|
||||||
eBzdElU8CZh6y6zZMWugSkNmTDm6jZzPhgNjcjrit/dl9+0DGqJQcqoD8WzEWNcW
|
|
||||||
rMHVz9cDewnLSVkwR758mZMaIiL7R10MZ++tNrC0j69UINqx+9z1r1J07+NNnxqS
|
|
||||||
TxVRcbjPYtM9E+tUiVFS2HPWN9ShVDkBAEdoWh90qzRaMiFl2NGNGOD1iHx/xr06
|
|
||||||
RMeGEEXt2vhSlhfMW2YQW+UD2jzlFbARf53v39MUKKscGuIpBhxGw3JCq4l6qLW/
|
|
||||||
bDkgnoXlOhZDmhQm6OpsjAyk9IEdd3ponSc7yYD3mUkJKR9eTaALD5t6TQGyNHak
|
|
||||||
b4UfoXtE2RR78cbPlLIwag7eQ8GsNA+dfjowmOZdojx3ROsHZdGQwb0YFLjuKAus
|
|
||||||
A3TY+lCfbS6kzE2iI2DuaW+3dICcLrYuibbVb0CBNHyD+8KEtczdur/wm0lhqyVJ
|
|
||||||
kGyZKZT8C2cPxywKgy1Rn6F8Yfmj0Lna3nvtaZu0ZUS4/8Lit5PcOso1lSmYBuD6
|
|
||||||
yq+GEAMCnUmn1Pm8eZRMlxxQuTPvyJKQrRDhbtAAr472MSnoJKlS4SfaUF0AEQEA
|
|
||||||
AYkCHwQYAQgACQUCVw0gjAIbDAAKCRBuSi0CW3zJomZDD/9IJmzd5hiEzntlp84p
|
|
||||||
yIJcfyIRe4KImvldAy6T02OSIbF1HzCNnwmqIPob6MOdMZ+KNwMK0htRkrRr/zM0
|
|
||||||
34+lBiWKZt+tVYHu49ioTYXEjAc5qDJE09Sq7HceQnhgE48f1n54XGT5G2w5gw+/
|
|
||||||
a8Qn1SceE44VwXafL3E1gKaOrrsb1UH/AJhp+W4VMu+7bLXu7h1tN6v2PhvCYvBt
|
|
||||||
3zyy8Q8xfJ2x7/D1lbF8ATJAiZ/km9x5bRm7OGRliVYaUe1nyR42fZOj3CBmAR0+
|
|
||||||
lZLgjriqdMXrs+qlBbrmAhkn0XPQXAeaPifKoKIGDAUWIsqDHqM7imMGT+MR9APf
|
|
||||||
Sw8M4enOJWL+HnKpVBEARCEDpaFpJ3u7QRucFybpEhvIymoNftyw+urId2Eg2K33
|
|
||||||
NypeZo3M1K2LC65f2Ta7f/sZcIDUTbgW+m334fgVl1KptDA5DX3U9lTci7mi4uPu
|
|
||||||
AFtbWrB1di4jYrxXYuzFm5g4xTb0Hw3kYIB6WXF+I7i0JaGOTHxPC5X5lIAZrYrk
|
|
||||||
xh+1n1Y1CY+TC8JcTzwORJIbFFm9tD/BHXa4849k4DVvFYCZkhq+/56FKZfoVByh
|
|
||||||
B+x+2GaMlsBm1uPniO4lAakFPpIi0kaap4UVayQ/7ak+BhscAIHZUy6NtgZkuvW3
|
|
||||||
xdpwp07LYo2ilhMI8RnzmtoRmg==
|
|
||||||
=UBeB
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
132
AUTHORS
|
@ -1,132 +0,0 @@
|
||||||
Current maintainer:
|
|
||||||
* Sledgehammer999 <sledgehammer999@qbittorrent.org>
|
|
||||||
|
|
||||||
Original author:
|
|
||||||
* Christophe Dumez <chris@qbittorrent.org>
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
* Vladimir Golovnev <glassez@yandex.ru>
|
|
||||||
* Stefanos Antaris <santaris@csd.auth.gr>
|
|
||||||
* Mohammad Dib <mdib@qbittorrent.org>
|
|
||||||
* Mirco Chinelli <infinity89@fastwebmail.it>
|
|
||||||
* Ishan Arora <ishan@qbittorrent.org>
|
|
||||||
* Arnaud Demaizière <arnaud@qbittorrent.org>
|
|
||||||
* Grigis Gaëtan <cipher16@gmail.com>
|
|
||||||
* Christian Kandeler <zambesi@users.sourceforge.net>
|
|
||||||
* Silvan Scherrer <silvan.scherrer@aroa.ch>
|
|
||||||
* Nick Tiskov <daymansmail@gmail.com>
|
|
||||||
|
|
||||||
Code from other projects:
|
|
||||||
* files src/qtsingleapplication/* src/lineedit/*
|
|
||||||
copyright: Nokia Corporation
|
|
||||||
license: LGPL
|
|
||||||
|
|
||||||
* files src/ico.cpp src/ico.h
|
|
||||||
copyright: Malte Starostik <malte@kde.org>
|
|
||||||
license: LGPL
|
|
||||||
|
|
||||||
* files src/search_engine/socks.py
|
|
||||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
|
||||||
license: BSD
|
|
||||||
|
|
||||||
* file src/stacktrace_win.h
|
|
||||||
copyright: Quassel Project
|
|
||||||
license: GPLv2/3
|
|
||||||
|
|
||||||
Images Authors:
|
|
||||||
* files: src/icons/*.png
|
|
||||||
copyright: Gnome Icon Theme
|
|
||||||
license: GPLv2
|
|
||||||
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
|
|
||||||
|
|
||||||
* files: src/oxygen/*.png
|
|
||||||
copyright: Oxygen Icon Theme (KDE)
|
|
||||||
license: LGPL
|
|
||||||
url: http://www.oxygen-icons.org
|
|
||||||
|
|
||||||
* files: src/icons/flags/*.png
|
|
||||||
copyright: Mark James <mjames@gmail.com>
|
|
||||||
license: Public Domain
|
|
||||||
url: http://www.famfamfam.com
|
|
||||||
|
|
||||||
* files: src/icons/skin/*.png
|
|
||||||
files: src/menuicons/YYxYY/*.png
|
|
||||||
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
|
||||||
license: GPLv2
|
|
||||||
|
|
||||||
* file: src/icons/skin/tabs.gif
|
|
||||||
copyright: Greg Houston <gregory.houston@gmail.com>
|
|
||||||
license: MIT
|
|
||||||
|
|
||||||
* file: src/icons/skin/qbittorrent_mono*
|
|
||||||
copyright: Daniel Eguren <deguren@gmail.com>
|
|
||||||
license: LGPL
|
|
||||||
|
|
||||||
* file: src/search_engine/engines/btjunkie.png
|
|
||||||
copyright: Downloaded from btjunkie.org
|
|
||||||
|
|
||||||
* file: src/search_engine/engines/isohunt.png
|
|
||||||
copyright: Downloaded from isohunt.com
|
|
||||||
|
|
||||||
* file: src/search_engine/engines/mininova.png
|
|
||||||
copyright: Downloaded from mininova.org
|
|
||||||
|
|
||||||
* file: src/search_engine/engines/piratebay.png
|
|
||||||
copyright: Downloaded from thepiratebay.org
|
|
||||||
|
|
||||||
* file: src/search_engine/engines/torrentreactor.png
|
|
||||||
copyright: Downloaded from torrentreactor.net
|
|
||||||
|
|
||||||
* file: src/icons/oxygen/checked.png
|
|
||||||
copyright: Victor Buinsky <allok.victor@gmail.com>
|
|
||||||
|
|
||||||
* file: src/icons/skin/ratio.png
|
|
||||||
copyright: Fatcow Web Hosting
|
|
||||||
license: Creative Commons Attribution 3.0 License
|
|
||||||
url: http://www.fatcow.com/free-icons
|
|
||||||
|
|
||||||
Translations authors:
|
|
||||||
* files: src/lang/*.ts
|
|
||||||
* file: src/icons/qBittorrent.desktop
|
|
||||||
copyright:
|
|
||||||
- Arabic: SDERAWI (abz8868@msn.com), sn51234 (nesseyan@gmail.com) and Ibrahim Saed ibraheem_alex(Transifex)
|
|
||||||
- Armenian: Hrant Ohanyan (hrantohanyan@mail.am)
|
|
||||||
- Basque: Xabier Aramendi (azpidatziak@gmail.com)
|
|
||||||
- Belarusian: Mihas Varantsou (meequz@gmail.com)
|
|
||||||
- Bulgarian: Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)
|
|
||||||
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
|
|
||||||
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
|
||||||
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com) and 冥王歐西里斯 s8321414(Transifex)
|
|
||||||
- Croatian: Oliver Mucafir (oliver.untwist@gmail.com)
|
|
||||||
- Czech: Jirka Vilim (web@tets.cz) and Petr Cernobila abr(Transifex)
|
|
||||||
- Danish: Mathias Nielsen (comoneo@gmail.com)
|
|
||||||
- Dutch: Pieter Heyvaert (pieter_heyvaert@hotmail.com)
|
|
||||||
- English: Christophe Dumez (chris@qbittorrent.org)
|
|
||||||
- English(Australia): Robert Readman readmanr(Transifex)
|
|
||||||
- English(United Kingdom): Robert Readman readmanr(Transifex)
|
|
||||||
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net), Pekka Niemi (pekka.niemi@iki.fi) and Jiri Grönroos artnay(Transifex)
|
|
||||||
- French: Christophe Dumez (chris@qbittorrent.org)
|
|
||||||
- Galician: Marcos Lans (marcoslansgarza@gmail.com) and antiparvos(Transifex)
|
|
||||||
- Georgian: Beqa Arabuli (arabulibeqa@yahoo.com)
|
|
||||||
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
|
|
||||||
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net), Stephanos Antaris (santaris@csd.auth.gr), sledgehammer999(hammered999@gmail.com) and Γιάννης Ανθυμίδης Evropi(Transifex)
|
|
||||||
- Hebrew: David Deutsch (d.deffo@gmail.com)
|
|
||||||
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
|
|
||||||
- Italian: bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)
|
|
||||||
- Japanese: Masato Hashimoto (cabezon.hashimoto@gmail.com)
|
|
||||||
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
|
|
||||||
- Lithuanian: Naglis Jonaitis (njonaitis@gmail.com)
|
|
||||||
- Norwegian: Tomaso
|
|
||||||
- Polish: Mariusz Fik (fisiu@opensuse.org)
|
|
||||||
- Portuguese: Sérgio Marques smarquespt(Transifex)
|
|
||||||
- Portuguese(Brazil): Nick Marinho (nickmarinho@gmail.com)
|
|
||||||
- Romanian: Obada Denis (obadadenis@users.sourceforge.net), Adrian Gabor Adriannho(Transifex) and Mihai Coman z0id(Transifex)
|
|
||||||
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net), Alexey Morsov (samurai@ricom.ru), Nick Tiskov Dayman(daymansmail (at) gmail (dot) com), Dmitry DmitryKX(Transifex) and kraleksandr kraleksandr(Transifex)
|
|
||||||
- Serbian: Anaximandar Milet (anaximandar at operamail.com)
|
|
||||||
- Slovak: helix84
|
|
||||||
- Spanish: Francisco Luque Contreras (frannoe@ya.com), Alfredo Monclus alfrix(Transifex) and José Antonio Moray moray33(Transifex)
|
|
||||||
- Swedish: Daniel Nylander (po@danielnylander.se) and Emil Hammarberg Ooglogput(Transifex)
|
|
||||||
- Turkish: Hasan Yilmaz (iletisim@hedefturkce.com)
|
|
||||||
- Ukrainian: Oleh Prypin (blaxpirit@gmail.com) and zubr139(Transifex)
|
|
||||||
- Vietnamese: Anh Phan ppanhh(Transifex)
|
|
||||||
license: GPLv2
|
|
|
@ -1,61 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
cmake_policy(VERSION 3.5)
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
|
||||||
include(FunctionReadVersion)
|
|
||||||
|
|
||||||
read_version("${CMAKE_CURRENT_SOURCE_DIR}/version.pri" VER_MAJOR VER_MINOR VER_BUGFIX VER_BUILD VER_STATUS)
|
|
||||||
# message(STATUS "Project version is: ${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}.${VER_BUILD} (${VER_STATUS})")
|
|
||||||
|
|
||||||
project(qBittorrent VERSION ${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}.${VER_BUILD})
|
|
||||||
|
|
||||||
set(PROJECT_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}")
|
|
||||||
|
|
||||||
if (NOT VER_BUILD EQUAL 0)
|
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION}.${VER_BUILD}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(PROJECT_VERSION "${PROJECT_VERSION}${VER_STATUS}")
|
|
||||||
|
|
||||||
add_definitions(-DQBT_VERSION_MAJOR=${VER_MAJOR})
|
|
||||||
add_definitions(-DQBT_VERSION_MINOR=${VER_MINOR})
|
|
||||||
add_definitions(-DQBT_VERSION_BUGFIX=${VER_BUGFIX})
|
|
||||||
add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
|
|
||||||
|
|
||||||
# os2 {
|
|
||||||
# DEFINES += DQBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
|
||||||
# DEFINES += DQBT_VERSION_2=\'\"$${PROJECT_VERSION}\"\'
|
|
||||||
# } else {
|
|
||||||
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
|
|
||||||
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
|
|
||||||
# }
|
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
endif (UNIX AND NOT APPLE)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
include(winconf)
|
|
||||||
endif(WIN32)
|
|
||||||
|
|
||||||
# we need options here, because they are used not only in "src" subdir, but in the "dist" dir too
|
|
||||||
include(CMakeDependentOption)
|
|
||||||
|
|
||||||
option(SYSTEM_QTSINGLEAPPLICATION
|
|
||||||
"Use the system qtsingleapplication library or shipped one otherwise")
|
|
||||||
|
|
||||||
option(GUI "Allows to disable GUI for headless running. Disables QtDBus and the GeoIP Database" ON)
|
|
||||||
|
|
||||||
option(WEBUI "Allows to disable the WebUI." ON)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
option(STACKTRACE_WIN "")
|
|
||||||
else (WIN32)
|
|
||||||
cmake_dependent_option(SYSTEMD "Install the systemd service file (headless only)" OFF
|
|
||||||
"NOT GUI" OFF)
|
|
||||||
cmake_dependent_option(DBUS "Enable use of QtDBus (GUI only)" ON "GUI" OFF)
|
|
||||||
endif(WIN32)
|
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
|
||||||
add_subdirectory(dist)
|
|
|
@ -1,308 +0,0 @@
|
||||||
All new code must follow the following coding guidelines.
|
|
||||||
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes instead.
|
|
||||||
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style.
|
|
||||||
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder.
|
|
||||||
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
|
|
||||||
|
|
||||||
### 1. Curly braces ###
|
|
||||||
#### a. Function blocks, class/struct definitions, namespaces ####
|
|
||||||
```c++
|
|
||||||
int myFunction(int a)
|
|
||||||
{
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
|
|
||||||
void myFunction() {} // empty body
|
|
||||||
|
|
||||||
MyClass::MyClass(int *parent)
|
|
||||||
: m_parent(parent)
|
|
||||||
{
|
|
||||||
//initialize
|
|
||||||
}
|
|
||||||
|
|
||||||
int MyClass::myMethod(int a)
|
|
||||||
{
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
|
|
||||||
class MyOtherClass
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//code
|
|
||||||
|
|
||||||
protected:
|
|
||||||
//code
|
|
||||||
|
|
||||||
private:
|
|
||||||
//code
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace Name
|
|
||||||
{
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lambdas
|
|
||||||
[](int arg1, int arg2) -> bool { return arg1 < arg2; }
|
|
||||||
|
|
||||||
[this](int arg)
|
|
||||||
{
|
|
||||||
this->acc += arg;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### b. Other code blocks ####
|
|
||||||
```c++
|
|
||||||
if (condition) {
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int a = 0; a < b; ++b) {
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (a) {
|
|
||||||
case 1:
|
|
||||||
//blah
|
|
||||||
case 2:
|
|
||||||
//blah
|
|
||||||
default:
|
|
||||||
//blah
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### c. Blocks in switch's case labels ####
|
|
||||||
```c++
|
|
||||||
switch (var) {
|
|
||||||
case 1: {
|
|
||||||
//declare local variables
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2: {
|
|
||||||
//declare local variables
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### d. Brace enclosed initializers ####
|
|
||||||
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
|
|
||||||
But you must insert a space between the variable name and initializer.
|
|
||||||
```c++
|
|
||||||
Class obj {}; // empty
|
|
||||||
Class obj {expr};
|
|
||||||
Class obj {expr1, /*...,*/ exprN};
|
|
||||||
QVariantMap map {{"key1", 5}, {"key2", 10}};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. If blocks ###
|
|
||||||
#### a. Multiple tests ####
|
|
||||||
```c++
|
|
||||||
if (condition) {
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
else if (condition) {
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
```
|
|
||||||
The `else if`/`else` must be on their own lines.
|
|
||||||
|
|
||||||
#### b. Single statement if blocks ####
|
|
||||||
**Most** single statement if blocks should look like this:
|
|
||||||
```c++
|
|
||||||
if (condition)
|
|
||||||
a = a + b;
|
|
||||||
```
|
|
||||||
|
|
||||||
One acceptable exception to this **can be** `return`, `break` or `continue` statements, provided that the test condition isn't very long. However you can choose to use the first rule instead.
|
|
||||||
```c++
|
|
||||||
a = myFunction();
|
|
||||||
b = a * 1500;
|
|
||||||
|
|
||||||
if (b > 0) return;
|
|
||||||
c = 100 / b;
|
|
||||||
```
|
|
||||||
|
|
||||||
#### c. Using curly braces for single statement if blocks ####
|
|
||||||
|
|
||||||
However, there are cases where curly braces for single statement if blocks **should** be used.
|
|
||||||
* If some branch needs braces then all others should use them. Unless you have multiple `else if` in a row and the one needing the braces is only for a very small sub-block of code.
|
|
||||||
* Another exception would be when we have nested if blocks or generally multiple levels of code that affect code readability.
|
|
||||||
|
|
||||||
Generally it will depend on the particular piece of code and would be determined on how readable that piece of code is. **If in doubt** always use braces if one of the above exceptions applies.
|
|
||||||
|
|
||||||
### 3. Indentation ###
|
|
||||||
4 spaces.
|
|
||||||
|
|
||||||
### 4. File encoding and line endings. ###
|
|
||||||
|
|
||||||
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
|
|
||||||
|
|
||||||
### 5. Initialization lists. ###
|
|
||||||
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
|
|
||||||
```c++
|
|
||||||
myClass::myClass(int a, int b, int c, int d)
|
|
||||||
: m_a(a)
|
|
||||||
, m_b(b)
|
|
||||||
, m_c(c)
|
|
||||||
, m_d(d)
|
|
||||||
{
|
|
||||||
//code
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6. Enums. ###
|
|
||||||
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
|
|
||||||
```c++
|
|
||||||
enum Days
|
|
||||||
{
|
|
||||||
Monday,
|
|
||||||
Tuesday,
|
|
||||||
Wednesday,
|
|
||||||
Thursday,
|
|
||||||
Friday,
|
|
||||||
Saturday,
|
|
||||||
Sunday
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 7. Names. ###
|
|
||||||
All names should be camelCased.
|
|
||||||
|
|
||||||
#### a. Type names and namespaces ####
|
|
||||||
Type names and namespaces start with Upper case letter (except POD types).
|
|
||||||
```c++
|
|
||||||
class ClassName {};
|
|
||||||
|
|
||||||
struct StructName {};
|
|
||||||
|
|
||||||
enum EnumName {};
|
|
||||||
|
|
||||||
typedef QList<ClassName> SomeList;
|
|
||||||
|
|
||||||
namespace NamespaceName
|
|
||||||
{
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### b. Variable names ####
|
|
||||||
Variable names start with lower case letter.
|
|
||||||
```c++
|
|
||||||
int myVar;
|
|
||||||
```
|
|
||||||
|
|
||||||
#### c. Private member variable names ####
|
|
||||||
Private member variable names start with lower case letter and should have ```m_``` prefix.
|
|
||||||
```c++
|
|
||||||
class MyClass
|
|
||||||
{
|
|
||||||
int m_myVar;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 8. Header inclusion order. ###
|
|
||||||
The headers should be placed in the following order:
|
|
||||||
1. Module header (in .cpp)
|
|
||||||
2. System/Qt/Boost etc. headers (splitted in subcategories if you have many).
|
|
||||||
3. Application headers, starting from *Base* headers.
|
|
||||||
|
|
||||||
The headers should be ordered alphabetically within each group (subgroup).<br/>
|
|
||||||
<br/>
|
|
||||||
Example:
|
|
||||||
```c++
|
|
||||||
// examplewidget.cpp
|
|
||||||
|
|
||||||
#include "examplewidget.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QList>
|
|
||||||
#include <QString>
|
|
||||||
#include <QUrl>
|
|
||||||
|
|
||||||
#include <libtorrent/version.hpp>
|
|
||||||
|
|
||||||
#include "base/bittorrent/session.h"
|
|
||||||
#include "base/bittorrent/infohash.h"
|
|
||||||
#include "base/utils/fs.h"
|
|
||||||
#include "base/utils/misc.h"
|
|
||||||
#include "base/utils/string.h"
|
|
||||||
#include "ui_examplewidget.h"
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### 9. Misc. ###
|
|
||||||
|
|
||||||
* Line breaks for long lines with operation:
|
|
||||||
|
|
||||||
```c++
|
|
||||||
a += "b"
|
|
||||||
+ "c"
|
|
||||||
+ "d";
|
|
||||||
```
|
|
||||||
|
|
||||||
* **auto** keyword
|
|
||||||
|
|
||||||
We allow the use of the **auto** keyword only where it is strictly necessary
|
|
||||||
(for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code.
|
|
||||||
Declarations for which one can gather enough information about the object interface (type) from its name
|
|
||||||
or the usage pattern (an iterator or a loop variable are good examples of clear patterns)
|
|
||||||
or the right part of the expression nicely fit here.<br/>
|
|
||||||
<br/>
|
|
||||||
When weighing whether to use an auto-typed variable please think about potential reviewers of your code,
|
|
||||||
who will read it as a plain diff (on github.com, for instance). Please make sure that such reviewers can
|
|
||||||
understand the code completely and without excessive effort.<br/>
|
|
||||||
<br/>
|
|
||||||
Some valid use cases:
|
|
||||||
```c++
|
|
||||||
template <typename List>
|
|
||||||
void doSomethingWithList(const List &list)
|
|
||||||
{
|
|
||||||
foreach (const auto &item, list) {
|
|
||||||
// we don't know item type here so we use 'auto' keyword
|
|
||||||
// do something with item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto it = container.begin(), end = container.end(); it != end; ++it) {
|
|
||||||
// we don't need to know the exact iterator type,
|
|
||||||
// because all iterators have the same interface
|
|
||||||
}
|
|
||||||
|
|
||||||
auto spinBox = static_cast<QSpinBox*>(sender());
|
|
||||||
// we know the variable type based on the right-hand expression
|
|
||||||
```
|
|
||||||
|
|
||||||
* Space around operations eg `a = b + c` or `a=b+c`:
|
|
||||||
|
|
||||||
Before and after the assignment and other binary (and ternary) operators there should be a space.<br/>
|
|
||||||
There should not be a space between increment/decrement and its operand.<br/>
|
|
||||||
Some valid use cases:
|
|
||||||
```c++
|
|
||||||
a += 20;
|
|
||||||
a = (b <= MAX_B ? b : MAX_B);
|
|
||||||
++a;
|
|
||||||
b--;
|
|
||||||
|
|
||||||
for (int a = 0; a < b; ++b) {
|
|
||||||
// code
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
* private/public/protected must not be indented
|
|
||||||
|
|
||||||
* Preprocessor commands must go at line start
|
|
||||||
|
|
||||||
* Method definitions aren't allowed in header files
|
|
||||||
|
|
||||||
### 10. Not covered above ###
|
|
||||||
If something isn't covered above, just follow the same style the file you are editing has. If that particular detail isn't present in the file you are editing, then use whatever the rest of the project uses.
|
|
|
@ -1,35 +0,0 @@
|
||||||
# Filing an issue
|
|
||||||
|
|
||||||
### Must read
|
|
||||||
* If you aren't sure, you can ask on the [**forum**](http://forum.qbittorrent.org) or read our [**wiki**](http://wiki.qbittorrent.org) first.
|
|
||||||
* Do a quick **search**. Others might already reported the issue.
|
|
||||||
* Write in **English**!
|
|
||||||
* Provide **version** information: (You can find version numbers at menu `Help -> About -> Libraries`)
|
|
||||||
```
|
|
||||||
qBittorrent:
|
|
||||||
Qt:
|
|
||||||
libtorrent:
|
|
||||||
boost:
|
|
||||||
OS version:
|
|
||||||
```
|
|
||||||
* Provide **steps** to reproduce the problem, it will be easier to pinpoint the fault.
|
|
||||||
* **Screenshots**! A screenshot is worth a thousand words. just upload it. [(How?)](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests)
|
|
||||||
|
|
||||||
### Good to know
|
|
||||||
* **Be patient**. The dev team is small and resource limited. Devs finding their free time, analyzing the problem and fixing the issue, it all takes time. :clock3:
|
|
||||||
* If you can code, why not become a **contributor** by fixing the issue and open a pull request? :wink:
|
|
||||||
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) to be **ignored**. :fearful:
|
|
||||||
|
|
||||||
|
|
||||||
# Opening a pull request
|
|
||||||
|
|
||||||
### Must read
|
|
||||||
* Read our [**coding guidelines**](https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md). There are some scripts to help you: [uncrustify script](https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg), [astyle script](https://gist.github.com/Chocobo1/539cee860d1eef0acfa6), [(related thread)](https://github.com/qbittorrent/qBittorrent/issues/2192).
|
|
||||||
* Keep the title **short** and provide a **clear** description about what your pull request does.
|
|
||||||
* Provide **screenshots** for UI related changes.
|
|
||||||
* Keep your git commit history **clean** and **precise**. Commits like `xxx fixup` should not appear.
|
|
||||||
* If your commit fix a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here](https://github.com/qbittorrent/qBittorrent/commit/a74bac20c4e8de9776bf9bb77fdc7526135d1988).
|
|
||||||
|
|
||||||
### Good to know
|
|
||||||
* **Search** pull request history! Others might already implemented your idea and is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
|
|
||||||
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link](https://www.atlassian.com/git/tutorials/merging-vs-rebasing).
|
|
294
COPYING
|
@ -1,294 +0,0 @@
|
||||||
qBittorrent is licensed under the GNU General Public License version 2 with the
|
|
||||||
addition of the following special exception:
|
|
||||||
|
|
||||||
In addition, as a special exception, the copyright holders give permission to
|
|
||||||
link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
||||||
modified versions of it that use the same license as the "OpenSSL" library),
|
|
||||||
and distribute the linked executables. You must obey the GNU General Public
|
|
||||||
License in all respects for all of the code used other than "OpenSSL". If you
|
|
||||||
modify file(s), you may extend this exception to your version of the file(s),
|
|
||||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
|
||||||
exception statement from your version.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
54
INSTALL
|
@ -1,54 +0,0 @@
|
||||||
qBittorrent - A BitTorrent client in C++ / Qt4
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
1) Compile and install qBittorrent with Qt4 Graphical Interface
|
|
||||||
|
|
||||||
$ ./configure
|
|
||||||
$ make && make install
|
|
||||||
$ qbittorrent
|
|
||||||
|
|
||||||
will install and execute qBittorrent hopefully without any problems.
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- Qt >= 4.6.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
|
|
||||||
|
|
||||||
- pkg-config executable
|
|
||||||
|
|
||||||
- libtorrent-rasterbar by Arvid Norberg (>= 1.0.6)
|
|
||||||
-> http://www.libtorrent.net
|
|
||||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
|
||||||
|
|
||||||
- libboost >= 1.35.x (libboost-system)
|
|
||||||
|
|
||||||
- python >= 2.3 (needed by search engine)
|
|
||||||
* Run time only dependency
|
|
||||||
|
|
||||||
- geoip-database (optional)
|
|
||||||
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
|
|
||||||
* Run time only dependency
|
|
||||||
|
|
||||||
2) Compile and install qBittorrent without Qt4 Graphical interface
|
|
||||||
|
|
||||||
$ ./configure --disable-gui
|
|
||||||
$ make && make install
|
|
||||||
$ qbittorrent
|
|
||||||
|
|
||||||
will install and execute qBittorrent hopefully without any problems.
|
|
||||||
|
|
||||||
Dependencies:
|
|
||||||
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
|
|
||||||
|
|
||||||
- pkg-config executable
|
|
||||||
|
|
||||||
- libtorrent-rasterbar by Arvid Norberg (>= v1.0.6)
|
|
||||||
-> http://www.libtorrent.net
|
|
||||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
|
||||||
|
|
||||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION:
|
|
||||||
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
Christophe Dumez <chris@qbittorrent.org>
|
|
4
NEWS
|
@ -1,4 +0,0 @@
|
||||||
See Changelog
|
|
||||||
|
|
||||||
*******************************************
|
|
||||||
Christophe dumez - chris@qbittorrent.org
|
|
53
README.md
|
@ -1,53 +0,0 @@
|
||||||
qBittorrent - A BitTorrent client in Qt
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
[](https://travis-ci.org/qbittorrent/qBittorrent)
|
|
||||||
[](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
|
|
||||||
[](https://scan.coverity.com/projects/5494)
|
|
||||||
********************************
|
|
||||||
### Description:
|
|
||||||
qBittorrent is a bittorrent client programmed in C++ / Qt that uses
|
|
||||||
libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
|
|
||||||
|
|
||||||
It aims to be a good alternative to all other bittorrent clients
|
|
||||||
out there. qBittorrent is fast, stable and provides unicode
|
|
||||||
support as well as many features.
|
|
||||||
|
|
||||||
This product includes GeoLite data created by MaxMind, available from
|
|
||||||
https://www.maxmind.com/
|
|
||||||
|
|
||||||
### Installation:
|
|
||||||
For installation, follow the instructions from INSTALL file, but simple:
|
|
||||||
|
|
||||||
```
|
|
||||||
./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 />
|
|
||||||
The key currently used is 4096R/[5B7CC9A2](https://pgp.mit.edu/pks/lookup?op=get&search=0x6E4A2D025B7CC9A2) with fingerprint `D8F3DA77AAC6741053599C136E4A2D025B7CC9A2`.<br />
|
|
||||||
You can also download it from [here](https://github.com/qbittorrent/qBittorrent/raw/master/5B7CC9A2.asc).<br />
|
|
||||||
**PREVIOUSLY** the following key was used to sign the v3.3.4 source tarballs and v3.3.4 Windows installer **only**: 4096R/[520EC6F6](https://pgp.mit.edu/pks/lookup?op=get&search=0xA1ACCAE4520EC6F6) with fingerprint `F4A5FD201B117B1C2AB590E2A1ACCAE4520EC6F6`.<br />
|
|
||||||
|
|
||||||
### Misc:
|
|
||||||
For more information please visit:
|
|
||||||
http://www.qbittorrent.org
|
|
||||||
|
|
||||||
or our wiki here:
|
|
||||||
http://wiki.qbittorrent.org
|
|
||||||
|
|
||||||
Use the forum for troubleshooting before reporting bugs:
|
|
||||||
http://forum.qbittorrent.org
|
|
||||||
|
|
||||||
Please report any bug (or feature request) to:
|
|
||||||
http://bugs.qbittorrent.org
|
|
||||||
|
|
||||||
You can also meet me (sledgehammer_999) on IRC:
|
|
||||||
`#qbittorrent on irc.freenode.net`
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
sledgehammer999 <sledgehammer999@qbittorrent.org>
|
|
74
README.os2
|
@ -1,74 +0,0 @@
|
||||||
qBittorrent - A BitTorrent client in Qt4
|
|
||||||
------------------------------------------
|
|
||||||
|
|
||||||
This is the eComStation (OS/2) qBittorrent part of the readme. See also README for more general information.
|
|
||||||
|
|
||||||
|
|
||||||
Building qBittorrent
|
|
||||||
********************
|
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
============
|
|
||||||
|
|
||||||
- gcc based build env (recommended gcc v4.4.2 or greater)
|
|
||||||
|
|
||||||
- Qt4 for eCS (OS/2) dev package (see http://svn.netlabs.org/qt4 for more information)
|
|
||||||
|
|
||||||
- libtorrent-rasterbar for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
|
||||||
|
|
||||||
- boost for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
|
||||||
|
|
||||||
|
|
||||||
How to build
|
|
||||||
============
|
|
||||||
|
|
||||||
First you need to create the conf.pri file in the same dir as this readme.os2 is.
|
|
||||||
the conf.pri file has the following content:
|
|
||||||
|
|
||||||
##### conf.pri content begin #####
|
|
||||||
BINDIR = ./bin
|
|
||||||
INCDIR = ./include
|
|
||||||
LIBDIR = ./lib
|
|
||||||
DATADIR = ./share
|
|
||||||
|
|
||||||
CONFIG += staticlib
|
|
||||||
INCLUDEPATH += x:/trees/libtorrent/trunk/include
|
|
||||||
LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
|
|
||||||
-Lx:/trees/boost/trunk/stage/lib \
|
|
||||||
-Lx:/trees/openssl \
|
|
||||||
-Lx:/extras/lib
|
|
||||||
##### conf.pri content end #####
|
|
||||||
|
|
||||||
Of course all the above path references have to be adjusted to your build env.
|
|
||||||
|
|
||||||
Now you can either do a normal build or a shadow build. A shadow build has the
|
|
||||||
advantage that no created files are in the same dir as the sources are.
|
|
||||||
|
|
||||||
For a normal build do the following:
|
|
||||||
|
|
||||||
Simply type:
|
|
||||||
$ qmake
|
|
||||||
|
|
||||||
Followed by:
|
|
||||||
$ make
|
|
||||||
|
|
||||||
For a shadow build do the following:
|
|
||||||
given your sources are in x:\trees\qbittorrent\trunk create a
|
|
||||||
x:\trees\qbittorrent\build directory
|
|
||||||
|
|
||||||
Now switch to the created directory and type:
|
|
||||||
$ qmake ..\trunk
|
|
||||||
|
|
||||||
Followed by:
|
|
||||||
$ make
|
|
||||||
|
|
||||||
If all works fine you should get a working qbittorrent executable.
|
|
||||||
|
|
||||||
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
|
|
||||||
#netlabs on irc.freenode.net
|
|
||||||
|
|
||||||
------------------------------------------
|
|
||||||
Silvan Scherrer <silvan.scherrer@aroa.ch>
|
|
||||||
|
|
||||||
|
|
2
TODO
|
@ -1,2 +0,0 @@
|
||||||
See https://blueprints.launchpad.net/qbittorrent/
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
aclocal -I m4
|
|
||||||
autoconf
|
|
|
@ -1,347 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
|
|
||||||
scriptversion=2012-10-14.11; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
|
|
||||||
# We need space, tab and new line, in precisely that order. Quoting is
|
|
||||||
# there to prevent tools from complaining about whitespace usage.
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
file_conv=
|
|
||||||
|
|
||||||
# func_file_conv build_file lazy
|
|
||||||
# Convert a $build file to $host form and store it in $file
|
|
||||||
# Currently only supports Windows hosts. If the determined conversion
|
|
||||||
# type is listed in (the comma separated) LAZY, no conversion will
|
|
||||||
# take place.
|
|
||||||
func_file_conv ()
|
|
||||||
{
|
|
||||||
file=$1
|
|
||||||
case $file in
|
|
||||||
/ | /[!/]*) # absolute file, and not a UNC file
|
|
||||||
if test -z "$file_conv"; then
|
|
||||||
# lazily determine how to convert abs files
|
|
||||||
case `uname -s` in
|
|
||||||
MINGW*)
|
|
||||||
file_conv=mingw
|
|
||||||
;;
|
|
||||||
CYGWIN*)
|
|
||||||
file_conv=cygwin
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
file_conv=wine
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
case $file_conv/,$2, in
|
|
||||||
*,$file_conv,*)
|
|
||||||
;;
|
|
||||||
mingw/*)
|
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
||||||
;;
|
|
||||||
cygwin/*)
|
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
wine/*)
|
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashL linkdir
|
|
||||||
# Make cl look for libraries in LINKDIR
|
|
||||||
func_cl_dashL ()
|
|
||||||
{
|
|
||||||
func_file_conv "$1"
|
|
||||||
if test -z "$lib_path"; then
|
|
||||||
lib_path=$file
|
|
||||||
else
|
|
||||||
lib_path="$lib_path;$file"
|
|
||||||
fi
|
|
||||||
linker_opts="$linker_opts -LIBPATH:$file"
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashl library
|
|
||||||
# Do a library search-path lookup for cl
|
|
||||||
func_cl_dashl ()
|
|
||||||
{
|
|
||||||
lib=$1
|
|
||||||
found=no
|
|
||||||
save_IFS=$IFS
|
|
||||||
IFS=';'
|
|
||||||
for dir in $lib_path $LIB
|
|
||||||
do
|
|
||||||
IFS=$save_IFS
|
|
||||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.dll.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/$lib.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/lib$lib.a"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/lib$lib.a
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS=$save_IFS
|
|
||||||
|
|
||||||
if test "$found" != yes; then
|
|
||||||
lib=$lib.lib
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_wrapper cl arg...
|
|
||||||
# Adjust compile command to suit cl
|
|
||||||
func_cl_wrapper ()
|
|
||||||
{
|
|
||||||
# Assume a capable shell
|
|
||||||
lib_path=
|
|
||||||
shared=:
|
|
||||||
linker_opts=
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.[oO][bB][jJ])
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fo"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fe"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
-I)
|
|
||||||
eat=1
|
|
||||||
func_file_conv "$2" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-I*)
|
|
||||||
func_file_conv "${1#-I}" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashl "$2"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l*)
|
|
||||||
func_cl_dashl "${1#-l}"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-L)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashL "$2"
|
|
||||||
;;
|
|
||||||
-L*)
|
|
||||||
func_cl_dashL "${1#-L}"
|
|
||||||
;;
|
|
||||||
-static)
|
|
||||||
shared=false
|
|
||||||
;;
|
|
||||||
-Wl,*)
|
|
||||||
arg=${1#-Wl,}
|
|
||||||
save_ifs="$IFS"; IFS=','
|
|
||||||
for flag in $arg; do
|
|
||||||
IFS="$save_ifs"
|
|
||||||
linker_opts="$linker_opts $flag"
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
;;
|
|
||||||
-Xlinker)
|
|
||||||
eat=1
|
|
||||||
linker_opts="$linker_opts $2"
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
|
||||||
func_file_conv "$1"
|
|
||||||
set x "$@" -Tp"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
|
||||||
func_file_conv "$1" mingw
|
|
||||||
set x "$@" "$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
if test -n "$linker_opts"; then
|
|
||||||
linker_opts="-link$linker_opts"
|
|
||||||
fi
|
|
||||||
exec "$@" $linker_opts
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
eat=
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
|
||||||
arguments, and rename the output as expected.
|
|
||||||
|
|
||||||
If you are trying to build a whole package this is not the
|
|
||||||
right script to run: please start by reading the file 'INSTALL'.
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "compile $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ofile=
|
|
||||||
cfile=
|
|
||||||
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
# So we strip '-o arg' only if arg is an object.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.obj)
|
|
||||||
ofile=$2
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" -o "$2"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*.c)
|
|
||||||
cfile=$1
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$ofile" || test -z "$cfile"; then
|
|
||||||
# If no '-o' option was seen then we might have been invoked from a
|
|
||||||
# pattern rule where we don't need one. That is ok -- this is a
|
|
||||||
# normal compilation that the losing compiler can handle. If no
|
|
||||||
# '.c' file was seen then we are probably linking. That is also
|
|
||||||
# ok.
|
|
||||||
exec "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Name of file we expect compiler to create.
|
|
||||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
|
||||||
|
|
||||||
# Create the lock directory.
|
|
||||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
|
||||||
# that we are using for the .o file. Also, base the name on the expected
|
|
||||||
# object file name, since that is what matters with a parallel build.
|
|
||||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
|
||||||
while true; do
|
|
||||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
# FIXME: race condition here if user kills between mkdir and trap.
|
|
||||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|
||||||
|
|
||||||
# Run the compile.
|
|
||||||
"$@"
|
|
||||||
ret=$?
|
|
||||||
|
|
||||||
if test -f "$cofile"; then
|
|
||||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
|
||||||
elif test -f "${cofile}bj"; then
|
|
||||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rmdir "$lockdir"
|
|
||||||
exit $ret
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
1421
build-aux/config.guess
vendored
1807
build-aux/config.sub
vendored
|
@ -1,501 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
|
|
||||||
scriptversion=2013-12-25.23; # UTC
|
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
|
||||||
# following copyright and license.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 X Consortium
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to
|
|
||||||
# deal in the Software without restriction, including without limitation the
|
|
||||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
# sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
||||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
# Except as contained in this notice, the name of the X Consortium shall not
|
|
||||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
||||||
# ings in this Software without prior written authorization from the X Consor-
|
|
||||||
# tium.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FSF changes to this file are in the public domain.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# 'make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch.
|
|
||||||
|
|
||||||
tab=' '
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" $tab$nl"
|
|
||||||
|
|
||||||
# Set DOITPROG to "echo" to test this script.
|
|
||||||
|
|
||||||
doit=${DOITPROG-}
|
|
||||||
doit_exec=${doit:-exec}
|
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
|
||||||
# or use environment vars.
|
|
||||||
|
|
||||||
chgrpprog=${CHGRPPROG-chgrp}
|
|
||||||
chmodprog=${CHMODPROG-chmod}
|
|
||||||
chownprog=${CHOWNPROG-chown}
|
|
||||||
cmpprog=${CMPPROG-cmp}
|
|
||||||
cpprog=${CPPROG-cp}
|
|
||||||
mkdirprog=${MKDIRPROG-mkdir}
|
|
||||||
mvprog=${MVPROG-mv}
|
|
||||||
rmprog=${RMPROG-rm}
|
|
||||||
stripprog=${STRIPPROG-strip}
|
|
||||||
|
|
||||||
posix_mkdir=
|
|
||||||
|
|
||||||
# Desired mode of installed file.
|
|
||||||
mode=0755
|
|
||||||
|
|
||||||
chgrpcmd=
|
|
||||||
chmodcmd=$chmodprog
|
|
||||||
chowncmd=
|
|
||||||
mvcmd=$mvprog
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
stripcmd=
|
|
||||||
|
|
||||||
src=
|
|
||||||
dst=
|
|
||||||
dir_arg=
|
|
||||||
dst_arg=
|
|
||||||
|
|
||||||
copy_on_change=false
|
|
||||||
is_target_a_directory=possibly
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
|
||||||
|
|
||||||
In the 1st form, copy SRCFILE to DSTFILE.
|
|
||||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
||||||
In the 4th, create DIRECTORIES.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--help display this help and exit.
|
|
||||||
--version display version info and exit.
|
|
||||||
|
|
||||||
-c (ignored)
|
|
||||||
-C install only if different (preserve the last data modification time)
|
|
||||||
-d create directories instead of installing files.
|
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
|
||||||
-o USER $chownprog installed files to USER.
|
|
||||||
-s $stripprog installed files.
|
|
||||||
-t DIRECTORY install into DIRECTORY.
|
|
||||||
-T report an error if DSTFILE is a directory.
|
|
||||||
|
|
||||||
Environment variables override the default commands:
|
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
||||||
RMPROG STRIPPROG
|
|
||||||
"
|
|
||||||
|
|
||||||
while test $# -ne 0; do
|
|
||||||
case $1 in
|
|
||||||
-c) ;;
|
|
||||||
|
|
||||||
-C) copy_on_change=true;;
|
|
||||||
|
|
||||||
-d) dir_arg=true;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
|
||||||
|
|
||||||
-m) mode=$2
|
|
||||||
case $mode in
|
|
||||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
|
||||||
echo "$0: invalid mode: $mode" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
|
||||||
|
|
||||||
-t)
|
|
||||||
is_target_a_directory=always
|
|
||||||
dst_arg=$2
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) is_target_a_directory=never;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
|
||||||
|
|
||||||
--) shift
|
|
||||||
break;;
|
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# We allow the use of options -d and -T together, by making -d
|
|
||||||
# take the precedence; this is for compatibility with GNU install.
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
echo "$0: target directory not allowed when installing a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
|
||||||
# When -t is used, the destination is already specified.
|
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
# $@ is not empty: it contains at least $arg.
|
|
||||||
set fnord "$@" "$dst_arg"
|
|
||||||
shift # fnord
|
|
||||||
fi
|
|
||||||
shift # arg
|
|
||||||
dst_arg=$arg
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
echo "$0: no input file specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# It's OK to call 'install-sh -d' without argument.
|
|
||||||
# This can happen when creating conditional directories.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
|
||||||
if test ! -d "$dst_arg"; then
|
|
||||||
echo "$0: $dst_arg: Is not a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
do_exit='(exit $ret); exit $ret'
|
|
||||||
trap "ret=129; $do_exit" 1
|
|
||||||
trap "ret=130; $do_exit" 2
|
|
||||||
trap "ret=141; $do_exit" 13
|
|
||||||
trap "ret=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
|
||||||
# However, 'strip' requires both read and write access to temps.
|
|
||||||
case $mode in
|
|
||||||
# Optimize common cases.
|
|
||||||
*644) cp_umask=133;;
|
|
||||||
*755) cp_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw='% 200'
|
|
||||||
fi
|
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
||||||
*)
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw=,u+rw
|
|
||||||
fi
|
|
||||||
cp_umask=$mode$u_plus_rw;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
for src
|
|
||||||
do
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $src in
|
|
||||||
-* | [=\(\)!]) src=./$src;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
dst=$src
|
|
||||||
dstdir=$dst
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
if test ! -f "$src" && test ! -d "$src"; then
|
|
||||||
echo "$0: $src does not exist." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dst_arg"; then
|
|
||||||
echo "$0: no destination specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dst=$dst_arg
|
|
||||||
|
|
||||||
# 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 "$is_target_a_directory" = never; then
|
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dstdir=$dst
|
|
||||||
dst=$dstdir/`basename "$src"`
|
|
||||||
dstdir_status=0
|
|
||||||
else
|
|
||||||
dstdir=`dirname "$dst"`
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
|
||||||
case $posix_mkdir in
|
|
||||||
'')
|
|
||||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
|
||||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
|
||||||
umask=`umask`
|
|
||||||
case $stripcmd.$umask in
|
|
||||||
# Optimize common cases.
|
|
||||||
*[2367][2367]) mkdir_umask=$umask;;
|
|
||||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
mkdir_umask=`expr $umask + 22 \
|
|
||||||
- $umask % 100 % 40 + $umask % 20 \
|
|
||||||
- $umask % 10 % 4 + $umask % 2
|
|
||||||
`;;
|
|
||||||
*) mkdir_umask=$umask,go-w;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
|
||||||
# Otherwise, rely on $mkdir_umask.
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
mkdir_mode=-m$mode
|
|
||||||
else
|
|
||||||
mkdir_mode=
|
|
||||||
fi
|
|
||||||
|
|
||||||
posix_mkdir=false
|
|
||||||
case $umask in
|
|
||||||
*[123567][0-7][0-7])
|
|
||||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
|
||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
||||||
|
|
||||||
if (umask $mkdir_umask &&
|
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
if test -z "$dir_arg" || {
|
|
||||||
# Check for POSIX incompatibilities with -m.
|
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
||||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
|
||||||
d????-?r-*) different_mode=700;;
|
|
||||||
d????-?--*) different_mode=755;;
|
|
||||||
*) false;;
|
|
||||||
esac &&
|
|
||||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
|
||||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
then posix_mkdir=:
|
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/d" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if
|
|
||||||
$posix_mkdir && (
|
|
||||||
umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
||||||
)
|
|
||||||
then :
|
|
||||||
else
|
|
||||||
|
|
||||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
|
||||||
# or it failed possibly due to a race condition. Create the
|
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
/*) prefix='/';;
|
|
||||||
[-=\(\)!]*) prefix='./';;
|
|
||||||
*) prefix='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
set -f
|
|
||||||
set fnord $dstdir
|
|
||||||
shift
|
|
||||||
set +f
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
prefixes=
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test X"$d" = X && continue
|
|
||||||
|
|
||||||
prefix=$prefix$d
|
|
||||||
if test -d "$prefix"; then
|
|
||||||
prefixes=
|
|
||||||
else
|
|
||||||
if $posix_mkdir; then
|
|
||||||
(umask=$mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
test -d "$prefix" || exit 1
|
|
||||||
else
|
|
||||||
case $prefix in
|
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
||||||
*) qprefix=$prefix;;
|
|
||||||
esac
|
|
||||||
prefixes="$prefixes '$qprefix'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
prefix=$prefix/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
||||||
test -d "$dstdir" || exit 1
|
|
||||||
obsolete_mkdir_used=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
||||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
||||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
|
||||||
dsttmp=$dstdir/_inst.$$_
|
|
||||||
rmtmp=$dstdir/_rm.$$_
|
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
|
||||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
|
||||||
#
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
||||||
#
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
|
||||||
if $copy_on_change &&
|
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
||||||
set -f &&
|
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
|
||||||
set +f &&
|
|
||||||
test "$old" = "$new" &&
|
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
rm -f "$dsttmp"
|
|
||||||
else
|
|
||||||
# Rename the file to the real destination.
|
|
||||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
||||||
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
|
||||||
# support -f.
|
|
||||||
{
|
|
||||||
# Now remove or move aside any old file at destination location.
|
|
||||||
# We try this two ways since rm can't unlink itself on some
|
|
||||||
# systems and the destination file might be busy for other
|
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
|
||||||
# file should still install successfully.
|
|
||||||
{
|
|
||||||
test ! -f "$dst" ||
|
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
||||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
|
||||||
} ||
|
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
|
||||||
(exit 1); exit 1
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
|
||||||
}
|
|
||||||
fi || exit 1
|
|
||||||
|
|
||||||
trap '' 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,215 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
|
||||||
|
|
||||||
scriptversion=2013-10-28.13; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
--is-lightweight)
|
|
||||||
# Used by our autoconf macros to check whether the available missing
|
|
||||||
# script is modern enough.
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
--run)
|
|
||||||
# Back-compat with the calling convention used by older automake.
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
|
||||||
to PROGRAM being missing or too old.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal autoconf autoheader autom4te automake makeinfo
|
|
||||||
bison yacc flex lex help2man
|
|
||||||
|
|
||||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
|
||||||
'g' are ignored when checking the name.
|
|
||||||
|
|
||||||
Send bug reports to <bug-automake@gnu.org>."
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing $scriptversion (GNU Automake)"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: unknown '$1' option"
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Run the given program, remember its exit status.
|
|
||||||
"$@"; st=$?
|
|
||||||
|
|
||||||
# If it succeeded, we are done.
|
|
||||||
test $st -eq 0 && exit 0
|
|
||||||
|
|
||||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
|
||||||
# passed; such an option is passed most likely to detect whether the
|
|
||||||
# program is present and works.
|
|
||||||
case $2 in --version|--help) exit $st;; esac
|
|
||||||
|
|
||||||
# Exit code 63 means version mismatch. This often happens when the user
|
|
||||||
# tries to use an ancient version of a tool on a file that requires a
|
|
||||||
# minimum version.
|
|
||||||
if test $st -eq 63; then
|
|
||||||
msg="probably too old"
|
|
||||||
elif test $st -eq 127; then
|
|
||||||
# Program was missing.
|
|
||||||
msg="missing on your system"
|
|
||||||
else
|
|
||||||
# Program was found and executed, but failed. Give up.
|
|
||||||
exit $st
|
|
||||||
fi
|
|
||||||
|
|
||||||
perl_URL=http://www.perl.org/
|
|
||||||
flex_URL=http://flex.sourceforge.net/
|
|
||||||
gnu_software_URL=http://www.gnu.org/software
|
|
||||||
|
|
||||||
program_details ()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
aclocal|automake)
|
|
||||||
echo "The '$1' program is part of the GNU Automake package:"
|
|
||||||
echo "<$gnu_software_URL/automake>"
|
|
||||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/autoconf>"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
autoconf|autom4te|autoheader)
|
|
||||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
|
||||||
echo "<$gnu_software_URL/autoconf/>"
|
|
||||||
echo "It also requires GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice ()
|
|
||||||
{
|
|
||||||
# Normalize program name to check for.
|
|
||||||
normalized_program=`echo "$1" | sed '
|
|
||||||
s/^gnu-//; t
|
|
||||||
s/^gnu//; t
|
|
||||||
s/^g//; t'`
|
|
||||||
|
|
||||||
printf '%s\n' "'$1' is $msg."
|
|
||||||
|
|
||||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
|
||||||
case $normalized_program in
|
|
||||||
autoconf*)
|
|
||||||
echo "You should only need it if you modified 'configure.ac',"
|
|
||||||
echo "or m4 files included by it."
|
|
||||||
program_details 'autoconf'
|
|
||||||
;;
|
|
||||||
autoheader*)
|
|
||||||
echo "You should only need it if you modified 'acconfig.h' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'autoheader'
|
|
||||||
;;
|
|
||||||
automake*)
|
|
||||||
echo "You should only need it if you modified 'Makefile.am' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'automake'
|
|
||||||
;;
|
|
||||||
aclocal*)
|
|
||||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'aclocal'
|
|
||||||
;;
|
|
||||||
autom4te*)
|
|
||||||
echo "You might have modified some maintainer files that require"
|
|
||||||
echo "the 'autom4te' program to be rebuilt."
|
|
||||||
program_details 'autom4te'
|
|
||||||
;;
|
|
||||||
bison*|yacc*)
|
|
||||||
echo "You should only need it if you modified a '.y' file."
|
|
||||||
echo "You may want to install the GNU Bison package:"
|
|
||||||
echo "<$gnu_software_URL/bison/>"
|
|
||||||
;;
|
|
||||||
lex*|flex*)
|
|
||||||
echo "You should only need it if you modified a '.l' file."
|
|
||||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
|
||||||
echo "<$flex_URL>"
|
|
||||||
;;
|
|
||||||
help2man*)
|
|
||||||
echo "You should only need it if you modified a dependency" \
|
|
||||||
"of a man page."
|
|
||||||
echo "You may want to install the GNU Help2man package:"
|
|
||||||
echo "<$gnu_software_URL/help2man/>"
|
|
||||||
;;
|
|
||||||
makeinfo*)
|
|
||||||
echo "You should only need it if you modified a '.texi' file, or"
|
|
||||||
echo "any other file indirectly affecting the aspect of the manual."
|
|
||||||
echo "You might want to install the Texinfo package:"
|
|
||||||
echo "<$gnu_software_URL/texinfo/>"
|
|
||||||
echo "The spurious makeinfo call might also be the consequence of"
|
|
||||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
|
||||||
echo "want to install GNU make:"
|
|
||||||
echo "<$gnu_software_URL/make/>"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "You might have modified some files without having the proper"
|
|
||||||
echo "tools for further handling them. Check the 'README' file, it"
|
|
||||||
echo "often tells you about the needed prerequisites for installing"
|
|
||||||
echo "this package. You may also peek at any GNU archive site, in"
|
|
||||||
echo "case some other package contains this missing '$1' program."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
|
||||||
-e '2,$s/^/ /' >&2
|
|
||||||
|
|
||||||
# Propagate the correct exit status (expected to be 127 for a program
|
|
||||||
# not found, 63 for a program that failed due to version mismatch).
|
|
||||||
exit $st
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,355 +0,0 @@
|
||||||
# Borrowed from Avogadro project (https://github.com/OpenChemistry/avogadroapp)
|
|
||||||
|
|
||||||
#.rst:
|
|
||||||
# DeployQt5
|
|
||||||
# ---------
|
|
||||||
#
|
|
||||||
# Functions to help assemble a standalone Qt5 executable.
|
|
||||||
#
|
|
||||||
# A collection of CMake utility functions useful for deploying Qt5
|
|
||||||
# executables.
|
|
||||||
#
|
|
||||||
# The following functions are provided by this module:
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# write_qt5_conf
|
|
||||||
# resolve_qt5_paths
|
|
||||||
# fixup_qt5_executable
|
|
||||||
# install_qt5_plugin_path
|
|
||||||
# install_qt5_plugin
|
|
||||||
# install_qt5_executable
|
|
||||||
#
|
|
||||||
# Requires CMake 2.8.9 or greater because Qt 5 does.
|
|
||||||
# Also depends on BundleUtilities.cmake.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# WRITE_QT5_CONF(<qt_conf_dir> <qt_conf_contents>)
|
|
||||||
#
|
|
||||||
# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# RESOLVE_QT5_PATHS(<paths_var> [<executable_path>])
|
|
||||||
#
|
|
||||||
# Loop through <paths_var> list and if any don't exist resolve them
|
|
||||||
# relative to the <executable_path> (if supplied) or the
|
|
||||||
# CMAKE_INSTALL_PREFIX.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# FIXUP_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
|
|
||||||
#
|
|
||||||
# Copies Qt plugins, writes a Qt configuration file (if needed) and
|
|
||||||
# fixes up a Qt5 executable using BundleUtilities so it is standalone
|
|
||||||
# and can be drag-and-drop copied to another machine as long as all of
|
|
||||||
# the system libraries are compatible.
|
|
||||||
#
|
|
||||||
# <executable> should point to the executable to be fixed-up.
|
|
||||||
#
|
|
||||||
# <qtplugins> should contain a list of the names or paths of any Qt
|
|
||||||
# plugins to be installed.
|
|
||||||
#
|
|
||||||
# <libs> will be passed to BundleUtilities and should be a list of any
|
|
||||||
# already installed plugins, libraries or executables to also be
|
|
||||||
# fixed-up.
|
|
||||||
#
|
|
||||||
# <dirs> will be passed to BundleUtilities and should contain and
|
|
||||||
# directories to be searched to find library dependencies.
|
|
||||||
#
|
|
||||||
# <plugins_dir> allows an custom plugins directory to be used.
|
|
||||||
#
|
|
||||||
# <request_qt_conf> will force a qt.conf file to be written even if not
|
|
||||||
# needed.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# INSTALL_QT5_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
|
|
||||||
#
|
|
||||||
# Install (or copy) a resolved <plugin> to the default plugins directory
|
|
||||||
# (or <plugins_dir>) relative to <executable> and store the result in
|
|
||||||
# <installed_plugin_path_var>.
|
|
||||||
#
|
|
||||||
# If <copy> is set to TRUE then the plugins will be copied rather than
|
|
||||||
# installed. This is to allow this module to be used at CMake time
|
|
||||||
# rather than install time.
|
|
||||||
#
|
|
||||||
# If <component> is set then anything installed will use this COMPONENT.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# INSTALL_QT5_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
|
|
||||||
#
|
|
||||||
# Install (or copy) an unresolved <plugin> to the default plugins
|
|
||||||
# directory (or <plugins_dir>) relative to <executable> and store the
|
|
||||||
# result in <installed_plugin_path_var>. See documentation of
|
|
||||||
# INSTALL_QT5_PLUGIN_PATH.
|
|
||||||
#
|
|
||||||
# ::
|
|
||||||
#
|
|
||||||
# INSTALL_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
|
|
||||||
#
|
|
||||||
# Installs Qt plugins, writes a Qt configuration file (if needed) and
|
|
||||||
# fixes up a Qt5 executable using BundleUtilities so it is standalone
|
|
||||||
# and can be drag-and-drop copied to another machine as long as all of
|
|
||||||
# the system libraries are compatible. The executable will be fixed-up
|
|
||||||
# at install time. <component> is the COMPONENT used for bundle fixup
|
|
||||||
# and plugin installation. See documentation of FIXUP_QT5_BUNDLE.
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# Copyright 2011 Mike McQuaid <mike@mikemcquaid.com>
|
|
||||||
#
|
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
# see accompanying file Copyright.txt for details.
|
|
||||||
#
|
|
||||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the License for more information.
|
|
||||||
#=============================================================================
|
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
|
||||||
# License text for the above reference.)
|
|
||||||
|
|
||||||
# The functions defined in this file depend on the fixup_bundle function
|
|
||||||
# (and others) found in BundleUtilities.cmake
|
|
||||||
|
|
||||||
include(BundleUtilities)
|
|
||||||
set(DeployQt5_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
|
|
||||||
set(DeployQt5_apple_plugins_dir "PlugIns")
|
|
||||||
|
|
||||||
function(write_qt5_conf qt_conf_dir qt_conf_contents)
|
|
||||||
set(qt_conf_path "${qt_conf_dir}/qt.conf")
|
|
||||||
message(STATUS "Writing ${qt_conf_path}")
|
|
||||||
file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(resolve_qt5_paths paths_var)
|
|
||||||
set(executable_path ${ARGV1})
|
|
||||||
|
|
||||||
set(paths_resolved)
|
|
||||||
foreach(path ${${paths_var}})
|
|
||||||
if(EXISTS "${path}")
|
|
||||||
list(APPEND paths_resolved "${path}")
|
|
||||||
else()
|
|
||||||
if(${executable_path})
|
|
||||||
list(APPEND paths_resolved "${executable_path}/${path}")
|
|
||||||
else()
|
|
||||||
list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
set(${paths_var} ${paths_resolved} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(fixup_qt5_executable executable)
|
|
||||||
set(qtplugins ${ARGV1})
|
|
||||||
set(libs ${ARGV2})
|
|
||||||
set(dirs ${ARGV3})
|
|
||||||
set(plugins_dir ${ARGV4})
|
|
||||||
set(request_qt_conf ${ARGV5})
|
|
||||||
|
|
||||||
message(STATUS "fixup_qt5_executable")
|
|
||||||
message(STATUS " executable='${executable}'")
|
|
||||||
message(STATUS " qtplugins='${qtplugins}'")
|
|
||||||
message(STATUS " libs='${libs}'")
|
|
||||||
message(STATUS " dirs='${dirs}'")
|
|
||||||
message(STATUS " plugins_dir='${plugins_dir}'")
|
|
||||||
message(STATUS " request_qt_conf='${request_qt_conf}'")
|
|
||||||
|
|
||||||
if(QT_LIBRARY_DIR)
|
|
||||||
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
|
||||||
endif()
|
|
||||||
if(QT_BINARY_DIR)
|
|
||||||
list(APPEND dirs "${QT_BINARY_DIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
set(qt_conf_dir "${executable}/Contents/Resources")
|
|
||||||
set(executable_path "${executable}")
|
|
||||||
set(write_qt_conf TRUE)
|
|
||||||
if(NOT plugins_dir)
|
|
||||||
set(plugins_dir "${DeployQt5_apple_plugins_dir}")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
get_filename_component(executable_path "${executable}" PATH)
|
|
||||||
if(NOT executable_path)
|
|
||||||
set(executable_path ".")
|
|
||||||
endif()
|
|
||||||
set(qt_conf_dir "${executable_path}")
|
|
||||||
set(write_qt_conf ${request_qt_conf})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach(plugin ${qtplugins})
|
|
||||||
set(installed_plugin_path "")
|
|
||||||
install_qt5_plugin("${plugin}" "${executable}" 1 installed_plugin_path)
|
|
||||||
list(APPEND libs ${installed_plugin_path})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
foreach(lib ${libs})
|
|
||||||
if(NOT EXISTS "${lib}")
|
|
||||||
message(FATAL_ERROR "Library does not exist: ${lib}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
resolve_qt5_paths(libs "${executable_path}")
|
|
||||||
|
|
||||||
if(write_qt_conf)
|
|
||||||
set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
|
|
||||||
write_qt5_conf("${qt_conf_dir}" "${qt_conf_contents}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
fixup_bundle("${executable}" "${libs}" "${dirs}")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(install_qt5_plugin_path plugin executable copy installed_plugin_path_var)
|
|
||||||
set(plugins_dir ${ARGV4})
|
|
||||||
set(component ${ARGV5})
|
|
||||||
set(configurations ${ARGV6})
|
|
||||||
if(EXISTS "${plugin}")
|
|
||||||
if(APPLE)
|
|
||||||
if(NOT plugins_dir)
|
|
||||||
set(plugins_dir "${DeployQt5_apple_plugins_dir}")
|
|
||||||
endif()
|
|
||||||
set(plugins_path "${executable}/Contents/${plugins_dir}")
|
|
||||||
else()
|
|
||||||
get_filename_component(plugins_path "${executable}" PATH)
|
|
||||||
if(NOT plugins_path)
|
|
||||||
set(plugins_path ".")
|
|
||||||
endif()
|
|
||||||
if(plugins_dir)
|
|
||||||
set(plugins_path "${plugins_path}/${plugins_dir}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(plugin_group "")
|
|
||||||
|
|
||||||
get_filename_component(plugin_path "${plugin}" PATH)
|
|
||||||
get_filename_component(plugin_parent_path "${plugin_path}" PATH)
|
|
||||||
get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME)
|
|
||||||
get_filename_component(plugin_name "${plugin}" NAME)
|
|
||||||
string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name)
|
|
||||||
|
|
||||||
if("${plugin_parent_dir_name}" STREQUAL "plugins")
|
|
||||||
get_filename_component(plugin_group "${plugin_path}" NAME)
|
|
||||||
set(${plugin_group_var} "${plugin_group}")
|
|
||||||
endif()
|
|
||||||
set(plugins_path "${plugins_path}/${plugin_group}")
|
|
||||||
|
|
||||||
if(${copy})
|
|
||||||
file(MAKE_DIRECTORY "${plugins_path}")
|
|
||||||
file(COPY "${plugin}" DESTINATION "${plugins_path}")
|
|
||||||
else()
|
|
||||||
if(configurations AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE))
|
|
||||||
set(configurations CONFIGURATIONS ${configurations})
|
|
||||||
else()
|
|
||||||
unset(configurations)
|
|
||||||
endif()
|
|
||||||
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
|
|
||||||
endif()
|
|
||||||
set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(install_qt5_plugin plugin executable copy installed_plugin_path_var)
|
|
||||||
set(plugins_dir ${ARGV4})
|
|
||||||
set(component ${ARGV5})
|
|
||||||
if(EXISTS "${plugin}")
|
|
||||||
install_qt5_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
|
|
||||||
else()
|
|
||||||
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
|
|
||||||
set(plugin_release_var "${plugin_var}_RELEASE")
|
|
||||||
set(plugin_debug_var "${plugin_var}_DEBUG")
|
|
||||||
set(plugin_release "${${plugin_release_var}}")
|
|
||||||
set(plugin_debug "${${plugin_debug_var}}")
|
|
||||||
if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}")
|
|
||||||
message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
|
|
||||||
endif()
|
|
||||||
if(NOT EXISTS "${${plugin_debug_var}}")
|
|
||||||
set(plugin_debug "${plugin_release}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
|
|
||||||
install_qt5_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
|
|
||||||
install_qt5_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug")
|
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
|
|
||||||
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug})
|
|
||||||
else()
|
|
||||||
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
install_qt5_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(install_qt5_executable executable)
|
|
||||||
set(qtplugins ${ARGV1})
|
|
||||||
set(libs ${ARGV2})
|
|
||||||
set(dirs ${ARGV3})
|
|
||||||
set(plugins_dir ${ARGV4})
|
|
||||||
set(request_qt_conf ${ARGV5})
|
|
||||||
set(component ${ARGV6})
|
|
||||||
if(QT_LIBRARY_DIR)
|
|
||||||
list(APPEND dirs "${QT_LIBRARY_DIR}")
|
|
||||||
endif()
|
|
||||||
if(QT_BINARY_DIR)
|
|
||||||
list(APPEND dirs "${QT_BINARY_DIR}")
|
|
||||||
endif()
|
|
||||||
if(TARGET Qt5::Core)
|
|
||||||
get_property(_locCore TARGET Qt5::Core PROPERTY LOCATION_RELEASE)
|
|
||||||
get_filename_component(_loc ${_locCore} DIRECTORY)
|
|
||||||
message(STATUS "Adding Qt 5 directory: ${_loc}")
|
|
||||||
list(APPEND dirs "${_loc}")
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "No Qt5::Core target found, ensure it is available")
|
|
||||||
endif()
|
|
||||||
if(component)
|
|
||||||
set(component COMPONENT ${component})
|
|
||||||
else()
|
|
||||||
unset(component)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_filename_component(executable_absolute "${executable}" ABSOLUTE)
|
|
||||||
if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
|
|
||||||
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
|
|
||||||
elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
|
|
||||||
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type)
|
|
||||||
endif()
|
|
||||||
if(qtcore_type STREQUAL "system")
|
|
||||||
set(qt_plugins_dir "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(QT_IS_STATIC)
|
|
||||||
message(WARNING "Qt built statically: not installing plugins.")
|
|
||||||
else()
|
|
||||||
if(APPLE)
|
|
||||||
get_property(loc TARGET Qt5::QCocoaIntegrationPlugin
|
|
||||||
PROPERTY LOCATION_RELEASE)
|
|
||||||
install_qt5_plugin("${loc}" "${executable}" 0 installed_plugin_paths
|
|
||||||
"PlugIns" "${component}")
|
|
||||||
list(APPEND libs ${installed_plugin_paths})
|
|
||||||
elseif(WIN32)
|
|
||||||
get_property(loc TARGET Qt5::QWindowsIntegrationPlugin
|
|
||||||
PROPERTY LOCATION_RELEASE)
|
|
||||||
install_qt5_plugin("${loc}" "${executable}" 0 installed_plugin_paths
|
|
||||||
"" "${component}")
|
|
||||||
list(APPEND libs ${installed_plugin_paths})
|
|
||||||
endif()
|
|
||||||
foreach(plugin ${qtplugins})
|
|
||||||
set(installed_plugin_paths "")
|
|
||||||
install_qt5_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
|
|
||||||
list(APPEND libs ${installed_plugin_paths})
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
resolve_qt5_paths(libs "")
|
|
||||||
|
|
||||||
install(CODE
|
|
||||||
"include(\"${DeployQt5_cmake_dir}/DeployQt5.cmake\")
|
|
||||||
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
|
|
||||||
fixup_qt5_executable(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
|
|
||||||
${component}
|
|
||||||
)
|
|
||||||
endfunction()
|
|
|
@ -1,127 +0,0 @@
|
||||||
# - Try to find libtorrent-rasterbar
|
|
||||||
#
|
|
||||||
# If not using pkg-config, you can pre-set LibtorrentRasterbar_CUSTOM_DEFINITIONS
|
|
||||||
# for definitions unrelated to Boost's separate compilation (which are already
|
|
||||||
# decided by the LibtorrentRasterbar_USE_STATIC_LIBS variable).
|
|
||||||
#
|
|
||||||
# Once done this will define
|
|
||||||
# LibtorrentRasterbar_FOUND - System has libtorrent-rasterbar
|
|
||||||
# LibtorrentRasterbar_INCLUDE_DIRS - The libtorrent-rasterbar include directories
|
|
||||||
# LibtorrentRasterbar_LIBRARIES - The libraries needed to use libtorrent-rasterbar
|
|
||||||
# LibtorrentRasterbar_DEFINITIONS - Compiler switches required for using libtorrent-rasterbar
|
|
||||||
# LibtorrentRasterbar_OPENSSL_ENABLED - libtorrent-rasterbar uses and links against OpenSSL
|
|
||||||
|
|
||||||
find_package(Threads REQUIRED)
|
|
||||||
find_package(PkgConfig QUIET)
|
|
||||||
|
|
||||||
macro(_detect_boost_components _outComponets librariesList)
|
|
||||||
string(REGEX MATCHALL "boost_[a-z_]+[-a-z]*" _boost_libraries "${librariesList}")
|
|
||||||
string(REGEX REPLACE "boost_([a-z_]+)[-a-z]*" "\\1" ${_outComponets} "${_boost_libraries}")
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
if(PKG_CONFIG_FOUND)
|
|
||||||
pkg_check_modules(PC_LIBTORRENT_RASTERBAR QUIET libtorrent-rasterbar)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(LibtorrentRasterbar_USE_STATIC_LIBS)
|
|
||||||
set(LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(PC_LIBTORRENT_RASTERBAR_FOUND)
|
|
||||||
set(LibtorrentRasterbar_DEFINITIONS ${PC_LIBTORRENT_RASTERBAR_CFLAGS})
|
|
||||||
else()
|
|
||||||
if(LibtorrentRasterbar_CUSTOM_DEFINITIONS)
|
|
||||||
set(LibtorrentRasterbar_DEFINITIONS ${LibtorrentRasterbar_CUSTOM_DEFINITIONS})
|
|
||||||
else()
|
|
||||||
# Without pkg-config, we can't possibly figure out the correct build flags.
|
|
||||||
# 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.
|
|
||||||
set(LibtorrentRasterbar_DEFINITIONS
|
|
||||||
-DTORRENT_USE_OPENSSL
|
|
||||||
-DTORRENT_DISABLE_GEO_IP
|
|
||||||
-DBOOST_ASIO_ENABLE_CANCELIO
|
|
||||||
-DUNICODE -D_UNICODE -D_FILE_OFFSET_BITS=64)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
|
|
||||||
list(APPEND LibtorrentRasterbar_DEFINITIONS
|
|
||||||
-DTORRENT_LINKING_SHARED
|
|
||||||
-DBOOST_SYSTEM_DYN_LINK -DBOOST_CHRONO_DYN_LINK)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "libtorrent definitions: ${LibtorrentRasterbar_DEFINITIONS}")
|
|
||||||
|
|
||||||
find_path(LibtorrentRasterbar_INCLUDE_DIR libtorrent
|
|
||||||
HINTS ${PC_LIBTORRENT_RASTERBAR_INCLUDEDIR} ${PC_LIBTORRENT_RASTERBAR_INCLUDE_DIRS}
|
|
||||||
PATH_SUFFIXES libtorrent-rasterbar)
|
|
||||||
|
|
||||||
find_library(LibtorrentRasterbar_LIBRARY NAMES torrent-rasterbar libtorrent
|
|
||||||
HINTS ${PC_LIBTORRENT_RASTERBAR_LIBDIR} ${PC_LIBTORRENT_RASTERBAR_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
if(LibtorrentRasterbar_USE_STATIC_LIBS)
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIR})
|
|
||||||
|
|
||||||
# Without pkg-config, we can't possibly figure out the correct boost dependencies
|
|
||||||
if (LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
|
|
||||||
set(_boost_components "${LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES}")
|
|
||||||
else(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
|
|
||||||
if(PC_LIBTORRENT_RASTERBAR_FOUND)
|
|
||||||
_detect_boost_components(_boost_components "${PC_LIBTORRENT_RASTERBAR_LIBRARIES}")
|
|
||||||
else()
|
|
||||||
# all possible boost dependencies
|
|
||||||
set(_boost_components
|
|
||||||
date_time
|
|
||||||
system
|
|
||||||
chrono
|
|
||||||
random
|
|
||||||
thread
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
|
|
||||||
|
|
||||||
list(SORT _boost_components)
|
|
||||||
message(STATUS "Libtorrent Boost dependencies: ${_boost_components}")
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${_boost_components})
|
|
||||||
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
foreach(_boost_cmpnt IN LISTS _boost_components)
|
|
||||||
list(APPEND LibtorrentRasterbar_LIBRARIES "Boost::${_boost_cmpnt}")
|
|
||||||
endforeach(_boost_cmpnt)
|
|
||||||
|
|
||||||
set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRasterbar_ENCRYPTION_INDEX)
|
|
||||||
if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
|
|
||||||
set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set LibtorrentRasterbar_FOUND to TRUE
|
|
||||||
# if all listed variables are TRUE
|
|
||||||
find_package_handle_standard_args(LibtorrentRasterbar DEFAULT_MSG
|
|
||||||
LibtorrentRasterbar_LIBRARY
|
|
||||||
LibtorrentRasterbar_INCLUDE_DIR)
|
|
||||||
|
|
||||||
mark_as_advanced(LibtorrentRasterbar_INCLUDE_DIR LibtorrentRasterbar_LIBRARY
|
|
||||||
LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
|
|
||||||
LibtorrentRasterbar_ENCRYPTION_INDEX)
|
|
||||||
|
|
||||||
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::LibTorrent)
|
|
||||||
add_library(LibtorrentRasterbar::LibTorrent UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
set_target_properties(LibtorrentRasterbar::LibTorrent PROPERTIES
|
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
|
||||||
IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
|
|
||||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
|
|
||||||
INTERFACE_LINK_LIBRARIES "${LibtorrentRasterbar_LIBRARIES}"
|
|
||||||
INTERFACE_COMPILE_OPTIONS "${LibtorrentRasterbar_DEFINITIONS}"
|
|
||||||
)
|
|
||||||
endif()
|
|
|
@ -1,94 +0,0 @@
|
||||||
# - 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(QT4_FOUND)
|
|
||||||
message(STATUS "Looking for Qt4 single application library")
|
|
||||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication
|
|
||||||
# standard locations
|
|
||||||
/usr/include
|
|
||||||
/usr/include/QtSolutions
|
|
||||||
# qt4 location except mac's frameworks
|
|
||||||
"${QT_INCLUDE_DIR}/QtSolutions"
|
|
||||||
# mac's frameworks
|
|
||||||
${FRAMEWORK_INCLUDE_DIR}/QtSolutions
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
|
||||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
|
||||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
|
||||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
|
||||||
PATHS ${QT_LIBRARY_DIR}
|
|
||||||
)
|
|
||||||
ELSEIF(Qt5Widgets_FOUND)
|
|
||||||
message(STATUS "Looking for Qt5 single application library")
|
|
||||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Widgets_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
|
||||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${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_WIDGETSLIBRARY Qt5::Widgets LOCATION)
|
|
||||||
GET_FILENAME_COMPONENT(QT5_WIDGETSLIBRARYPATH ${QT5_WIDGETSLIBRARY} PATH)
|
|
||||||
|
|
||||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
|
||||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
|
||||||
PATHS ${QT5_WIDGETSLIBRARYPATH}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
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)
|
|
||||||
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)
|
|
||||||
|
|
||||||
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)
|
|
|
@ -1,26 +0,0 @@
|
||||||
#######
|
|
||||||
# Find systemd service dir
|
|
||||||
# sets variables
|
|
||||||
# SYSTEMD_FOUND
|
|
||||||
# SYSTEMD_SERVICES_INSTALL_DIR
|
|
||||||
|
|
||||||
find_package(PkgConfig QUIET REQUIRED)
|
|
||||||
|
|
||||||
if (NOT SYSTEMD_FOUND)
|
|
||||||
pkg_check_modules(SYSTEMD "systemd")
|
|
||||||
endif(NOT SYSTEMD_FOUND)
|
|
||||||
|
|
||||||
if (SYSTEMD_FOUND AND "${SYSTEMD_SERVICES_INSTALL_DIR}" STREQUAL "")
|
|
||||||
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
|
|
||||||
--variable=systemdsystemunitdir systemd
|
|
||||||
OUTPUT_VARIABLE SYSTEMD_SERVICES_INSTALL_DIR)
|
|
||||||
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SERVICES_INSTALL_DIR
|
|
||||||
"${SYSTEMD_SERVICES_INSTALL_DIR}")
|
|
||||||
elseif (NOT SYSTEMD_FOUND AND SYSTEMD_SERVICES_INSTALL_DIR)
|
|
||||||
message (FATAL_ERROR "Variable SYSTEMD_SERVICES_INSTALL_DIR is\
|
|
||||||
defined, but we can't find systemd using pkg-config")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (SYSTEMD_FOUND)
|
|
||||||
message(STATUS "systemd services install dir: ${SYSTEMD_SERVICES_INSTALL_DIR}")
|
|
||||||
endif(SYSTEMD_FOUND)
|
|
|
@ -1,28 +0,0 @@
|
||||||
# function for parsing version variables that are set in version.pri file
|
|
||||||
# the version identifiers there are defined as follows:
|
|
||||||
# VER_MAJOR = 3
|
|
||||||
# VER_MINOR = 4
|
|
||||||
# VER_BUGFIX = 0
|
|
||||||
# VER_BUILD = 0
|
|
||||||
# VER_STATUS = alpha
|
|
||||||
|
|
||||||
function(read_version priFile outMajor outMinor outBugfix outBuild outStatus)
|
|
||||||
file(STRINGS ${priFile} _priFileContents REGEX "^VER_.+")
|
|
||||||
# message(STATUS "version.pri version contents: ${_priFileContents}")
|
|
||||||
# the _priFileContents variable contains something like the following:
|
|
||||||
# VER_MAJOR = 3;VER_MINOR = 4;VER_BUGFIX = 0;VER_BUILD = 0;VER_STATUS = alpha # Should be empty for stable releases!
|
|
||||||
set(_regex "VER_MAJOR += +([0-9]+);VER_MINOR += +([0-9]+);VER_BUGFIX += +([0-9]+);VER_BUILD += +([0-9]+);VER_STATUS += +([0-9A-Za-z]+)?")
|
|
||||||
# note quotes around _regex, they are needed because the variable contains semicolons
|
|
||||||
string(REGEX MATCH "${_regex}" _tmp "${_priFileContents}")
|
|
||||||
if (NOT _tmp)
|
|
||||||
message(FATAL_ERROR "Could not detect project version number from ${priFile}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# message(STATUS "Matched version string: ${_tmp}")
|
|
||||||
|
|
||||||
set(${outMajor} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
|
||||||
set(${outMinor} ${CMAKE_MATCH_2} PARENT_SCOPE)
|
|
||||||
set(${outBugfix} ${CMAKE_MATCH_3} PARENT_SCOPE)
|
|
||||||
set(${outBuild} ${CMAKE_MATCH_4} PARENT_SCOPE)
|
|
||||||
set(${outStatus} ${CMAKE_MATCH_5} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
|
@ -1,38 +0,0 @@
|
||||||
macro(configure_msvc_runtime)
|
|
||||||
if(MSVC)
|
|
||||||
# Default to statically-linked runtime.
|
|
||||||
if("${MSVC_RUNTIME}" STREQUAL "")
|
|
||||||
set(MSVC_RUNTIME "static")
|
|
||||||
endif()
|
|
||||||
# Set compiler options.
|
|
||||||
set(variables
|
|
||||||
CMAKE_C_FLAGS_DEBUG
|
|
||||||
CMAKE_C_FLAGS_MINSIZEREL
|
|
||||||
CMAKE_C_FLAGS_RELEASE
|
|
||||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
|
||||||
CMAKE_CXX_FLAGS_DEBUG
|
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
|
||||||
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(${variable} MATCHES "/MD")
|
|
||||||
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
else()
|
|
||||||
message(STATUS
|
|
||||||
"MSVC -> forcing use of dynamically-linked runtime."
|
|
||||||
)
|
|
||||||
foreach(variable ${variables})
|
|
||||||
if(${variable} MATCHES "/MT")
|
|
||||||
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endmacro()
|
|
|
@ -1,49 +0,0 @@
|
||||||
###############################################################
|
|
||||||
#
|
|
||||||
# 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)
|
|
|
@ -1,28 +0,0 @@
|
||||||
# - macro similar to target_link_libraries, which links Qt components
|
|
||||||
# names of the components are pased in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
|
||||||
# and the macro links Qt4 ones if QT4_FOUND is set or Qt5 ones if not
|
|
||||||
|
|
||||||
macro (target_link_qt_components target)
|
|
||||||
if (QT4_FOUND)
|
|
||||||
foreach(_cmp ${ARGN})
|
|
||||||
if ("${_cmp}" STREQUAL "PRIVATE" OR
|
|
||||||
"${_cmp}" STREQUAL "PUBLIC" OR
|
|
||||||
"${_cmp}" STREQUAL "INTERFACE")
|
|
||||||
list(APPEND _QT_CMPNTS "${_cmp}")
|
|
||||||
else()
|
|
||||||
list(APPEND _QT_CMPNTS "Qt4::Qt${_cmp}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
else (QT4_FOUND)
|
|
||||||
foreach(_cmp ${ARGN})
|
|
||||||
if ("${_cmp}" STREQUAL "PRIVATE" OR
|
|
||||||
"${_cmp}" STREQUAL "PUBLIC" OR
|
|
||||||
"${_cmp}" STREQUAL "INTERFACE")
|
|
||||||
list(APPEND _QT_CMPNTS "${_cmp}")
|
|
||||||
else()
|
|
||||||
list(APPEND _QT_CMPNTS "Qt5::${_cmp}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif (QT4_FOUND)
|
|
||||||
target_link_libraries(${target} ${_QT_CMPNTS})
|
|
||||||
endmacro()
|
|
|
@ -1,89 +0,0 @@
|
||||||
# Sets cache variable QBT_ADDITONAL_FLAGS and QBT_ADDITONAL_CXX_FLAGS to list of additional
|
|
||||||
# compiler flags for C and C++ (QBT_ADDITONAL_FLAGS) and for C++ only (QBT_ADDITONAL_CXX_FLAGS)
|
|
||||||
# and appends them to CMAKE_XXX_FLAGS variables.
|
|
||||||
|
|
||||||
# It could use add_compile_options(), but then it is needed to use generator expressions,
|
|
||||||
# and most interesting of them are not compatible with Visual Studio :(
|
|
||||||
|
|
||||||
macro(qbt_set_compiler_options)
|
|
||||||
# if (NOT QBT_ADDITONAL_FLAGS)
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
||||||
#-Wshadow -Wconversion ?
|
|
||||||
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
|
|
||||||
"-Wfloat-equal -Wcast-qual -Wcast-align"
|
|
||||||
"-Wsign-conversion -Winvalid-pch -Werror=return-type -Wno-long-long"
|
|
||||||
# -fstack-protector-all
|
|
||||||
"-Werror -Wno-error=deprecated-declarations"
|
|
||||||
)
|
|
||||||
set (_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
|
||||||
"-Woverloaded-virtual -Wold-style-cast -Wstrict-null-sentinel"
|
|
||||||
"-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align"
|
|
||||||
"-Werror=overloaded-virtual"
|
|
||||||
# "-Weffc++"
|
|
||||||
"-Werror -Wno-error=cpp"
|
|
||||||
# we should modify code to make these ones obsolete
|
|
||||||
"-Wno-error=sign-conversion -Wno-error=float-equal"
|
|
||||||
)
|
|
||||||
|
|
||||||
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")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
|
||||||
# check for -pedantic
|
|
||||||
check_cxx_compiler_flag(-pedantic _PEDANTIC_IS_SUPPORTED)
|
|
||||||
if (_PEDANTIC_IS_SUPPORTED)
|
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-pedantic -pedantic-errors")
|
|
||||||
else (_PEDANTIC_IS_SUPPORTED)
|
|
||||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wpedantic")
|
|
||||||
endif (_PEDANTIC_IS_SUPPORTED)
|
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES Linux)
|
|
||||||
# if Glibc version is 2.20 or higher, set -D_DEFAULT_SOURCE
|
|
||||||
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)
|
|
||||||
|
|
||||||
string(REPLACE ";" " " _GCC_COMMON_C_AND_CXX_FLAGS_STRING "${_GCC_COMMON_C_AND_CXX_FLAGS}")
|
|
||||||
string(REPLACE ";" " " _GCC_COMMON_CXX_FLAGS_STRING "${_GCC_COMMON_CXX_FLAGS}")
|
|
||||||
|
|
||||||
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}")
|
|
||||||
|
|
||||||
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")
|
|
||||||
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|
||||||
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 (NOT QBT_ADDITONAL_FLAGS)
|
|
||||||
endmacro(qbt_set_compiler_options)
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
# a helper function which appends source to the main qBt target
|
|
||||||
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
|
|
||||||
|
|
||||||
function (qbt_target_sources)
|
|
||||||
set (_sources_rel "")
|
|
||||||
foreach (_source IN ITEMS ${ARGN})
|
|
||||||
if (IS_ABSOLUTE "${_source}")
|
|
||||||
set(source_abs "${_source}")
|
|
||||||
else()
|
|
||||||
get_filename_component(_source_abs "${_source}" ABSOLUTE)
|
|
||||||
endif()
|
|
||||||
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
|
|
||||||
list (APPEND _sources_rel "${_source_rel}")
|
|
||||||
endforeach()
|
|
||||||
target_sources (qBittorrent PRIVATE "${_sources_rel}")
|
|
||||||
endfunction (qbt_target_sources)
|
|
|
@ -1,21 +0,0 @@
|
||||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
|
||||||
include(DeployQt5)
|
|
||||||
|
|
||||||
set(plugins "")
|
|
||||||
|
|
||||||
get_property(svgIconPluginLocation TARGET Qt5::QSvgIconPlugin
|
|
||||||
PROPERTY LOCATION_RELEASE)
|
|
||||||
list(APPEND plugins "${svgIconPluginLocation}")
|
|
||||||
get_property(svgPluginLocation TARGET Qt5::QSvgPlugin
|
|
||||||
PROPERTY LOCATION_RELEASE)
|
|
||||||
list(APPEND plugins "${svgPluginLocation}")
|
|
||||||
|
|
||||||
set(sfx "")
|
|
||||||
if(APPLE)
|
|
||||||
set(sfx ".app")
|
|
||||||
elseif(WIN32)
|
|
||||||
set(sfx "${CMAKE_EXECUTABLE_SUFFIX}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
get_target_property(exe qBittorrent OUTPUT_NAME)
|
|
||||||
install_qt5_executable("${exe}${sfx}" "${plugins}" "" "" "")
|
|
|
@ -1,14 +0,0 @@
|
||||||
if (STACKTRACE_WIN)
|
|
||||||
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_WIN)
|
|
||||||
|
|
||||||
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
|
||||||
link_libraries(-Wl,--dynamicbase)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# LIBS += libadvapi32 libshell32 libuser32
|
|
||||||
# LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll
|
|
||||||
# LIBS += libpowrprof
|
|
|
@ -1,21 +0,0 @@
|
||||||
if (STACKTRACE_WIN)
|
|
||||||
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_WIN)
|
|
||||||
|
|
||||||
# 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)
|
|
||||||
set(MSVC_RUNTIME "dynamic")
|
|
||||||
configure_msvc_runtime()
|
|
|
@ -1,91 +0,0 @@
|
||||||
# Settings for compiling qBittorrent on Windows
|
|
||||||
|
|
||||||
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
|
|
||||||
-DBOOST_ALL_NO_LIB -DBOOST_ASIO_HASH_MAP_BUCKETS=1021
|
|
||||||
-DBOOST_ASIO_SEPARATE_COMPILATION
|
|
||||||
-DBOOST_EXCEPTION_DISABLE
|
|
||||||
-DBOOST_SYSTEM_STATIC_LINK=1
|
|
||||||
-DTORRENT_USE_OPENSSL
|
|
||||||
-D__USE_W32_SOCKETS
|
|
||||||
-D_FILE_OFFSET_BITS=64)
|
|
||||||
|
|
||||||
add_definitions(-DUNICODE
|
|
||||||
-D_UNICODE
|
|
||||||
-DWIN32
|
|
||||||
-D_WIN32
|
|
||||||
-DWIN32_LEAN_AND_MEAN
|
|
||||||
-DNTDDI_VERSION=0x05010000
|
|
||||||
-D_WIN32_WINNT=0x0501
|
|
||||||
-D_WIN32_IE=0x0501
|
|
||||||
-D_CRT_SECURE_NO_DEPRECATE
|
|
||||||
-D_SCL_SECURE_NO_DEPRECATE
|
|
||||||
)
|
|
||||||
# and boost
|
|
||||||
set(Boost_USE_STATIC_LIBS True)
|
|
||||||
# set(Boost_USE_STATIC_RUNTIME True)
|
|
||||||
|
|
||||||
# Here we assume that all required libraries are installed into the same prefix
|
|
||||||
# with usual unix subdirectories (bin, lib, include)
|
|
||||||
# if so, we just need to set CMAKE_SYSTEM_PREFIX_PATH
|
|
||||||
# If it is not the case, individual paths need to be specified manually (see below)
|
|
||||||
set(COMMON_INSTALL_PREFIX "c:/usr" CACHE PATH "Prefix used to install all the required libraries")
|
|
||||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${COMMON_INSTALL_PREFIX}")
|
|
||||||
|
|
||||||
# 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")
|
|
||||||
|
|
||||||
# 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")
|
|
||||||
|
|
||||||
# And now we can set specific values for the Boost and libtorrent libraries.
|
|
||||||
# The following values are generated from the paths listed above just for an example
|
|
||||||
# they have to be set to actual locations
|
|
||||||
|
|
||||||
# Boost
|
|
||||||
# set(BOOST_ROOT "${COMMON_INSTALL_PREFIX}")
|
|
||||||
# set(Boost_version_suffix "1_59")
|
|
||||||
# if a link like boost-version/boost -> boost was created or the boost directory was renamed in the same way,
|
|
||||||
# the following needs adjustment
|
|
||||||
# set(BOOST_INCLUDEDIR "${COMMON_INSTALL_PREFIX}/include/boost-${Boost_version_suffix}")
|
|
||||||
# set(BOOST_LIBRARYDIR "${COMMON_INSTALL_PREFIX}/lib/")
|
|
||||||
|
|
||||||
# libtorrent
|
|
||||||
|
|
||||||
# set(PC_LIBTORRENT_RASTERBAR_INCLUDEDIR "${COMMON_INSTALL_PREFIX}")
|
|
||||||
# set(PC_LIBTORRENT_RASTERBAR_LIBDIR "${COMMON_INSTALL_PREFIX}/lib")
|
|
||||||
|
|
||||||
set(AUTOGEN_TARGETS_FOLDER "generated")
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_BINDIR ".")
|
|
||||||
|
|
||||||
# Test 32/64 bits
|
|
||||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
||||||
message(STATUS "Target is 64 bits")
|
|
||||||
if (WIN32)
|
|
||||||
set(WINXXBITS Win64)
|
|
||||||
endif(WIN32)
|
|
||||||
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
||||||
message(STATUS "Target is 32 bits")
|
|
||||||
if (WIN32)
|
|
||||||
set(WINXXBITS Win32)
|
|
||||||
endif(WIN32)
|
|
||||||
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
include(winconf-msvc)
|
|
||||||
else (MSVC)
|
|
||||||
include(winconf-mingw)
|
|
||||||
endif (MSVC)
|
|
|
@ -1,39 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorCodeStyle>
|
|
||||||
<!-- Written by QtCreator 3.2.82, 2014-11-26T02:08:28. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>CodeStyleData</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="AlignAssignments">true</value>
|
|
||||||
<value type="bool" key="AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="BindStarToIdentifier">false</value>
|
|
||||||
<value type="bool" key="BindStarToLeftSpecifier">true</value>
|
|
||||||
<value type="bool" key="BindStarToRightSpecifier">false</value>
|
|
||||||
<value type="bool" key="BindStarToTypeName">true</value>
|
|
||||||
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">false</value>
|
|
||||||
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
|
||||||
<value type="bool" key="IndentBlockBody">true</value>
|
|
||||||
<value type="bool" key="IndentBlockBraces">false</value>
|
|
||||||
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
|
||||||
<value type="bool" key="IndentClassBraces">false</value>
|
|
||||||
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
|
|
||||||
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
|
||||||
<value type="bool" key="IndentEnumBraces">false</value>
|
|
||||||
<value type="bool" key="IndentFunctionBody">true</value>
|
|
||||||
<value type="bool" key="IndentFunctionBraces">false</value>
|
|
||||||
<value type="bool" key="IndentNamespaceBody">true</value>
|
|
||||||
<value type="bool" key="IndentNamespaceBraces">false</value>
|
|
||||||
<value type="int" key="IndentSize">4</value>
|
|
||||||
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
|
||||||
<value type="bool" key="IndentSwitchLabels">false</value>
|
|
||||||
<value type="int" key="PaddingMode">1</value>
|
|
||||||
<value type="bool" key="SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="TabSize">4</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>DisplayName</variable>
|
|
||||||
<value type="QString">qBittorrent</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
24
conf.pri.in
|
@ -1,24 +0,0 @@
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
PREFIX = @EXPAND_PREFIX@
|
|
||||||
BINDIR = @EXPAND_BINDIR@
|
|
||||||
DATADIR = @EXPAND_DATADIR@
|
|
||||||
MANPREFIX = @EXPAND_MANDIR@
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
|
|
||||||
|
|
||||||
EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@
|
|
||||||
EXTERNAL_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
|
|
||||||
# added /usr/local/include due to Qt 5.7.0 bug on macOS
|
|
||||||
macx: EXTERNAL_INCLUDES += "/usr/local/include"
|
|
||||||
INCLUDEPATH += $$EXTERNAL_INCLUDES
|
|
||||||
|
|
||||||
EXTERNAL_LIBS = @LDFLAGS@ @LIBS@
|
|
||||||
EXTERNAL_LIBS -= $$QMAKE_DEFAULT_LIBDIRS
|
|
||||||
LIBS += $$EXTERNAL_LIBS
|
|
||||||
|
|
||||||
CONFIG += @QBT_ADD_CONFIG@
|
|
||||||
CONFIG -= @QBT_REMOVE_CONFIG@
|
|
||||||
|
|
||||||
DEFINES += @QBT_ADD_DEFINES@
|
|
||||||
DEFINES -= @QBT_REMOVE_DEFINES@
|
|
237
configure.ac
|
@ -1,237 +0,0 @@
|
||||||
AC_INIT([qbittorrent], [v3.2.0alpha], [bugs.qbittorrent.org], [], [http://www.qbittorrent.org/])
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_CXX
|
|
||||||
AC_PROG_SED
|
|
||||||
AC_LANG(C++)
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
AM_INIT_AUTOMAKE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 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,
|
|
||||||
[AS_HELP_STRING([--enable-debug],
|
|
||||||
[Enable debug build])],
|
|
||||||
[],
|
|
||||||
[enable_debug=no])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(gui,
|
|
||||||
[AS_HELP_STRING([--disable-gui],
|
|
||||||
[Disable the GUI for headless running. Disables QtDBus and the GeoIP Database.])],
|
|
||||||
[],
|
|
||||||
[enable_gui=yes])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(systemd,
|
|
||||||
[AS_HELP_STRING([--enable-systemd],
|
|
||||||
[Install the systemd service file (headless only).])],
|
|
||||||
[],
|
|
||||||
[enable_systemd=no])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(webui,
|
|
||||||
[AS_HELP_STRING([--disable-webui],
|
|
||||||
[Disable the WebUI.])],
|
|
||||||
[],
|
|
||||||
[enable_webui=yes])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(qt-dbus,
|
|
||||||
[AS_HELP_STRING([--disable-qt-dbus],
|
|
||||||
[Disable use of QtDBus (GUI only)])],
|
|
||||||
[],
|
|
||||||
[enable_qt_dbus=yes])
|
|
||||||
|
|
||||||
# Detect OS
|
|
||||||
AC_MSG_CHECKING([whether OS is FreeBSD])
|
|
||||||
AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
LIBS="-lexecinfo $LIBS"],
|
|
||||||
[AC_MSG_RESULT([no])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether OS is macOS])
|
|
||||||
AS_IF([expr "$host_os" : ".*darwin.*" > /dev/null],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
enable_qt_dbus=no],
|
|
||||||
[AC_MSG_RESULT([no])])
|
|
||||||
|
|
||||||
# Require 0.23 pkg-config
|
|
||||||
PKG_PROG_PKG_CONFIG([0.23])
|
|
||||||
AS_IF([test "x$PKG_CONFIG" = "x"],
|
|
||||||
[AC_MSG_ERROR([Could not find pkg-config])])
|
|
||||||
|
|
||||||
# Check which arguments were set and act accordingly
|
|
||||||
AC_MSG_CHECKING([whether to enable the Debug build])
|
|
||||||
AS_CASE(["x$enable_debug"],
|
|
||||||
["xno"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG release"
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG debug"],
|
|
||||||
["xyes"],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG debug"
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG release"],
|
|
||||||
[AC_MSG_RESULT([$enable_debug])
|
|
||||||
AC_MSG_ERROR([Unknown option "$enable_debug". Use either "yes" or "no".])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable the GUI])
|
|
||||||
AS_CASE(["x$enable_gui"],
|
|
||||||
["xyes"],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
enable_systemd=[no]
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nogui"],
|
|
||||||
["xno"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
enable_qt_dbus=[no]
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG nogui"],
|
|
||||||
[AC_MSG_RESULT([$enable_gui])
|
|
||||||
AC_MSG_ERROR([Unknown option "$enable_gui". Use either "yes" or "no".])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to install the systemd service file])
|
|
||||||
AS_CASE(["x$enable_systemd"],
|
|
||||||
["xyes"],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG systemd"],
|
|
||||||
["xno"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG systemd"],
|
|
||||||
[AC_MSG_RESULT([$enable_systemd])
|
|
||||||
AC_MSG_ERROR([Unknown option "$enable_systemd". Use either "yes" or "no".])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable the WebUI])
|
|
||||||
AS_CASE(["x$enable_webui"],
|
|
||||||
["xyes"],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG nowebui"],
|
|
||||||
["xno"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG nowebui"],
|
|
||||||
[AC_MSG_RESULT([$enable_webui])
|
|
||||||
AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
|
|
||||||
|
|
||||||
FIND_QT5()
|
|
||||||
AC_MSG_CHECKING([whether QtDBus should be enabled])
|
|
||||||
AS_CASE(["x$enable_qt_dbus"],
|
|
||||||
["xyes"],
|
|
||||||
[AC_MSG_RESULT([yes])
|
|
||||||
FIND_QTDBUS()
|
|
||||||
AS_IF([test "x$HAVE_QTDBUS" = "xfalse"],
|
|
||||||
[AC_MSG_ERROR([Could not find QtDBus])],
|
|
||||||
[QBT_ADD_CONFIG="$QBT_ADD_CONFIG dbus"]
|
|
||||||
)],
|
|
||||||
["xno"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG dbus"],
|
|
||||||
[AC_MSG_RESULT([$enable_qt_dbus])
|
|
||||||
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
|
||||||
|
|
||||||
|
|
||||||
AX_BOOST_BASE([1.35])
|
|
||||||
# HAVE_BOOST is set to an empty value when Boost is found. I don't know
|
|
||||||
# how to test for a set vs unset variable.
|
|
||||||
AS_IF([test "x$BOOST_CPPFLAGS" = "x"],
|
|
||||||
[AC_MSG_ERROR([Could not find Boost])],
|
|
||||||
[AC_MSG_NOTICE([Boost CPPFLAGS: $BOOST_CPPFLAGS])
|
|
||||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
|
||||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"])
|
|
||||||
|
|
||||||
AX_BOOST_SYSTEM()
|
|
||||||
# HAVE_BOOST_SYSTEM is set to an empty value when Boost.System is found.
|
|
||||||
# I don't know how to test for a set vs unset variable.
|
|
||||||
AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
|
|
||||||
[AC_MSG_ERROR([Could not find Boost.System])],
|
|
||||||
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
|
|
||||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([which qtsingleapplication to use])
|
|
||||||
AS_CASE(["x$with_qtsingleapplication"],
|
|
||||||
["xshipped"],
|
|
||||||
[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(libtorrent,
|
|
||||||
[libtorrent-rasterbar >= 1.0.6],
|
|
||||||
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
|
||||||
LIBS="$libtorrent_LIBS $LIBS"])
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(zlib,
|
|
||||||
[zlib >= 1.2.5.2],
|
|
||||||
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"
|
|
||||||
LIBS="$zlib_LIBS $LIBS"])
|
|
||||||
|
|
||||||
# These are required because autoconf doesn't expand these **particular**
|
|
||||||
# vars automatically. And qmake cannot autoexpand them.
|
|
||||||
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
|
|
||||||
AX_DEFINE_DIR([EXPAND_BINDIR], [bindir])
|
|
||||||
AX_DEFINE_DIR([EXPAND_DATADIR], [datadir])
|
|
||||||
AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
|
|
||||||
|
|
||||||
# Original extract() function contributed by pmzqla
|
|
||||||
# $*: Strings to parse
|
|
||||||
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
|
|
||||||
extract() {
|
|
||||||
if [[ -z "$*" ]]; then
|
|
||||||
echo "Input string required"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# BSD sed needs an actual newline character in the substitute command
|
|
||||||
new_line='
|
|
||||||
'
|
|
||||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
|
||||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
|
|
||||||
SAVEIFS=$IFS
|
|
||||||
IFS=$(printf "\n\b")
|
|
||||||
for i in $string; do
|
|
||||||
case "$(echo "$i" | cut -c1)" in
|
|
||||||
'') ;;
|
|
||||||
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";;
|
|
||||||
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";;
|
|
||||||
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
IFS=$SAVEIFS
|
|
||||||
}
|
|
||||||
|
|
||||||
extract $CPPFLAGS
|
|
||||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
|
|
||||||
QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS $CXXFLAGS"
|
|
||||||
|
|
||||||
# Substitute the values of these vars in conf.pri.in
|
|
||||||
AC_SUBST(QBT_CONF_INCLUDES)
|
|
||||||
AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
|
|
||||||
AC_SUBST(QBT_ADD_CONFIG)
|
|
||||||
AC_SUBST(QBT_REMOVE_CONFIG)
|
|
||||||
AC_SUBST(QBT_ADD_DEFINES)
|
|
||||||
AC_SUBST(QBT_REMOVE_DEFINES)
|
|
||||||
|
|
||||||
AC_OUTPUT(conf.pri)
|
|
||||||
AS_IF([test "x$enable_systemd" = "xyes"],
|
|
||||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_NOTICE([Running qmake to generate the makefile...])
|
|
||||||
CONFDIR="$( cd "$( dirname "$0" )" && pwd )"
|
|
||||||
|
|
||||||
$QT_QMAKE -r [$CONFDIR]/qbittorrent.pro "QMAKE_LRELEASE=$QMAKE_LRELEASE"
|
|
||||||
|
|
||||||
ret="$?"
|
|
||||||
|
|
||||||
AS_ECHO()
|
|
||||||
AS_IF([test "x$ret" = "x0"],
|
|
||||||
[AC_MSG_NOTICE([Good, your configure finished.])],
|
|
||||||
[AC_MSG_ERROR([Failed running $QT_QMAKE to generate the makefile])])
|
|
||||||
AS_ECHO()
|
|
||||||
|
|
10
dist/CMakeLists.txt
vendored
|
@ -1,10 +0,0 @@
|
||||||
if (APPLE)
|
|
||||||
add_subdirectory(mac)
|
|
||||||
else (APPLE)
|
|
||||||
if (UNIX)
|
|
||||||
add_subdirectory(unix)
|
|
||||||
endif (UNIX)
|
|
||||||
if (WIN32)
|
|
||||||
add_subdirectory(windows)
|
|
||||||
endif (WIN32)
|
|
||||||
endif (APPLE)
|
|
0
dist/mac/CMakeLists.txt
vendored
94
dist/mac/Info.plist
vendored
|
@ -1,94 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDocumentTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeExtensions</key>
|
|
||||||
<array>
|
|
||||||
<string>torrent</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeIconFile</key>
|
|
||||||
<string>qBitTorrentDocument</string>
|
|
||||||
<key>CFBundleTypeName</key>
|
|
||||||
<string>BitTorrent Document</string>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
<key>LSHandlerRank</key>
|
|
||||||
<string>Owner</string>
|
|
||||||
<key>LSItemContentTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>org.bittorrent.torrent</string>
|
|
||||||
</array>
|
|
||||||
<key>LSIsAppleDefaultForType</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>magnet</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>BitTorrent Magnet URL</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>@EXECUTABLE@</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>qbittorrent_mac.icns</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>3.4.0</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>qBit</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>@EXECUTABLE@</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>org.qbittorrent</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>NSHighResolutionCapable</key>
|
|
||||||
<string>True</string>
|
|
||||||
<key>NSAppleScriptEnabled</key>
|
|
||||||
<string>YES</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>Copyright © 2006-2017 The qBittorrent project</string>
|
|
||||||
<key>UTExportedTypeDeclarations</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UTTypeConformsTo</key>
|
|
||||||
<array>
|
|
||||||
<string>public.data</string>
|
|
||||||
<string>public.item</string>
|
|
||||||
<string>com.bittorrent.torrent</string>
|
|
||||||
</array>
|
|
||||||
<key>UTTypeDescription</key>
|
|
||||||
<string>BitTorrent Document</string>
|
|
||||||
<key>UTTypeIconFile</key>
|
|
||||||
<string>qBitTorrentDocument</string>
|
|
||||||
<key>UTTypeIdentifier</key>
|
|
||||||
<string>org.bittorrent.torrent</string>
|
|
||||||
<key>UTTypeReferenceURL</key>
|
|
||||||
<string>http://www.bittorrent.org/beps/bep_0000.html</string>
|
|
||||||
<key>UTTypeTagSpecification</key>
|
|
||||||
<dict>
|
|
||||||
<key>com.apple.ostype</key>
|
|
||||||
<string>TORR</string>
|
|
||||||
<key>public.filename-extension</key>
|
|
||||||
<array>
|
|
||||||
<string>torrent</string>
|
|
||||||
</array>
|
|
||||||
<key>public.mime-type</key>
|
|
||||||
<string>application/x-bittorrent</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
BIN
dist/mac/qBitTorrentDocument.icns
vendored
BIN
dist/mac/qbittorrent_mac.icns
vendored
3
dist/mac/qt.conf
vendored
|
@ -1,3 +0,0 @@
|
||||||
[Paths]
|
|
||||||
Translations = translations
|
|
||||||
Plugins = PlugIns
|
|
BIN
dist/qt-translations/qt_ar.qm
vendored
BIN
dist/qt-translations/qt_bg.qm
vendored
BIN
dist/qt-translations/qt_ca.qm
vendored
BIN
dist/qt-translations/qt_cs.qm
vendored
BIN
dist/qt-translations/qt_da.qm
vendored
BIN
dist/qt-translations/qt_de.qm
vendored
BIN
dist/qt-translations/qt_es.qm
vendored
BIN
dist/qt-translations/qt_eu.qm
vendored
BIN
dist/qt-translations/qt_fa.qm
vendored
BIN
dist/qt-translations/qt_fi.qm
vendored
BIN
dist/qt-translations/qt_fr.qm
vendored
BIN
dist/qt-translations/qt_gl.qm
vendored
BIN
dist/qt-translations/qt_he.qm
vendored
BIN
dist/qt-translations/qt_hu.qm
vendored
BIN
dist/qt-translations/qt_it.qm
vendored
BIN
dist/qt-translations/qt_ja.qm
vendored
BIN
dist/qt-translations/qt_ko.qm
vendored
BIN
dist/qt-translations/qt_lt.qm
vendored
BIN
dist/qt-translations/qt_nl.qm
vendored
BIN
dist/qt-translations/qt_pl.qm
vendored
BIN
dist/qt-translations/qt_pt.qm
vendored
BIN
dist/qt-translations/qt_pt_BR.qm
vendored
BIN
dist/qt-translations/qt_ru.qm
vendored
BIN
dist/qt-translations/qt_sk.qm
vendored
BIN
dist/qt-translations/qt_sl.qm
vendored
BIN
dist/qt-translations/qt_sv.qm
vendored
BIN
dist/qt-translations/qt_tr.qm
vendored
BIN
dist/qt-translations/qt_uk.qm
vendored
BIN
dist/qt-translations/qt_zh_CN.qm
vendored
BIN
dist/qt-translations/qt_zh_TW.qm
vendored
BIN
dist/qt-translations/qtbase_ca.qm
vendored
BIN
dist/qt-translations/qtbase_cs.qm
vendored
BIN
dist/qt-translations/qtbase_de.qm
vendored
BIN
dist/qt-translations/qtbase_fi.qm
vendored
BIN
dist/qt-translations/qtbase_fr.qm
vendored
BIN
dist/qt-translations/qtbase_he.qm
vendored
BIN
dist/qt-translations/qtbase_hu.qm
vendored
BIN
dist/qt-translations/qtbase_it.qm
vendored
BIN
dist/qt-translations/qtbase_ja.qm
vendored
BIN
dist/qt-translations/qtbase_ko.qm
vendored
BIN
dist/qt-translations/qtbase_lv.qm
vendored
BIN
dist/qt-translations/qtbase_pl.qm
vendored
BIN
dist/qt-translations/qtbase_ru.qm
vendored
BIN
dist/qt-translations/qtbase_sk.qm
vendored
BIN
dist/qt-translations/qtbase_uk.qm
vendored
45
dist/unix/CMakeLists.txt
vendored
|
@ -1,45 +0,0 @@
|
||||||
if (SYSTEMD)
|
|
||||||
find_package(Systemd)
|
|
||||||
if (SYSTEMD_FOUND)
|
|
||||||
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
|
|
||||||
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service
|
|
||||||
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
|
|
||||||
COMPONENT data)
|
|
||||||
endif(SYSTEMD_FOUND)
|
|
||||||
endif(SYSTEMD)
|
|
||||||
|
|
||||||
|
|
||||||
if (GUI)
|
|
||||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent.1)
|
|
||||||
else (GUI)
|
|
||||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent-nox.1)
|
|
||||||
endif (GUI)
|
|
||||||
|
|
||||||
install(FILES ${MAN_FILES}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
|
||||||
COMPONENT doc)
|
|
||||||
|
|
||||||
if (GUI)
|
|
||||||
install(DIRECTORY menuicons/
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
|
|
||||||
FILES_MATCHING PATTERN "*.png")
|
|
||||||
|
|
||||||
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.png
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps/
|
|
||||||
COMPONENT data)
|
|
||||||
|
|
||||||
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.desktop
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
|
|
||||||
COMPONENT data)
|
|
||||||
|
|
||||||
install(FILES qbittorrent.appdata.xml
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/appdata/
|
|
||||||
COMPONENT data)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg
|
|
||||||
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg
|
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
|
|
||||||
COMPONENT data)
|
|
||||||
endif()
|
|
BIN
dist/unix/menuicons/128x128/apps/qbittorrent.png
vendored
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
BIN
dist/unix/menuicons/16x16/apps/qbittorrent.png
vendored
Before Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 893 B |
BIN
dist/unix/menuicons/192x192/apps/qbittorrent.png
vendored
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB |
BIN
dist/unix/menuicons/22x22/apps/qbittorrent.png
vendored
Before Width: | Height: | Size: 1.4 KiB |