mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
fixed retrotor compilation when removing dht and udp
This commit is contained in:
parent
c00a236004
commit
da5253059a
@ -6,12 +6,16 @@ TEMPLATE = subdirs
|
|||||||
SUBDIRS += openpgpsdk
|
SUBDIRS += openpgpsdk
|
||||||
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
||||||
|
|
||||||
|
retrotor {
|
||||||
|
libretroshare.depends = openpgpsdk
|
||||||
|
} else {
|
||||||
SUBDIRS += libbitdht
|
SUBDIRS += libbitdht
|
||||||
libbitdht.file = libbitdht/src/libbitdht.pro
|
libbitdht.file = libbitdht/src/libbitdht.pro
|
||||||
|
libretroshare.depends = openpgpsdk libbitdht
|
||||||
|
}
|
||||||
|
|
||||||
SUBDIRS += libretroshare
|
SUBDIRS += libretroshare
|
||||||
libretroshare.file = libretroshare/src/libretroshare.pro
|
libretroshare.file = libretroshare/src/libretroshare.pro
|
||||||
libretroshare.depends = openpgpsdk libbitdht
|
|
||||||
|
|
||||||
SUBDIRS += libresapi
|
SUBDIRS += libresapi
|
||||||
libresapi.file = libresapi/src/libresapi.pro
|
libresapi.file = libresapi/src/libresapi.pro
|
||||||
@ -24,12 +28,15 @@ retroshare_gui {
|
|||||||
retroshare_gui.target = retroshare_gui
|
retroshare_gui.target = retroshare_gui
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retrotor {
|
||||||
|
} else {
|
||||||
retroshare_nogui {
|
retroshare_nogui {
|
||||||
SUBDIRS += retroshare_nogui
|
SUBDIRS += retroshare_nogui
|
||||||
retroshare_nogui.file = retroshare-nogui/src/retroshare-nogui.pro
|
retroshare_nogui.file = retroshare-nogui/src/retroshare-nogui.pro
|
||||||
retroshare_nogui.depends = libretroshare libresapi
|
retroshare_nogui.depends = libretroshare libresapi
|
||||||
retroshare_nogui.target = retroshare_nogui
|
retroshare_nogui.target = retroshare_nogui
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
retroshare_android_service {
|
retroshare_android_service {
|
||||||
SUBDIRS += retroshare_android_service
|
SUBDIRS += retroshare_android_service
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
||||||
|
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += staticlib bitdht
|
CONFIG += staticlib
|
||||||
CONFIG += create_prl
|
CONFIG += create_prl
|
||||||
CONFIG -= qt
|
CONFIG -= qt
|
||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
@ -12,8 +12,12 @@ DESTDIR = lib
|
|||||||
|
|
||||||
retrotor {
|
retrotor {
|
||||||
DEFINES *= RETROTOR
|
DEFINES *= RETROTOR
|
||||||
|
CONFIG -= bitdht
|
||||||
|
} else {
|
||||||
|
CONFIG += bitdht
|
||||||
}
|
}
|
||||||
# the dht stunner is used to obtain RS' external ip addr. when it is natted
|
|
||||||
|
# the dht stunner is used to obtain RS external ip addr. when it is natted
|
||||||
# this system is unreliable and rs supports a newer and better one (asking connected peers)
|
# this system is unreliable and rs supports a newer and better one (asking connected peers)
|
||||||
# CONFIG += useDhtStunner
|
# CONFIG += useDhtStunner
|
||||||
|
|
||||||
@ -93,6 +97,7 @@ HEADERS += tcponudp/udppeer.h \
|
|||||||
tcponudp/tcpstream.h \
|
tcponudp/tcpstream.h \
|
||||||
tcponudp/tou.h \
|
tcponudp/tou.h \
|
||||||
tcponudp/udprelay.h \
|
tcponudp/udprelay.h \
|
||||||
|
pqi/pqissludp.h \
|
||||||
|
|
||||||
SOURCES += tcponudp/udppeer.cc \
|
SOURCES += tcponudp/udppeer.cc \
|
||||||
tcponudp/tcppacket.cc \
|
tcponudp/tcppacket.cc \
|
||||||
@ -100,6 +105,7 @@ SOURCES += tcponudp/udppeer.cc \
|
|||||||
tcponudp/tou.cc \
|
tcponudp/tou.cc \
|
||||||
tcponudp/bss_tou.c \
|
tcponudp/bss_tou.c \
|
||||||
tcponudp/udprelay.cc \
|
tcponudp/udprelay.cc \
|
||||||
|
pqi/pqissludp.cc \
|
||||||
|
|
||||||
useDhtStunner {
|
useDhtStunner {
|
||||||
HEADERS += dht/stunaddrassist.h \
|
HEADERS += dht/stunaddrassist.h \
|
||||||
@ -437,7 +443,6 @@ HEADERS += pqi/authssl.h \
|
|||||||
pqi/pqissllistener.h \
|
pqi/pqissllistener.h \
|
||||||
pqi/pqisslpersongrp.h \
|
pqi/pqisslpersongrp.h \
|
||||||
pqi/pqissli2pbob.h \
|
pqi/pqissli2pbob.h \
|
||||||
pqi/pqissludp.h \
|
|
||||||
pqi/pqisslproxy.h \
|
pqi/pqisslproxy.h \
|
||||||
pqi/pqistore.h \
|
pqi/pqistore.h \
|
||||||
pqi/pqistreamer.h \
|
pqi/pqistreamer.h \
|
||||||
@ -593,7 +598,6 @@ SOURCES += pqi/authgpg.cc \
|
|||||||
pqi/pqissllistener.cc \
|
pqi/pqissllistener.cc \
|
||||||
pqi/pqisslpersongrp.cc \
|
pqi/pqisslpersongrp.cc \
|
||||||
pqi/pqissli2pbob.cpp \
|
pqi/pqissli2pbob.cpp \
|
||||||
pqi/pqissludp.cc \
|
|
||||||
pqi/pqisslproxy.cc \
|
pqi/pqisslproxy.cc \
|
||||||
pqi/pqistore.cc \
|
pqi/pqistore.cc \
|
||||||
pqi/pqistreamer.cc \
|
pqi/pqistreamer.cc \
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
#include "pqi/pqinetstatebox.h"
|
#include "pqi/pqinetstatebox.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
#include "bitdht/bdiface.h"
|
#include "bitdht/bdiface.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// External Interface.
|
// External Interface.
|
||||||
|
|
||||||
|
@ -36,6 +36,9 @@ static struct RsLog::logInfo pqipersongrpzoneInfo = {RsLog::Default, "pqipersong
|
|||||||
/****
|
/****
|
||||||
* #define PQI_DISABLE_UDP 1
|
* #define PQI_DISABLE_UDP 1
|
||||||
***/
|
***/
|
||||||
|
#ifdef RETROTOR
|
||||||
|
#define PQI_DISABLE_UDP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/********************************** SSL Specific features ***************************/
|
/********************************** SSL Specific features ***************************/
|
||||||
|
|
||||||
|
@ -65,6 +65,11 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// This needs to be defined here, because when USE_BITDHT is unset, the variable, that is defined in libbitdht (not compiled!) will be missing.
|
||||||
|
#ifndef RS_USE_BITDHT
|
||||||
|
RsDht *rsDht = NULL ;
|
||||||
|
#endif
|
||||||
|
|
||||||
// for blocking signals
|
// for blocking signals
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
@ -825,9 +830,10 @@ RsGRouter *rsGRouter = NULL ;
|
|||||||
#include "pqi/p3linkmgr.h"
|
#include "pqi/p3linkmgr.h"
|
||||||
#include "pqi/p3netmgr.h"
|
#include "pqi/p3netmgr.h"
|
||||||
|
|
||||||
|
#ifndef RETROTOR
|
||||||
#include "tcponudp/tou.h"
|
#include "tcponudp/tou.h"
|
||||||
#include "tcponudp/rsudpstack.h"
|
#include "tcponudp/rsudpstack.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef RS_USE_BITDHT
|
#ifdef RS_USE_BITDHT
|
||||||
@ -1155,9 +1161,9 @@ int RsServer::StartupRetroShare()
|
|||||||
#ifdef RS_USE_DHT_STUNNER
|
#ifdef RS_USE_DHT_STUNNER
|
||||||
mNetMgr->setAddrAssist(new stunAddrAssist(mDhtStunner), new stunAddrAssist(mProxyStunner));
|
mNetMgr->setAddrAssist(new stunAddrAssist(mDhtStunner), new stunAddrAssist(mProxyStunner));
|
||||||
#endif // RS_USE_DHT_STUNNER
|
#endif // RS_USE_DHT_STUNNER
|
||||||
#else //RS_USE_BITDHT
|
// #else //RS_USE_BITDHT
|
||||||
/* install NULL Pointer for rsDht Interface */
|
// /* install NULL Pointer for rsDht Interface */
|
||||||
rsDht = NULL;
|
// rsDht = NULL;
|
||||||
#endif //RS_USE_BITDHT
|
#endif //RS_USE_BITDHT
|
||||||
|
|
||||||
|
|
||||||
@ -1474,7 +1480,11 @@ int RsServer::StartupRetroShare()
|
|||||||
interfaces.mMsgs = rsMsgs;
|
interfaces.mMsgs = rsMsgs;
|
||||||
interfaces.mTurtle = rsTurtle;
|
interfaces.mTurtle = rsTurtle;
|
||||||
interfaces.mDisc = rsDisc;
|
interfaces.mDisc = rsDisc;
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
interfaces.mDht = rsDht;
|
interfaces.mDht = rsDht;
|
||||||
|
#else
|
||||||
|
interfaces.mDht = NULL;
|
||||||
|
#endif
|
||||||
interfaces.mNotify = mNotify;
|
interfaces.mNotify = mNotify;
|
||||||
interfaces.mServiceControl = serviceCtrl;
|
interfaces.mServiceControl = serviceCtrl;
|
||||||
interfaces.mPluginHandler = mPluginsManager;
|
interfaces.mPluginHandler = mPluginsManager;
|
||||||
@ -1511,7 +1521,9 @@ int RsServer::StartupRetroShare()
|
|||||||
p3BanList *mBanList = new p3BanList(serviceCtrl, mNetMgr);
|
p3BanList *mBanList = new p3BanList(serviceCtrl, mNetMgr);
|
||||||
rsBanList = mBanList ;
|
rsBanList = mBanList ;
|
||||||
pqih -> addService(mBanList, true);
|
pqih -> addService(mBanList, true);
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
mBitDht->setupPeerSharer(mBanList);
|
mBitDht->setupPeerSharer(mBanList);
|
||||||
|
#endif
|
||||||
|
|
||||||
p3BandwidthControl *mBwCtrl = new p3BandwidthControl(pqih);
|
p3BandwidthControl *mBwCtrl = new p3BandwidthControl(pqih);
|
||||||
pqih -> addService(mBwCtrl, true);
|
pqih -> addService(mBwCtrl, true);
|
||||||
|
@ -484,6 +484,7 @@ void ConnectProgressDialog::updateLookupStatus()
|
|||||||
|
|
||||||
ui->LookupProgressBar->setValue(calcProgress(now, mLookupTS, CONNECT_LOOKUP_TYPICAL, CONNECT_LOOKUP_SLOW, CONNECT_LOOKUP_PERIOD));
|
ui->LookupProgressBar->setValue(calcProgress(now, mLookupTS, CONNECT_LOOKUP_TYPICAL, CONNECT_LOOKUP_SLOW, CONNECT_LOOKUP_PERIOD));
|
||||||
|
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
/* now actually look at the DHT Details */
|
/* now actually look at the DHT Details */
|
||||||
RsDhtNetPeer status;
|
RsDhtNetPeer status;
|
||||||
rsDht->getNetPeerStatus(mId, status);
|
rsDht->getNetPeerStatus(mId, status);
|
||||||
@ -520,6 +521,7 @@ void ConnectProgressDialog::updateLookupStatus()
|
|||||||
mLookupStatus = CONNECT_LOOKUP_ONLINE;
|
mLookupStatus = CONNECT_LOOKUP_ONLINE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -572,6 +574,7 @@ void ConnectProgressDialog::updateUdpStatus()
|
|||||||
|
|
||||||
ui->UdpProgressBar->setValue(calcProgress(now, mUdpTS, CONNECT_UDP_TYPICAL, CONNECT_UDP_SLOW, CONNECT_UDP_PERIOD));
|
ui->UdpProgressBar->setValue(calcProgress(now, mUdpTS, CONNECT_UDP_TYPICAL, CONNECT_UDP_SLOW, CONNECT_UDP_PERIOD));
|
||||||
|
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
/* now lookup details from Dht */
|
/* now lookup details from Dht */
|
||||||
RsDhtNetPeer status;
|
RsDhtNetPeer status;
|
||||||
rsDht->getNetPeerStatus(mId, status);
|
rsDht->getNetPeerStatus(mId, status);
|
||||||
@ -599,6 +602,7 @@ void ConnectProgressDialog::updateUdpStatus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,6 +279,7 @@ void DhtWindow::updateNetStatus()
|
|||||||
|
|
||||||
void DhtWindow::updateNetPeers()
|
void DhtWindow::updateNetPeers()
|
||||||
{
|
{
|
||||||
|
#ifdef RS_USE_BITDHT
|
||||||
//QTreeWidget *peerTreeWidget = ui.peerTreeWidget;
|
//QTreeWidget *peerTreeWidget = ui.peerTreeWidget;
|
||||||
|
|
||||||
std::list<RsPeerId> peerIds;
|
std::list<RsPeerId> peerIds;
|
||||||
@ -364,7 +365,6 @@ void DhtWindow::updateNetPeers()
|
|||||||
QHeaderView * _header = ui.peerTreeWidget->header () ;
|
QHeaderView * _header = ui.peerTreeWidget->header () ;
|
||||||
_header->resizeSection ( PTW_COL_RSNAME, 170 );
|
_header->resizeSection ( PTW_COL_RSNAME, 170 );
|
||||||
|
|
||||||
|
|
||||||
/* update the data */
|
/* update the data */
|
||||||
RsDhtNetPeer status;
|
RsDhtNetPeer status;
|
||||||
rsDht->getNetPeerStatus(*it, status);
|
rsDht->getNetPeerStatus(*it, status);
|
||||||
@ -518,6 +518,7 @@ void DhtWindow::updateNetPeers()
|
|||||||
|
|
||||||
|
|
||||||
//peerSummaryLabel->setText(connstr);
|
//peerSummaryLabel->setText(connstr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,9 +3,8 @@
|
|||||||
CONFIG *= retroshare_gui
|
CONFIG *= retroshare_gui
|
||||||
no_retroshare_gui:CONFIG -= retroshare_gui
|
no_retroshare_gui:CONFIG -= retroshare_gui
|
||||||
|
|
||||||
# To build the RetroTor executable, just include the following option
|
# To build the RetroTor executable, just uncomment the following option
|
||||||
|
# CONFIG *= retrotor
|
||||||
CONFIG *= retrotor
|
|
||||||
|
|
||||||
# To disable RetroShare-nogui append the following
|
# To disable RetroShare-nogui append the following
|
||||||
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
# assignation to qmake command line "CONFIG+=no_retroshare_nogui"
|
||||||
|
Loading…
Reference in New Issue
Block a user