Removed minimal version.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5113 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-04-20 15:17:52 +00:00
parent a6dfac2a37
commit 10400faf4c
13 changed files with 1 additions and 192 deletions

View File

@ -8,16 +8,9 @@ TARGET = retroshare
CONFIG += test_voip
# Beware: All data of the stripped services are lost
#CONFIG += minimal
DEFINES *= PQI_DISABLE_TUNNEL
#ENABLE_CACHE_OPT
minimal {
CONFIG -= use_blogs
DEFINES += MINIMAL_LIBRS
}
profiling {
QMAKE_CXXFLAGS -= -fomit-frame-pointer
QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer
@ -630,26 +623,6 @@ SOURCES += util/folderiterator.cc \
util/pgpkey.cc \
util/pugixml.cc
minimal {
SOURCES -= rsserver/p3msgs.cc \
rsserver/p3status.cc \
rsserver/p3photo.cc
SOURCES -= serialiser/rsforumitems.cc \
serialiser/rsstatusitems.cc \
serialiser/rschannelitems.cc \
serialiser/rsgameitems.cc \
serialiser/rsphotoitems.cc
SOURCES -= services/p3forums.cc \
services/p3msgservice.cc \
services/p3statusservice.cc \
services/p3channels.cc \
services/p3gamelauncher.cc \
services/p3photoservice.cc
}
zeroconf {
HEADERS += zeroconf/p3zeroconf.h \

View File

@ -183,14 +183,12 @@ void RsServer::rsGlobalShutDown()
ftserver->StopThreads();
// stop the p3distrib threads
#ifndef MINIMAL_LIBRS
mForums->join();
mChannels->join();
#ifdef RS_USE_BLOGS
mBlogs->join();
#endif
#endif // MINIMAL_LIBRS
AuthGPGExit();
}

View File

@ -2175,11 +2175,9 @@ int RsServer::StartupRetroShare()
/* create Services */
ad = new p3disc(mPeerMgr, mLinkMgr, mNetMgr, pqih);
#ifndef MINIMAL_LIBRS
msgSrv = new p3MsgService(mLinkMgr);
chatSrv = new p3ChatService(mLinkMgr, mHistoryMgr);
mStatusSrv = new p3StatusService(mLinkMgr);
#endif // MINIMAL_LIBRS
#ifndef PQI_DISABLE_TUNNEL
p3tunnel *tn = new p3tunnel(mConnMgr, pqih);
@ -2193,14 +2191,10 @@ int RsServer::StartupRetroShare()
ftserver->connectToTurtleRouter(tr) ;
pqih -> addService(ad);
#ifndef MINIMAL_LIBRS
pqih -> addService(msgSrv);
pqih -> addService(chatSrv);
pqih ->addService(mStatusSrv);
#endif // MINIMAL_LIBRS
#ifndef MINIMAL_LIBRS
mForums = new p3Forums(RS_SERVICE_TYPE_FORUM, mCacheStrapper, mCacheTransfer, localcachedir, remotecachedir, forumdir);
mCacheStrapper -> addCachePair( CachePair(mForums, mForums, CacheId(RS_SERVICE_TYPE_FORUM, 0)));
@ -2254,8 +2248,6 @@ int RsServer::StartupRetroShare()
mDsdv->addTestService();
#endif
#endif // MINIMAL_LIBRS
/**************************************************************************/
#ifdef RS_USE_BITDHT
@ -2288,11 +2280,9 @@ int RsServer::StartupRetroShare()
mLinkMgr->addMonitor(pqih);
mLinkMgr->addMonitor(mCacheStrapper);
mLinkMgr->addMonitor(ad);
#ifndef MINIMAL_LIBRS
mLinkMgr->addMonitor(msgSrv);
mLinkMgr->addMonitor(mStatusSrv);
mLinkMgr->addMonitor(chatSrv);
#endif // MINIMAL_LIBRS
/* must also add the controller as a Monitor...
* a little hack to get it to work.
@ -2310,7 +2300,6 @@ int RsServer::StartupRetroShare()
mConfigMgr->addConfiguration("peers.cfg", mPeerMgr);
mConfigMgr->addConfiguration("general.cfg", mGeneralConfig);
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
#ifndef MINIMAL_LIBRS
mConfigMgr->addConfiguration("msgs.cfg", msgSrv);
mConfigMgr->addConfiguration("chat.cfg", chatSrv);
mConfigMgr->addConfiguration("p3History.cfg", mHistoryMgr);
@ -2320,7 +2309,6 @@ int RsServer::StartupRetroShare()
mConfigMgr->addConfiguration("forums.cfg", mForums);
mConfigMgr->addConfiguration("channels.cfg", mChannels);
mConfigMgr->addConfiguration("p3Status.cfg", mStatusSrv);
#endif // MINIMAL_LIBRS
mConfigMgr->addConfiguration("turtle.cfg", tr);
mConfigMgr->addConfiguration("p3disc.cfg", ad);
@ -2429,16 +2417,13 @@ int RsServer::StartupRetroShare()
//getPqiNotify()->ClearFeedItems(RS_FEED_ITEM_FILES_NEW);
/* flag that the basic Caches are now in the pending Queues */
#ifndef MINIMAL_LIBRS
mForums->HistoricalCachesDone();
mChannels->HistoricalCachesDone();
#ifdef RS_USE_BLOGS
mBlogs->HistoricalCachesDone();
#endif
#endif // MINIMAL_LIBRS
/**************************************************************************/
/* Add AuthGPG services */
/**************************************************************************/
@ -2462,14 +2447,12 @@ int RsServer::StartupRetroShare()
#endif
// startup the p3distrib threads (for cache loading).
#ifndef MINIMAL_LIBRS
mForums->start();
mChannels->start();
#ifdef RS_USE_BLOGS
mBlogs->start();
#endif
#endif // MINIMAL_LIBRS
/**************************************************************************/
@ -2486,11 +2469,9 @@ int RsServer::StartupRetroShare()
/* Setup GUI Interfaces. */
rsDisc = new p3Discovery(ad);
rsConfig = new p3ServerConfig(mPeerMgr, mLinkMgr, mNetMgr, mGeneralConfig);
#ifndef MINIMAL_LIBRS
rsMsgs = new p3Msgs(msgSrv, chatSrv);
rsForums = mForums;
rsChannels = mChannels;
@ -2507,16 +2488,13 @@ int RsServer::StartupRetroShare()
rsGameLauncher = NULL;
rsPhoto = NULL;
#endif
#endif // MINIMAL_LIBRS
#ifndef MINIMAL_LIBRS
/* put a welcome message in! */
if (RsInitConfig::firsttime_run)
{
msgSrv->loadWelcomeMsg();
ftserver->shareDownloadDirectory(true);
}
#endif // MINIMAL_LIBRS
// load up the help page
std::string helppage = RsInitConfig::basedir + "/";

View File

@ -4,8 +4,6 @@ QT += network xml script
TEMPLATE = app
TARGET = RetroShare
#CONFIG += minimal
DEFINES += RS_RELEASE_VERSION
RCC_DIR = temp/qrc
UI_DIR = temp/ui
@ -16,12 +14,6 @@ debug {
QMAKE_CFLAGS += -g
}
minimal {
CONFIG -= blogs
DEFINES += MINIMAL_RSGUI
}
INCLUDEPATH *= retroshare-gui
# treat warnings as error for better removing
@ -821,69 +813,3 @@ LIBS += -lxine
DEFINES *= CHANNELS_FRAME_CATCHER
}
minimal {
SOURCES = main.cpp \
rshare.cpp \
gui/notifyqt.cpp \
gui/MessengerWindow.cpp \
gui/StartDialog.cpp \
gui/GenCertDialog.cpp \
gui/connect/ConfCertDialog.cpp \
gui/InfoDialog.cpp \
gui/help/browser/helpbrowser.cpp \
gui/help/browser/helptextbrowser.cpp \
gui/settings/rsettings.cpp \
gui/settings/RsharePeerSettings.cpp \
gui/settings/rsharesettings.cpp \
gui/common/rwindow.cpp \
gui/common/StatusDefs.cpp \
gui/common/PeerDefs.cpp \
gui/common/RSTreeWidgetItem.cpp \
gui/LogoBar.cpp \
gui/RsAutoUpdatePage.cpp \
gui/common/vmessagebox.cpp \
gui/common/html.cpp \
util/RetroStyleLabel.cpp \
util/log.cpp \
util/win32.cpp \
util/Widget.cpp \
util/stringutil.cpp \
lang/languagesupport.cpp
FORMS = gui/MessengerWindow.ui \
gui/StartDialog.ui \
gui/GenCertDialog.ui \
gui/connect/ConfCertDialog.ui \
gui/InfoDialog.ui \
gui/help/browser/helpbrowser.ui
HEADERS = rshare.h \
gui/notifyqt.h \
gui/MessengerWindow.h \
gui/StartDialog.h \
gui/GenCertDialog.h \
gui/connect/ConfCertDialog.h \
gui/InfoDialog.h \
gui/help/browser/helpbrowser.h \
gui/help/browser/helptextbrowser.h \
gui/settings/rsettings.h \
gui/settings/rsharesettings.h \
gui/settings/RsharePeerSettings.h \
gui/common/rwindow.h \
gui/common/StatusDefs.h \
gui/common/PeerDefs.h \
gui/common/RSTreeWidgetItem.h \
gui/LogoBar.h \
gui/RsAutoUpdatePage.h \
gui/common/vmessagebox.h \
gui/common/html.h \
util/RetroStyleLabel.h \
util/log.h \
util/win32.h \
util/Widget.h \
util/stringutil.h \
lang/languagesupport.h
}

