Browse Source

Added --with-qtsingleapplication=[shipped|system] flag to the configure file to comply with Linux distributions that are packaging qtsingleapplication solution.

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
208e988c70
  1. 67
      configure
  2. 2
      qbittorrent.qc
  3. 6
      src/src.pro

67
configure vendored

@ -18,15 +18,24 @@ Main options:
--help This help text. --help This help text.
Dependency options: Dependency options:
--disable-gui Disable qBittorrent Graphical user --disable-gui Disable qBittorrent
interface for headless running Graphical user interface for
--with-libboost-inc=[path] Path to libboost include files headless running
--with-libboost-lib=[path] Path to libboost library files --with-libboost-inc=[path] Path to libboost include
files
--with-libboost-lib=[path] Path to libboost library
files
--disable-libnotify Disable use of libnotify --disable-libnotify Disable use of libnotify
--disable-geoip-database Disable use of geoip-database --disable-geoip-database Disable use of geoip-database
--with-geoip-database-embedded Geoip Database will be embedded in --with-geoip-database-embedded Geoip Database will be
qBittorrent executable (please follow embedded in qBittorrent
instructions in src/geoip/README) executable (please follow
instructions in
src/geoip/README)
--disable-qtsingleapplication Disable use of libboost
--with-qtsingleapplication=[system|shipped] Use the shipped
qtsingleapplication library
or the system one
EOT EOT
} }
@ -173,6 +182,16 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--disable-qtsingleapplication)
QC_DISABLE_qtsingleapplication="Y"
shift
;;
--with-qtsingleapplication=*)
QC_WITH_QTSINGLEAPPLICATION=$optarg
shift
;;
--verbose) --verbose)
QC_VERBOSE="Y" QC_VERBOSE="Y"
shift shift
@ -200,6 +219,8 @@ echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB
echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify
echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database
echo QC_WITH_GEOIP_DATABASE_EMBEDDED=$QC_WITH_GEOIP_DATABASE_EMBEDDED echo QC_WITH_GEOIP_DATABASE_EMBEDDED=$QC_WITH_GEOIP_DATABASE_EMBEDDED
echo QC_DISABLE_qtsingleapplication=$QC_DISABLE_qtsingleapplication
echo QC_WITH_QTSINGLEAPPLICATION=$QC_WITH_QTSINGLEAPPLICATION
echo echo
fi fi
@ -585,6 +606,33 @@ public:
#endif #endif
} }
}; };
#line 1 "qtsingleapplication.qcm"
/*
-----BEGIN QCMOD-----
name: libboost
arg: with-qtsingleapplication=[system|shipped], Use the shipped qtsingleapplication library or the system one
-----END QCMOD-----
*/
class qc_qtsingleapplication : public ConfObj
{
public:
qc_qtsingleapplication(Conf *c) : ConfObj(c) {}
QString name() const { return "qtsingleapplication library"; }
QString shortname() const { return "qtsingleapplication"; }
bool exec(){
QString s;
s = conf->getenv("QC_WITH_QTSINGLEAPPLICATION");
if(s.compare("system", Qt::CaseInsensitive) == 0) {
// System
conf->addDefine("USE_SYSTEM_QTSINGLEAPPLICATION");
printf(" [system] ");
} else {
printf(" [shipped] ");
}
return true;
}
};
EOT EOT
cat >$1/modules_new.cpp <<EOT cat >$1/modules_new.cpp <<EOT
@ -606,6 +654,9 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_geoip_database(conf); o = new qc_geoip_database(conf);
o->required = false; o->required = false;
o->disabled = false; o->disabled = false;
o = new qc_qtsingleapplication(conf);
o->required = false;
o->disabled = false;
EOT EOT
cat >$1/conf4.h <<EOT cat >$1/conf4.h <<EOT
@ -1557,6 +1608,8 @@ export QC_WITH_LIBBOOST_LIB
export QC_DISABLE_libnotify export QC_DISABLE_libnotify
export QC_DISABLE_geoip_database export QC_DISABLE_geoip_database
export QC_WITH_GEOIP_DATABASE_EMBEDDED export QC_WITH_GEOIP_DATABASE_EMBEDDED
export QC_DISABLE_qtsingleapplication
export QC_WITH_QTSINGLEAPPLICATION
export QC_VERBOSE export QC_VERBOSE
rm -rf .qconftemp rm -rf .qconftemp
( (

2
qbittorrent.qc

@ -19,4 +19,6 @@
</dep> </dep>
<dep type='geoip-database'> <dep type='geoip-database'>
</dep> </dep>
<dep type='qtsingleapplication'>
</dep>
</qconf> </qconf>

6
src/src.pro

@ -342,11 +342,17 @@ contains(DEFINES, DISABLE_GUI) {
} }
} }
contains(DEFINES, USE_SYSTEM_QTSINGLEAPPLICATION) {
message("Using the system's qtsingleapplication library")
CONFIG += qtsingleapplication
} else {
message("Using the shipped qtsingleapplication library")
contains(DEFINES, DISABLE_GUI) { contains(DEFINES, DISABLE_GUI) {
include(qtsingleapp/qtsinglecoreapplication.pri) include(qtsingleapp/qtsinglecoreapplication.pri)
} else { } else {
include(qtsingleapp/qtsingleapplication.pri) include(qtsingleapp/qtsingleapplication.pri)
} }
}
!contains(DEFINES, DISABLE_GUI) { !contains(DEFINES, DISABLE_GUI) {
FORMS += ui/mainwindow.ui \ FORMS += ui/mainwindow.ui \

Loading…
Cancel
Save