Skip to content

Commit

Permalink
- Added --disable-gui flag to configure file (adds DISABLE_GUI define)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Dumez committed Dec 15, 2009
1 parent 07ee2a4 commit 0b7ca15
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
21 changes: 21 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -290,6 +298,7 @@ cat >$1/modules.cpp <<EOT
/*
-----BEGIN QCMOD-----
name: Qt >= 4.4
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD-----
*/
class qc_qt4 : public ConfObj
Expand All @@ -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");
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions qcm/geoip-database.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions qcm/libnotify.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions qcm/qt4.qcm
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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");
}
Expand Down

0 comments on commit 0b7ca15

Please sign in to comment.