View File

@ -25,7 +25,6 @@
#include "chat/ChatStyle.h"
#include "retroshare-gui/RsAutoUpdatePage.h"
#ifndef MINIMAL_RSGUI
#include "ui_FriendsDialog.h"
class QFont;
@ -145,6 +144,4 @@ private:
Ui::FriendsDialog ui;
};
#endif // MINIMAL_RSGUI
#endif

View File

@ -36,12 +36,10 @@
#include "MessengerWindow.h"
#include "RsAutoUpdatePage.h"
#ifndef MINIMAL_RSGUI
#include "MainWindow.h"
#include "ShareManager.h"
#include "notifyqt.h"
#include "connect/ConnectFriendWizard.h"
#endif // MINIMAL_RSGUI
#include "util/PixmapMerging.h"
#include "LogoBar.h"
#include "util/Widget.h"
@ -101,26 +99,19 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
ui.setupUi(this);
setAttribute ( Qt::WA_DeleteOnClose, true );
#ifdef MINIMAL_RSGUI
setAttribute (Qt::WA_QuitOnClose, true);
#endif // MINIMAL_RSGUI
ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatar->setOwnId();
#ifndef MINIMAL_RSGUI
connect( ui.shareButton, SIGNAL(clicked()), SLOT(openShareManager()));
connect( ui.addIMAccountButton, SIGNAL(clicked( bool ) ), this , SLOT( addFriend() ) );
#endif // MINIMAL_RSGUI
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
connect(ui.filterLineEdit, SIGNAL(textChanged(QString)), ui.friendList, SLOT(filterItems(QString)));
#ifndef MINIMAL_RSGUI
connect(NotifyQt::getInstance(), SIGNAL(ownAvatarChanged()), this, SLOT(updateAvatar()));
connect(NotifyQt::getInstance(), SIGNAL(ownStatusMessageChanged()), this, SLOT(loadmystatusmessage()));
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(updateOwnStatus(QString,int)));
#endif // MINIMAL_RSGUI
if (expandedPeers != NULL) {
for (std::set<std::string>::iterator peerIt = expandedPeers->begin(); peerIt != expandedPeers->end(); peerIt++) {
@ -163,12 +154,8 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
if (rsPeers->getPeerDetails(ownId, pd)) {
/* calculate only once */
m_nickName = QString::fromUtf8(pd.name.c_str());
#ifdef MINIMAL_RSGUI
ui.statusButton->setText(m_nickName);
#endif
}
#ifndef MINIMAL_RSGUI
/* Show nick and current state */
StatusInfo statusInfo;
rsStatus->getOwnStatus(statusInfo);
@ -182,7 +169,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
}
loadmystatusmessage();
#endif // MINIMAL_RSGUI
/* Hide platform specific features */
#ifdef Q_WS_WIN
@ -194,12 +180,10 @@ MessengerWindow::~MessengerWindow ()
// save settings
processSettings(false);
#ifndef MINIMAL_RSGUI
MainWindow *pMainWindow = MainWindow::getInstance();
if (pMainWindow) {
pMainWindow->removeStatusObject(ui.statusButton);
}
#endif // MINIMAL_RSGUI
_instance = NULL;
}
@ -211,7 +195,6 @@ void MessengerWindow::processSettings(bool bLoad)
Settings->endGroup();
}
#ifndef MINIMAL_RSGUI
/** Add a Friend ShortCut */
void MessengerWindow::addFriend()
{
@ -219,7 +202,6 @@ void MessengerWindow::addFriend()
connwiz.exec ();
}
#endif
//============================================================================
@ -248,7 +230,6 @@ LogoBar & MessengerWindow::getLogoBar() const {
return *_rsLogoBarmessenger;
}
#ifndef MINIMAL_RSGUI
/** Shows Share Manager */
void MessengerWindow::openShareManager()
{
@ -279,5 +260,3 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)
return;
}
}
#endif // MINIMAL_RSGUI

