Skip to content

Commit

Permalink
- FEATURE: Dropped dependency on libcurl (Using Qt >= 4.4 for downloa…
Browse files Browse the repository at this point in the history
…ds now)

- FEATURE: Dropped Qt 4.3 support (Qt >= 4.4 is required)
  • Loading branch information
Christophe Dumez committed Nov 4, 2009
1 parent 66590bf commit bc30874
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 459 deletions.
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- FEATURE: Tracker connections are now also subject to IP filtering
- FEATURE: Include DHT traffic in the rate limiter
- FEATURE: Support for bitcomet padding files
- FEATURE: Dropped dependency on libcurl
- FEATURE: Dropped Qt 4.3 support (Qt >= 4.4 is required)

* Thu Sep 3 2009 - Christophe Dumez <[email protected]> - v1.5.0
- FEATURE: Added Magnet URI support
Expand Down
14 changes: 1 addition & 13 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
qBittorrent - A BitTorrent client in C++ / Qt4
------------------------------------------

*** Necessary if qt3 is default on your system ***
export QTDIR=/usr/include/qt4
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
*** End ***

./configure
make && make install
qbittorrent

will install and execute qBittorrent hopefully without any problems.

Dependencies:
- Qt >= 4.3.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
Qt >= 4.4.0 is advised
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)

- libtorrent-rasterbar by Arvid Norberg (>= v0.15.0 REQUIRED)
-> http:https://www.qbittorrent.org/download.php (advised)
Expand All @@ -24,13 +17,8 @@ Dependencies:

- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization

- libcurl

- python >= 2.3 (needed by search engine)

- libmagick++ (advised, not required)
* Needed for favicons support (RSS / Search plugins)

- libzzip (advised, not required)
* Needed for zip support (Search plugins)

Expand Down
90 changes: 3 additions & 87 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Main options:
Dependency options:
--with-libboost-inc=[path] Path to libboost include files
--with-libcurl-inc=[path] Path to libcurl include files
--with-libcurl-lib=[path] Path to libcurl library files
--disable-libzzip Disable use of libzzip
--with-libzzip-inc=[path] Path to libzzip++ include files
--with-libzzip-lib=[path] Path to libzzip++ library files
Expand Down Expand Up @@ -145,16 +143,6 @@ while [ $# -gt 0 ]; do
shift
;;

--with-libcurl-inc=*)
QC_WITH_LIBCURL_INC=$optarg
shift
;;

--with-libcurl-lib=*)
QC_WITH_LIBCURL_LIB=$optarg
shift
;;

