Revert "now retrieve version for gui directly from lib"

This reverts commit 0aa0d500c001730e05ffecd69cf3068d87138557.

The GUI and LIB could have two different version when compiling, so we
need to keep both version info.

Conflicts:

	retroshare-gui/src/version_detail.sh

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1531 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-08-13 15:11:08 +00:00
parent 0043af68c1
commit eef31ea805
4 changed files with 68 additions and 11 deletions

View File

@ -13,12 +13,20 @@ MOC_DIR = temp/moc
linux-g++ {
OBJECTS_DIR = temp/linux-g++/obj
QMAKE_LFLAGS += -L"../../../../lib/linux-g++"
CONFIG += version_detail_bash_script
}
linux-g++-64 {
OBJECTS_DIR = temp/linux-g++-64/obj
QMAKE_LFLAGS += -L"../../../../lib/linux-g++-64"
CONFIG += version_detail_bash_script
}
version_detail_bash_script {
DEFINES += ADD_LIBRETROSHARE_VERSION_INFO
QMAKE_EXTRA_TARGETS += write_version_detail
PRE_TARGETDEPS = write_version_detail
write_version_detail.commands = ./version_detail.sh
}
#################### Cross compilation for windows under Linux ###################
win32-x-g++ {
@ -163,6 +171,7 @@ HEADERS += rshare.h \
util/MouseEventFilter.h \
util/EventFilter.h \
util/Widget.h \
util/rsversion.h \
util/RsAction.h \
util/printpreview.h \
util/log.h \
@ -380,6 +389,7 @@ SOURCES += main.cpp \
util/EventFilter.cpp \
util/Widget.cpp \
util/RsAction.cpp \
util/rsversion.cpp \
util/printpreview.cpp \
util/log.cpp \
gui/bwgraph/bwgraph.cpp \

View File

@ -61,9 +61,9 @@
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include "rsiface/rsfiles.h"
#include "rsiface/rsdisc.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "util/rsversion.h"
#include <sstream>
#include <iomanip>
@ -123,14 +123,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
/* Create RshareSettings object */
_settings = new RshareSettings();
QString version = "-";
std::map<std::string, std::string>::iterator vit;
std::map<std::string, std::string> versions;
bool retv = rsDisc->getDiscVersions(versions);
if (retv && versions.end() != (vit = versions.find(rsPeers->getOwnId()))) {
version = QString::fromStdString(vit->second);
}
setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(version));
setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(retroshareVersion()));
// Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/images/rstray3.png")));

View File

@ -0,0 +1,26 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006,2007 crypton
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#include "rsversion.h"
QString retroshareVersion() {
return QString(GUI_VERSION);
}

View File

@ -0,0 +1,28 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006,2007 crypton
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#define GUI_VERSION "Revision: 1498 date : 10:34:44 08.04.09"
#include <QString>
QString retroshareVersion();