View File

@ -38,9 +38,7 @@ public:
static void releaseInstance();
public slots:
#ifndef MINIMAL_RSGUI
void loadmystatusmessage();
#endif // MINIMAL_RSGUI
LogoBar & getLogoBar() const;
@ -53,7 +51,6 @@ protected:
void closeEvent (QCloseEvent * event);
private slots:
#ifndef MINIMAL_RSGUI
/** Add a new friend */
void addFriend();
@ -63,7 +60,6 @@ private slots:
void updateOwnStatus(const QString &peer_id, int status);
void savestatusmessage();
#endif // MINIMAL_RSGUI
private:
static MessengerWindow *_instance;

View File

@ -40,10 +40,7 @@
#include "gui/RetroShareLink.h"
#include "gui/notifyqt.h"
#include "gui/common/AvatarDefs.h"
#ifndef MINIMAL_RSGUI
#include "gui/MainWindow.h"
#endif // !MINIMAL_RSGUI
static QMap<std::string, ConfCertDialog*> instances;
@ -80,12 +77,10 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
#ifndef MINIMAL_RSGUI
MainWindow *w = MainWindow::getInstance();
if (w) {
connect(this, SIGNAL(configChanged()), w->getPage(MainWindow::Network), SLOT(insertConnect()));
}
#endif // !MINIMAL_RSGUI
}
ConfCertDialog::~ConfCertDialog()

