diff --git a/Changelog b/Changelog index aaea88ca0..f9e6718ae 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,7 @@ - BUGFIX: Fix possible crash when using alternative speed limits (#598272) - BUGFIX: Fix possible crash on exit when using Qt >= 4.6 - BUGFIX: Require GTK+ headers on compilation when libnotify is used + - BUGFIX: Added configure flag to avoid using the shipped qtsingleapplication * Wed Jun 23 2010 - Christophe Dumez - v2.2.10 - BUGFIX: Fix Web UI in qBittorrent nox version diff --git a/configure b/configure index 8f8a4010a..581d12329 100755 --- a/configure +++ b/configure @@ -18,15 +18,24 @@ 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 - --with-libboost-lib=[path] Path to libboost library files - --disable-libnotify Disable use of libnotify - --disable-geoip-database Disable use of geoip-database - --with-geoip-database-embedded Geoip Database will be embedded in - qBittorrent executable (please follow - instructions in src/geoip/README) + --disable-gui Disable qBittorrent + Graphical user interface for + headless running + --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-geoip-database Disable use of geoip-database + --with-geoip-database-embedded Geoip Database will be + embedded in qBittorrent + 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 } @@ -173,6 +182,16 @@ while [ $# -gt 0 ]; do shift ;; + --disable-qtsingleapplication) + QC_DISABLE_qtsingleapplication="Y" + shift + ;; + + --with-qtsingleapplication=*) + QC_WITH_QTSINGLEAPPLICATION=$optarg + shift + ;; + --verbose) QC_VERBOSE="Y" shift @@ -200,6 +219,8 @@ echo QC_WITH_LIBBOOST_LIB=$QC_WITH_LIBBOOST_LIB echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database 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 fi @@ -585,6 +606,33 @@ public: #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 cat >$1/modules_new.cpp <$1/modules_new.cpp <required = false; o->disabled = false; + o = new qc_qtsingleapplication(conf); + o->required = false; + o->disabled = false; EOT cat >$1/conf4.h < + + diff --git a/src/src.pro b/src/src.pro index 0c463f20e..2220431f7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -360,10 +360,16 @@ contains(DEFINES, DISABLE_GUI) { ui/confirmdeletiondlg.ui } -contains(DEFINES, DISABLE_GUI) { - include(qtsingleapp/qtsinglecoreapplication.pri) +contains(DEFINES, USE_SYSTEM_QTSINGLEAPPLICATION) { + message("Using the system's qtsingleapplication library") + CONFIG += qtsingleapplication } else { - include(qtsingleapp/qtsingleapplication.pri) + message("Using the shipped qtsingleapplication library") + contains(DEFINES, DISABLE_GUI) { + include(qtsingleapp/qtsinglecoreapplication.pri) + } else { + include(qtsingleapp/qtsingleapplication.pri) + } } SOURCES += main.cpp \