--disable-libzzip)
QC_DISABLE_libzzip="Y"
shift
Expand Down Expand Up @@ -192,8 +180,6 @@ echo BINDIR=$BINDIR
echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
echo QC_DISABLE_libzzip=$QC_DISABLE_libzzip
echo QC_WITH_LIBZZIP_INC=$QC_WITH_LIBZZIP_INC
echo QC_WITH_LIBZZIP_LIB=$QC_WITH_LIBZZIP_LIB
Expand Down Expand Up @@ -308,14 +294,11 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.3"; }
QString shortname() const { return "Qt 4.3"; }
QString name() const { return "Qt >= 4.4"; }
QString shortname() const { return "Qt 4.4"; }
bool exec()
{
if(QT_VERSION >= 0x040400) {
conf->addDefine("QT_4_4");
}
return(QT_VERSION >= 0x040300);
return(QT_VERSION >= 0x040400);
}
};
Expand Down Expand Up @@ -403,68 +386,6 @@ public:
return true;
}
};
#line 1 "libcurl.qcm"
/*
-----BEGIN QCMOD-----
name: libcommoncpp2
arg: with-libcurl-inc=[path], Path to libcurl include files
arg: with-libcurl-lib=[path], Path to libcurl library files
-----END QCMOD-----
*/
class qc_libcurl : public ConfObj
{
public:
qc_libcurl(Conf *c) : ConfObj(c) {}
QString name() const { return "libcurl"; }
QString shortname() const { return "libcurl"; }
bool exec(){
QString s;
s = conf->getenv("QC_WITH_LIBCURL_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "curl/curl.h")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach(s, sl){
if(conf->checkHeader(s, "curl/curl.h")){
found = true;
break;
}
}
if(!found) {
return false;
}
}
conf->addIncludePath(s);
s = conf->getenv("QC_WITH_LIBCURL_LIB");
if(!s.isEmpty()) {
if(!QFile::exists(s+QString("/libcurl.so")))
return false;
conf->addLib(QString("-L") + s);
}else{
QStringList sl;
sl << "/usr/lib/";
sl << "/usr/lib64/";
sl << "/usr/local/lib/";
sl << "/usr/local/lib64/";
bool found = false;
foreach(s, sl){
if(QFile::exists(s+QString("libcurl.so"))){
found = true;
break;
}
}
if(!found) return false;
conf->addLib(QString("-L") + s);
}
return true;
}
};
#line 1 "libzzip.qcm"
/*
-----BEGIN QCMOD-----
Expand Down Expand Up @@ -549,9 +470,6 @@ cat >$1/modules_new.cpp <<EOT
o = new qc_libboost(conf);
o->required = true;
o->disabled = false;
o = new qc_libcurl(conf);
o->required = true;
o->disabled = false;
o = new qc_libzzip(conf);
o->required = false;
o->disabled = false;
Expand Down Expand Up @@ -1501,8 +1419,6 @@ export BINDIR
export DATADIR
export EX_QTDIR
export QC_WITH_LIBBOOST_INC
export QC_WITH_LIBCURL_INC
export QC_WITH_LIBCURL_LIB
export QC_DISABLE_libzzip
export QC_WITH_LIBZZIP_INC
export QC_WITH_LIBZZIP_LIB
Expand Down
3 changes: 0 additions & 3 deletions qbittorrent.qc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@
<dep type='libboost'>
<required/>
</dep>
<dep type='libcurl'>
<required/>
</dep>
<dep type='libzzip'/>
</qconf>
61 changes: 0 additions & 61 deletions qcm/libcurl.qcm

This file was deleted.

9 changes: 3 additions & 6 deletions qcm/qt4.qcm
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.3"; }
QString shortname() const { return "Qt 4.3"; }
QString name() const { return "Qt >= 4.4"; }
QString shortname() const { return "Qt 4.4"; }
bool exec()
{
if(QT_VERSION >= 0x040400) {
conf->addDefine("QT_4_4");
}
return(QT_VERSION >= 0x040300);
return(QT_VERSION >= 0x040400);

}
};
16 changes: 0 additions & 16 deletions src/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,10 @@
#include <QStatusBar>
#include <QFrame>
#include <QClipboard>
#ifdef QT_4_4
#include <QLocalServer>
#include <QLocalSocket>
#include <unistd.h>
#include <sys/types.h>
#else
#include <QTcpServer>
#include <QTcpSocket>
#endif
#include <stdlib.h>
#include <QCloseEvent>
#include <QShortcut>
Expand Down Expand Up @@ -189,7 +184,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
initWebUi(username, password, port);
}
// Use a tcp server to allow only one instance of qBittorrent
#ifdef QT_4_4
localServer = new QLocalServer();
QString uid = QString::number(getuid());
#ifdef Q_WS_X11
Expand All @@ -200,18 +194,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
}
#endif
if (!localServer->listen("qBittorrent-"+uid)) {
#else
localServer = new QTcpServer();
if (!localServer->listen(QHostAddress::LocalHost)) {
#endif
std::cerr << "Couldn't create socket, single instance mode won't work...\n";
}
#ifndef QT_4_4
else {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.setValue(QString::fromUtf8("uniqueInstancePort"), localServer->serverPort());
}
#endif
connect(localServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
// Start connection checking timer
checkConnect = new QTimer(this);
Expand Down
14 changes: 2 additions & 12 deletions src/GUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ class DownloadingTorrents;
class FinishedTorrents;
class downloadFromURL;
class SearchEngine;
#ifdef QT_4_4
class QLocalServer;
class QLocalSocket;
#else
class QTcpServer;
class QTcpSocket;
#endif
class QLocalServer;
class QLocalSocket;
class QCloseEvent;
class RSSImp;
class QShortcut;
Expand Down Expand Up @@ -109,13 +104,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
// Web UI
QPointer<HttpServer> httpServer;
// Misc
#ifdef QT_4_4
QLocalServer *localServer;
QLocalSocket *clientConnection;
#else
QTcpServer *localServer;
QTcpSocket *clientConnection;
#endif

protected slots:
// GUI related slots
Expand Down
Loading

0 comments on commit bc30874

Please sign in to comment.