Browse Source

- Added --disable-gui flag to configure file (adds DISABLE_GUI define)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
0b7ca15c4f
  1. 21
      configure
  2. 4
      qcm/geoip-database.qcm
  3. 4
      qcm/libnotify.qcm
  4. 4
      qcm/qt4.qcm

21
configure vendored

@ -18,6 +18,8 @@ Main options:
--help This help text. --help This help text.
Dependency options: Dependency options:
--disable-gui Disable qBittorrent Graphical user
interface for headless running
--with-libboost-inc=[path] Path to libboost include files --with-libboost-inc=[path] Path to libboost include 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
@ -140,6 +142,11 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--disable-gui)
QC_DISABLE_GUI="Y"
shift
;;
--with-libboost-inc=*) --with-libboost-inc=*)
QC_WITH_LIBBOOST_INC=$optarg QC_WITH_LIBBOOST_INC=$optarg
shift shift
@ -181,6 +188,7 @@ echo PREFIX=$PREFIX
echo BINDIR=$BINDIR echo BINDIR=$BINDIR
echo DATADIR=$DATADIR echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR echo EX_QTDIR=$EX_QTDIR
echo QC_DISABLE_GUI=$QC_DISABLE_GUI
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
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
@ -290,6 +298,7 @@ cat >$1/modules.cpp <<EOT
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
name: Qt >= 4.4 name: Qt >= 4.4
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD----- -----END QCMOD-----
*/ */
class qc_qt4 : public ConfObj class qc_qt4 : public ConfObj
@ -300,6 +309,9 @@ public:
QString shortname() const { return "Qt 4.4"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addDefine("DISABLE_GUI");
}
if(QT_VERSION >= 0x040500) { if(QT_VERSION >= 0x040500) {
conf->addDefine("QT_4_5"); conf->addDefine("QT_4_5");
} }
@ -410,6 +422,10 @@ public:
QString name() const { return "libnotify >= 0.4.2 (optional)"; } QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; } QString shortname() const { return "libnotify"; }
bool exec(){ bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
QStringList incs; QStringList incs;
QString req_ver = "0.4.2"; QString req_ver = "0.4.2";
QString version, libs, other; QString version, libs, other;
@ -453,6 +469,10 @@ public:
QString name() const { return "GeoIP Database (optional)"; } QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; } QString shortname() const { return "GeoIP Database"; }
bool exec() { bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
#ifdef Q_WS_X11 #ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) { if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
#endif #endif
@ -1431,6 +1451,7 @@ export PREFIX
export BINDIR export BINDIR
export DATADIR export DATADIR
export EX_QTDIR export EX_QTDIR
export QC_DISABLE_GUI
export QC_WITH_LIBBOOST_INC export QC_WITH_LIBBOOST_INC
export QC_DISABLE_libnotify export QC_DISABLE_libnotify
export QC_DISABLE_geoip_database export QC_DISABLE_geoip_database

4
qcm/geoip-database.qcm

@ -12,6 +12,10 @@ public:
QString name() const { return "GeoIP Database (optional)"; } QString name() const { return "GeoIP Database (optional)"; }
QString shortname() const { return "GeoIP Database"; } QString shortname() const { return "GeoIP Database"; }
bool exec() { bool exec() {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
#ifdef Q_WS_X11 #ifdef Q_WS_X11
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) { if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
#endif #endif

4
qcm/libnotify.qcm

@ -11,6 +11,10 @@ public:
QString name() const { return "libnotify >= 0.4.2 (optional)"; } QString name() const { return "libnotify >= 0.4.2 (optional)"; }
QString shortname() const { return "libnotify"; } QString shortname() const { return "libnotify"; }
bool exec(){ bool exec(){
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
printf("\nNot Required");
return true;
}
QStringList incs; QStringList incs;
QString req_ver = "0.4.2"; QString req_ver = "0.4.2";
QString version, libs, other; QString version, libs, other;

4
qcm/qt4.qcm

@ -1,6 +1,7 @@
/* /*
-----BEGIN QCMOD----- -----BEGIN QCMOD-----
name: Qt >= 4.4 name: Qt >= 4.4
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD----- -----END QCMOD-----
*/ */
class qc_qt4 : public ConfObj class qc_qt4 : public ConfObj
@ -11,6 +12,9 @@ public:
QString shortname() const { return "Qt 4.4"; } QString shortname() const { return "Qt 4.4"; }
bool exec() bool exec()
{ {
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addDefine("DISABLE_GUI");
}
if(QT_VERSION >= 0x040500) { if(QT_VERSION >= 0x040500) {
conf->addDefine("QT_4_5"); conf->addDefine("QT_4_5");
} }

Loading…
Cancel
Save