View File

@ -69,20 +69,12 @@ DhtWindow::DhtWindow(QWidget *parent) :
{
ui->setupUi(this);
setAttribute ( Qt::WA_DeleteOnClose, true );
#ifdef MINIMAL_RSGUI
setAttribute (Qt::WA_QuitOnClose, true);
#endif // MINIMAL_RSGUI
// tick for gui update.
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
timer->start(1000);
}
DhtWindow::~DhtWindow()

View File

@ -30,7 +30,6 @@
#include "RsAutoUpdatePage.h"
#ifndef MINIMAL_RSGUI
#include "MainWindow.h"
#include "toaster/OnlineToaster.h"
#include "toaster/MessageToaster.h"
@ -38,7 +37,6 @@
#include "toaster/ChatToaster.h"
#include "toaster/GroupChatToaster.h"
#include "toaster/ChatLobbyToaster.h"
#endif // MINIMAL_RSGUI
#include "chat/ChatDialog.h"
#include "chat/ChatWidget.h"
@ -441,7 +439,6 @@ void NotifyQt::notifyListPreChange(int list, int /*type*/)
void NotifyQt::UpdateGUI()
{
#ifndef MINIMAL_RSGUI
static bool already_updated = false ; // these only update once at start because they may already have been set before
// the gui is running, then they get updated by callbacks.
if(!already_updated)
@ -582,8 +579,6 @@ void NotifyQt::UpdateGUI()
/* Now start the waiting toasters */
startWaitingToasters();
#endif // MINIMAL_RSGUI
}
void NotifyQt::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType)

