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