Introduced a minimal version of RetroShare.

You can enable it in libretroshare.pro and RetroShare.pro by uncomment
CONFIG += minimal

This enables two new defines for stripping all not needed things
- libretroshare: MINIMAL_LIBRS
- GUI:           MINIMAL_RSGUI

and removes not needed files from build (see end of the files libretroshare.pro and RetroShare.pro).

Beware: All data of the stripped services are lost

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3414 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-08-31 20:00:49 +00:00
parent b6b5fa5cd6
commit 8832f7dfc5
10 changed files with 225 additions and 27 deletions

View file

@ -22,15 +22,17 @@
#include <QObject>
#include <QMessageBox>
#include <rshare.h>
#ifndef MINIMAL_RSGUI
#include "gui/MainWindow.h"
#include "gui/PeersDialog.h"
#include "gui/SearchDialog.h"
#include "gui/TransfersDialog.h"
#include "gui/MessagesDialog.h"
#include "gui/SharedFilesDialog.h"
#include "gui/chat/PopupChatDialog.h"
#include "gui/MessengerWindow.h"
#include "gui/NetworkDialog.h"
#include "gui/chat/PopupChatDialog.h"
#endif // MINIMAL_RSGUI
#include "gui/MessengerWindow.h"
#include "gui/StartDialog.h"
#include "gui/GenCertDialog.h"
#include "gui/settings/rsharesettings.h"
@ -159,6 +161,9 @@ int main(int argc, char *argv[])
/* recreate global settings object, now with correct path */
RshareSettings::Create ();
#ifdef MINIMAL_RSGUI
MessengerWindow::showYourself();
#else
MainWindow *w = MainWindow::Create ();
// I'm using a signal to transfer the hashing info to the mainwindow, because Qt schedules signals properly to
@ -207,13 +212,18 @@ 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
rshare.setQuitOnLastWindowClosed(true);
/* dive into the endless loop */
int ti = rshare.exec();
#ifndef MINIMAL_RSGUI
delete w ;
/* cleanup */
PopupChatDialog::cleanupChat();
#endif // MINIMAL_RSGUI
rsicontrol->rsGlobalShutDown();