View File

@ -30,11 +30,7 @@
#include <rshare.h>
#include "rsharesettings.h"
#ifdef MINIMAL_RSGUI
#include <QMainWindow>
#else
#include "gui/MainWindow.h"
#endif // MINIMAL_RSGUI
#include <retroshare/rsnotify.h>
#include <retroshare/rspeers.h>
@ -621,7 +617,6 @@ void RshareSettings::loadWidgetInformation(QMainWindow *widget, QToolBar *toolBa
loadWidgetInformation(widget);
}
#ifndef MINIMAL_RSGUI
/* MainWindow */
int RshareSettings::getLastPageInMainWindow ()
{
@ -656,7 +651,6 @@ void RshareSettings::setStatusBarFlag(uint flag, bool enable)
setStatusBarFlags(flags);
}
#endif // MINIMAL_RSGUI
/* Messages */
bool RshareSettings::getMsgSetToReadOnActivate ()

View File

@ -209,14 +209,12 @@ public:
//! Method overload. Restore window and toolbar information.
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
#ifndef MINIMAL_RSGUI
/* MainWindow */
int getLastPageInMainWindow ();
void setLastPageInMainWindow (int value);
uint getStatusBarFlags();
void setStatusBarFlags(uint flags);
void setStatusBarFlag(uint flag, bool enable);
#endif // MINIMAL_RSGUI
/* Messages */
bool getMsgSetToReadOnActivate ();

View File

@ -23,7 +23,6 @@
#include <QMessageBox>
#include <QSplashScreen>
#include <rshare.h>
#ifndef MINIMAL_RSGUI
#include "gui/MainWindow.h"
#include "gui/FriendsDialog.h"
#include "gui/SearchDialog.h"
@ -33,7 +32,6 @@
#include "gui/NetworkDialog.h"
#include "gui/chat/ChatDialog.h"
#include "gui/QuickStartWizard.h"
#endif // MINIMAL_RSGUI
#include "gui/MessengerWindow.h"
#include "gui/StartDialog.h"
#include "gui/GenCertDialog.h"
@ -234,13 +232,6 @@ int main(int argc, char *argv[])
RsharePeerSettings::Create();
#ifdef MINIMAL_RSGUI
MessengerWindow::showYourself();
rshare.setQuitOnLastWindowClosed(true);
splashScreen.hide();
#else
Emoticons::load();
if (Settings->value(QString::fromUtf8("FirstRun"), true).toBool()) {
@ -330,11 +321,9 @@ int main(int argc, char *argv[])
QTimer *timer = new QTimer(w);
timer -> connect(timer, SIGNAL(timeout()), notify, SLOT(UpdateGUI()));
timer->start(1000);
#endif // MINIMAL_RSGUI
/* dive into the endless loop */
int ti = rshare.exec();
#ifndef MINIMAL_RSGUI
delete w ;
if (eventReceiver) {
@ -345,7 +334,6 @@ int main(int argc, char *argv[])
/* cleanup */
ChatDialog::cleanupChat();
#endif // MINIMAL_RSGUI
rsicontrol->rsGlobalShutDown();