Removed version files from retroshare-gui.

Moved header file with version information to retroshare/rsversion.h.
Added version information to Windows executable.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7845 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-01-14 23:26:51 +00:00
parent 4e8cc9d49f
commit 94ec83fcdb
27 changed files with 156 additions and 210 deletions

View File

@ -3,8 +3,7 @@ set MINGW=C:\MinGW
set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH% set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
"C:\Program Files\TortoiseSVN\bin\SubWCRev" . libretroshare\src\util\rsversion.in libretroshare\src\util\rsversion.h "C:\Program Files\TortoiseSVN\bin\SubWCRev" . libretroshare\src\retroshare\rsversion.in libretroshare\src\retroshare\rsversion.h
"C:\Program Files\TortoiseSVN\bin\SubWCRev" . retroshare-gui\src\util\rsguiversion.in retroshare-gui\src\util\rsguiversion.h
"C:\Program Files\TortoiseSVN\bin\SubWCRev" . retroshare-gui\src\retroshare.in retroshare-gui\src\retroshare.nsi "C:\Program Files\TortoiseSVN\bin\SubWCRev" . retroshare-gui\src\retroshare.in retroshare-gui\src\retroshare.nsi

View File

@ -13,7 +13,6 @@ set SourceDir=%~dp0..\..
:: Optional environment variables :: Optional environment variables
::set OutDir= ::set OutDir=
::set Revision=
:: Build defines for script :: Build defines for script
set NSIS_PARAM= set NSIS_PARAM=
@ -23,11 +22,10 @@ if "%ReleaseDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DRELEASEDIR="%ReleaseDir%"
if "%QtDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DQTDIR="%QtDir%" if "%QtDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DQTDIR="%QtDir%"
if "%MinGWDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DMINGWDIR="%MinGWDir%" if "%MinGWDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DMINGWDIR="%MinGWDir%"
if "%OutDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%OutDir%" if "%OutDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%OutDir%"
if "%Revision%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DREVISION="%Revision%"
:: Scan version from source :: Scan version from source
set Version= set BuildAdd=
set VersionFile="%SourceDir%\retroshare-gui\src\util\rsguiversion.h" set VersionFile="%SourceDir%\libretroshare\src\retroshare\rsversion.h"
if not exist "%VersionFile%" ( if not exist "%VersionFile%" (
echo. echo.
@ -36,22 +34,22 @@ if not exist "%VersionFile%" (
goto :exit goto :exit
) )
for /F "usebackq tokens=1,2,*" %%A in (%VersionFile%) do ( for /F "usebackq tokens=1,2,3" %%A in (%VersionFile%) do (
if "%%A"=="#define" ( if "%%A"=="#define" (
if "%%B"=="GUI_VERSION" ( if "%%B"=="RS_BUILD_NUMBER_ADD" (
set Version=%%~C set BuildAdd=%%~C
) )
) )
) )
if "%Version%"=="" ( if "%BuildAdd%"=="" (
echo. echo.
echo Version not found in echo Version not found in
echo %VersionFile% echo %VersionFile%
goto :exit goto :exit
) )
set NSIS_PARAM=%NSIS_PARAM% /DVERSION=%Version% set NSIS_PARAM=%NSIS_PARAM% /DBUILDADD=%BuildAdd%
:: Create installer :: Create installer
"%NSIS_EXE%" %NSIS_PARAM% "%~dp0retroshare.nsi" "%NSIS_EXE%" %NSIS_PARAM% "%~dp0retroshare.nsi"

View File

@ -2,19 +2,18 @@
; Reworked by Thunder ; Reworked by Thunder
# Needed defines # Needed defines
;!define VERSION "" ;!define BUILDADD ""
;!define SOURCEDIR "" ;!define SOURCEDIR ""
;!define RELEASEDIR "" ;!define RELEASEDIR ""
;!define QTDIR "" ;!define QTDIR ""
;!define MINGWDIR "" ;!define MINGWDIR ""
# Optional defines # Optional defines
;!define REVISION ""
;!define OUTDIR "" ;!define OUTDIR ""
# Check needed defines # Check needed defines
!ifndef VERSION !ifndef BUILDADD
!error "VERSION is not defined" !error "BUILDADD is not defined"
!endif !endif
!ifndef SOURCEDIR !ifndef SOURCEDIR
@ -32,13 +31,6 @@
!endif !endif
# Check optional defines # Check optional defines
!ifdef REVISION
!define REVISION_ "${REVISION}_"
!else
!define REVISION ""
!define REVISION_ ""
!endif
!ifdef OUTDIR !ifdef OUTDIR
!define OUTDIR_ "${OUTDIR}\" !define OUTDIR_ "${OUTDIR}\"
!else !else
@ -46,6 +38,21 @@
!define OUTDIR_ "" !define OUTDIR_ ""
!endif !endif
# Get version from executable
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\RetroShare.exe" VERSION_
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
!define REVISION ${VERSION_4}
# Check version
!ifndef REVISION
!error "REVISION is not defined"
!endif
!ifndef REVISION
!error "REVISION is not defined"
!endif
# Application name and version # Application name and version
!define APPNAME "RetroShare" !define APPNAME "RetroShare"
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}" !define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
@ -61,7 +68,7 @@
# Main Install settings # Main Install settings
Name "${APPNAMEANDVERSION}" Name "${APPNAMEANDVERSION}"
InstallDirRegKey HKLM "Software\${APPNAME}" "" InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "${OUTDIR_}RetroShare_${VERSION}_${REVISION_}setup.exe" OutFile "${OUTDIR_}RetroShare_${VERSION}_${REVISION}_setup.exe"
BrandingText "${APPNAMEANDVERSION}" BrandingText "${APPNAMEANDVERSION}"
RequestExecutionlevel highest RequestExecutionlevel highest
# Use compression # Use compression
@ -120,7 +127,6 @@ Page Custom PortableModePageCreate PortableModePageLeave
# Set languages (first is default language) # Set languages (first is default language)
!insertmacro MUI_RESERVEFILE_LANGDLL !insertmacro MUI_RESERVEFILE_LANGDLL
ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
# Installer languages # Installer languages
!define MUI_LANGDLL_ALLLANGUAGES !define MUI_LANGDLL_ALLLANGUAGES

View File

@ -105,6 +105,7 @@ PUBLIC_HEADERS = retroshare/rsdisc.h \
retroshare/rsdht.h \ retroshare/rsdht.h \
retroshare/rsrtt.h \ retroshare/rsrtt.h \
retroshare/rsconfig.h \ retroshare/rsconfig.h \
retroshare/rsversion.h \
retroshare/rsservicecontrol.h \ retroshare/rsservicecontrol.h \
@ -451,7 +452,7 @@ HEADERS += util/folderiterator.h \
util/rsprint.h \ util/rsprint.h \
util/rsstring.h \ util/rsstring.h \
util/rsthreads.h \ util/rsthreads.h \
util/rsversion.h \ util/rsversioninfo.h \
util/rswin.h \ util/rswin.h \
util/rsrandom.h \ util/rsrandom.h \
util/radix64.h \ util/radix64.h \
@ -603,7 +604,7 @@ SOURCES += util/folderiterator.cc \
util/rsprint.cc \ util/rsprint.cc \
util/rsstring.cc \ util/rsstring.cc \
util/rsthreads.cc \ util/rsthreads.cc \
util/rsversion.cc \ util/rsversioninfo.cc \
util/rswin.cc \ util/rswin.cc \
util/rsaes.cc \ util/rsaes.cc \
util/rsrandom.cc \ util/rsrandom.cc \

View File

@ -14,6 +14,7 @@
#include <rsserver/p3face.h> #include <rsserver/p3face.h>
#include <util/rsdir.h> #include <util/rsdir.h>
#include <util/rsversioninfo.h>
#include <util/folderiterator.h> #include <util/folderiterator.h>
#include <ft/ftserver.h> #include <ft/ftserver.h>
#include <dbase/cachestrapper.h> #include <dbase/cachestrapper.h>

View File

@ -32,7 +32,7 @@
#include <vector> #include <vector>
#include "retroshare/rspeers.h" #include "retroshare/rspeers.h"
#include "retroshare/rsfiles.h" #include "retroshare/rsfiles.h"
#include "util/rsversion.h" #include "retroshare/rsversion.h"
#include "util/rsinitedptr.h" #include "util/rsinitedptr.h"
class RsPluginHandler ; class RsPluginHandler ;
@ -184,11 +184,11 @@ class RsPlugin
// //
// All these items appear in the config->plugins tab, as a description of the plugin. // All these items appear in the config->plugins tab, as a description of the plugin.
// //
uint32_t getSvnRevision() const { return SVN_REVISION_NUMBER ; } // This is read from libretroshare/util/rsversion.h uint32_t getSvnRevision() const { return RS_REVISION_NUMBER ; } // This is read from libretroshare/retroshare/rsversion.h
virtual std::string getShortPluginDescription() const = 0 ; virtual std::string getShortPluginDescription() const = 0 ;
virtual std::string getPluginName() const = 0 ; virtual std::string getPluginName() const = 0 ;
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const = 0 ; virtual void getPluginVersion(int& major,int& minor, int& build, int& svn_rev) const = 0 ;
// //
//========================== Plugin Interface ================================// //========================== Plugin Interface ================================//

View File

@ -0,0 +1,5 @@
#define RS_MAJOR_VERSION 0
#define RS_MINOR_VERSION 6
#define RS_BUILD_NUMBER 0
#define RS_BUILD_NUMBER_ADD "x" // <-- do we need this?
#define RS_REVISION_NUMBER 7843

View File

@ -0,0 +1,5 @@
#define RS_MAJOR_VERSION 0
#define RS_MINOR_VERSION 6
#define RS_BUILD_NUMBER 0
#define RS_BUILD_NUMBER_ADD "x" // <-- do we need this?
#define RS_REVISION_NUMBER $WCREV$

View File

@ -24,7 +24,7 @@
*/ */
#include "services/p3discovery2.h" #include "services/p3discovery2.h"
#include "util/rsversion.h" #include "util/rsversioninfo.h"
#include "retroshare/rsiface.h" #include "retroshare/rsiface.h"
#include "rsserver/p3face.h" #include "rsserver/p3face.h"

View File

@ -1,22 +0,0 @@
/*
* rsversion.cc
*
* Created on: Jun 23, 2009
* Author: alexandrut
*/
#include "rsversion.h"
#define LIB_VERSION "0.6.0"
std::string RsUtil::retroshareVersion()
{
return std::string(LIB_VERSION) + " " + std::string(SVN_REVISION);
}
uint32_t RsUtil::retroshareRevision()
{
return SVN_REVISION_NUMBER;
}

View File

@ -1,22 +0,0 @@
/*
* rsversion.h
*
* Created on: Jun 23, 2009
* Author: alexandrut
*/
#include <string>
#include <inttypes.h>
// These versioning parameters are in the header because plugin versioning requires it.
// Please use the functions below, and don't refer directly to the #defines.
#define SVN_REVISION "Revision 7106"
#define SVN_REVISION_NUMBER 7106
namespace RsUtil {
uint32_t retroshareRevision();
std::string retroshareVersion();
}

View File

@ -1,22 +0,0 @@
/*
* rsversion.h
*
* Created on: Jun 23, 2009
* Author: alexandrut
*/
#include <string>
#include <inttypes.h>
// These versioning parameters are in the header because plugin versioning requires it.
// Please use the functions below, and don't refer directly to the #defines.
#define SVN_REVISION "Revision $WCREV$"
#define SVN_REVISION_NUMBER $WCREV$
namespace RsUtil {
uint32_t retroshareRevision();
std::string retroshareVersion();
}

View File

@ -0,0 +1,23 @@
/*
* rsversion.cc
*
* Created on: Jun 23, 2009
* Author: alexandrut
*/
#include "rsversioninfo.h"
#include "retroshare/rsversion.h"
#include "rsstring.h"
std::string RsUtil::retroshareVersion()
{
std::string version;
rs_sprintf(version, "%d.%d.%d%s Revision %d", RS_MAJOR_VERSION, RS_MINOR_VERSION, RS_BUILD_NUMBER, RS_BUILD_NUMBER_ADD, RS_REVISION_NUMBER);
return version;
}
uint32_t RsUtil::retroshareRevision()
{
return RS_REVISION_NUMBER;
}

View File

@ -0,0 +1,16 @@
/*
* rsversion.h
*
* Created on: Jun 23, 2009
* Author: alexandrut
*/
#include <string>
#include <inttypes.h>
namespace RsUtil {
uint32_t retroshareRevision();
std::string retroshareVersion();
}

View File

@ -54,7 +54,7 @@ extern "C" {
#ifdef WIN32 #ifdef WIN32
__declspec(dllexport) __declspec(dllexport)
#endif #endif
uint32_t RETROSHARE_PLUGIN_revision = SVN_REVISION_NUMBER ; uint32_t RETROSHARE_PLUGIN_revision = RS_REVISION_NUMBER ;
// This symbol contains the svn revision number grabbed from the executable. // This symbol contains the svn revision number grabbed from the executable.
// It will be tested by RS to load the plugin automatically, since it is safe to load plugins // It will be tested by RS to load the plugin automatically, since it is safe to load plugins
@ -66,11 +66,12 @@ extern "C" {
uint32_t RETROSHARE_PLUGIN_api = RS_PLUGIN_API_VERSION ; uint32_t RETROSHARE_PLUGIN_api = RS_PLUGIN_API_VERSION ;
} }
void FeedReaderPlugin::getPluginVersion(int& major,int& minor,int& svn_rev) const void FeedReaderPlugin::getPluginVersion(int& major, int& minor, int &build, int& svn_rev) const
{ {
major = 5; major = RS_MAJOR_VERSION;
minor = 4; minor = RS_MINOR_VERSION;
svn_rev = SVN_REVISION_NUMBER; build = RS_BUILD_NUMBER;
svn_rev = RS_REVISION_NUMBER;
} }
FeedReaderPlugin::FeedReaderPlugin() FeedReaderPlugin::FeedReaderPlugin()

View File

@ -44,7 +44,7 @@ public:
virtual QIcon *qt_icon() const; virtual QIcon *qt_icon() const;
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const; virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const;
virtual void getPluginVersion(int &major, int &minor, int &svn_rev) const; virtual void getPluginVersion(int &major, int &minor, int &build, int &svn_rev) const;
virtual void setPlugInHandler(RsPluginHandler *pgHandler); virtual void setPlugInHandler(RsPluginHandler *pgHandler);
virtual std::string configurationFileName() const { return "feedreader.cfg" ; } virtual std::string configurationFileName() const { return "feedreader.cfg" ; }

View File

@ -1,5 +1,5 @@
#include <retroshare/rsplugin.h> #include <retroshare/rsplugin.h>
#include <util/rsversion.h> #include <retroshare/rsversion.h>
#include <retroshare-gui/RsAutoUpdatePage.h> #include <retroshare-gui/RsAutoUpdatePage.h>
#include <QTranslator> #include <QTranslator>
#include <QApplication> #include <QApplication>
@ -40,7 +40,7 @@ extern "C" {
// It will be tested by RS to load the plugin automatically, since it is safe to load plugins // It will be tested by RS to load the plugin automatically, since it is safe to load plugins
// with same revision numbers, assuming that the revision numbers are up-to-date. // with same revision numbers, assuming that the revision numbers are up-to-date.
// //
uint32_t RETROSHARE_PLUGIN_revision = SVN_REVISION_NUMBER ; uint32_t RETROSHARE_PLUGIN_revision = RS_REVISION_NUMBER ;
// This symbol contains the svn revision number grabbed from the executable. // This symbol contains the svn revision number grabbed from the executable.
// It will be tested by RS to load the plugin automatically, since it is safe to load plugins // It will be tested by RS to load the plugin automatically, since it is safe to load plugins
@ -49,11 +49,12 @@ extern "C" {
uint32_t RETROSHARE_PLUGIN_api = RS_PLUGIN_API_VERSION ; uint32_t RETROSHARE_PLUGIN_api = RS_PLUGIN_API_VERSION ;
} }
void VOIPPlugin::getPluginVersion(int& major,int& minor,int& svn_rev) const void VOIPPlugin::getPluginVersion(int& major, int& minor, int& build, int& svn_rev) const
{ {
major = 5 ; major = RS_MAJOR_VERSION ;
minor = 4 ; minor = RS_MINOR_VERSION ;
svn_rev = SVN_REVISION_NUMBER ; build = RS_BUILD_NUMBER ;
svn_rev = RS_REVISION_NUMBER ;
} }
VOIPPlugin::VOIPPlugin() VOIPPlugin::VOIPPlugin()

View File

@ -24,7 +24,7 @@ class VOIPPlugin: public RsPlugin
virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const; virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) const;
virtual void qt_sound_events(SoundEvents &events) const; virtual void qt_sound_events(SoundEvents &events) const;
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const ; virtual void getPluginVersion(int& major, int& minor, int &build, int& svn_rev) const ;
virtual void setPlugInHandler(RsPluginHandler *pgHandler); virtual void setPlugInHandler(RsPluginHandler *pgHandler);
virtual std::string configurationFileName() const { return "voip.cfg" ; } virtual std::string configurationFileName() const { return "voip.cfg" ; }

View File

@ -106,7 +106,6 @@
#include "gui/connect/ConnectFriendWizard.h" #include "gui/connect/ConnectFriendWizard.h"
#include "gui/common/RsCollectionFile.h" #include "gui/common/RsCollectionFile.h"
#include "util/rsguiversion.h"
#include "settings/rsettingswin.h" #include "settings/rsettingswin.h"
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
#include "common/StatusDefs.h" #include "common/StatusDefs.h"
@ -201,8 +200,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
nameAndLocation = QString("%1 (%2)").arg(QString::fromUtf8(pd.name.c_str())).arg(QString::fromUtf8(pd.location.c_str())); nameAndLocation = QString("%1 (%2)").arg(QString::fromUtf8(pd.name.c_str())).arg(QString::fromUtf8(pd.location.c_str()));
} }
setWindowTitle(tr("RetroShare %1 a secure decentralized communication platform").arg(retroshareVersion()) + " - " + nameAndLocation); setWindowTitle(tr("RetroShare %1 a secure decentralized communication platform").arg(Rshare::retroshareVersion()) + " - " + nameAndLocation);
/* add url handler for RetroShare links */ /* add url handler for RetroShare links */
QDesktopServices::setUrlHandler(RSLINK_SCHEME, this, "retroshareLinkActivated"); QDesktopServices::setUrlHandler(RSLINK_SCHEME, this, "retroshareLinkActivated");

View File

@ -1,3 +1,37 @@
#include <winver.h>
#include "retroshare_win.rc.h" #include "retroshare_win.rc.h"
#include "retroshare/rsversion.h"
IDI_ICON1 ICON "logo/logo_64.ico" IDI_ICON1 ICON "logo/logo_64.ico"
#define STRINGIZER(version) #version
#define VERSION_STRING(major,minor,build,buildadd,revision) STRINGIZER(major) "." STRINGIZER(minor) "." STRINGIZER(build) buildadd "." STRINGIZER(revision)
VS_VERSION_INFO VERSIONINFO
FILEVERSION RS_MAJOR_VERSION,RS_MINOR_VERSION,RS_BUILD_NUMBER,RS_REVISION_NUMBER
PRODUCTVERSION RS_MAJOR_VERSION,RS_MINOR_VERSION,RS_BUILD_NUMBER,RS_REVISION_NUMBER
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "RetroShare"
VALUE "FileVersion", VERSION_STRING(RS_MAJOR_VERSION, RS_MINOR_VERSION, RS_BUILD_NUMBER, RS_BUILD_NUMBER_ADD, RS_REVISION_NUMBER)
VALUE "InternalName", "RetroShare"
VALUE "OriginalFilename", "RetroShare.exe"
VALUE "ProductName", "RetroShare"
VALUE "ProductVersion", VERSION_STRING(RS_MAJOR_VERSION, RS_MINOR_VERSION, RS_BUILD_NUMBER, RS_BUILD_NUMBER_ADD, RS_REVISION_NUMBER)
VALUE "LegalCopyright", ""
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0809, 1200
END
END

View File

@ -98,9 +98,10 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
int major = 0; int major = 0;
int minor = 0; int minor = 0;
int build = 0;
int svn_rev = 0; int svn_rev = 0;
plugin->getPluginVersion(major, minor, svn_rev); plugin->getPluginVersion(major, minor, build, svn_rev);
pluginVersion = QString("%1.%2.%3").arg(major).arg(minor).arg(svn_rev); pluginVersion = QString("%1.%2.%3.%4").arg(major).arg(minor).arg(build).arg(svn_rev);
} }
PluginItem *item = new PluginItem(pluginVersion, i,pluginTitle,pluginDescription,status_string, PluginItem *item = new PluginItem(pluginVersion, i,pluginTitle,pluginDescription,status_string,

View File

@ -204,6 +204,14 @@ win32 {
DEPENDPATH += . DEPENDPATH += .
INCLUDEPATH += . INCLUDEPATH += .
greaterThan(QT_MAJOR_VERSION, 4) {
# Qt 5
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
} else {
# Qt 4
QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src
}
} }
##################################### MacOS ###################################### ##################################### MacOS ######################################
@ -357,7 +365,6 @@ HEADERS += rshare.h \
util/EventFilter.h \ util/EventFilter.h \
util/EventReceiver.h \ util/EventReceiver.h \
util/Widget.h \ util/Widget.h \
util/rsguiversion.h \
util/RsAction.h \ util/RsAction.h \
util/RsUserdata.h \ util/RsUserdata.h \
util/printpreview.h \ util/printpreview.h \
@ -695,7 +702,6 @@ SOURCES += main.cpp \
util/EventReceiver.cpp \ util/EventReceiver.cpp \
util/Widget.cpp \ util/Widget.cpp \
util/RsAction.cpp \ util/RsAction.cpp \
util/rsguiversion.cpp \
util/printpreview.cpp \ util/printpreview.cpp \
util/log.cpp \ util/log.cpp \
util/misc.cpp \ util/misc.cpp \

View File

@ -37,6 +37,7 @@
#include <iostream> #include <iostream>
#include <retroshare/rsinit.h> #include <retroshare/rsinit.h>
#include <retroshare/rsversion.h>
#include <lang/languagesupport.h> #include <lang/languagesupport.h>
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
@ -162,6 +163,11 @@ Rshare::~Rshare()
} }
QString Rshare::retroshareVersion()
{
return QString("%1.%2.%3%4").arg(RS_MAJOR_VERSION).arg(RS_MINOR_VERSION).arg(RS_BUILD_NUMBER).arg(RS_BUILD_NUMBER_ADD);
}
/** Enters the main event loop and waits until exit() is called. The signal /** Enters the main event loop and waits until exit() is called. The signal
* running() will be emitted when the event loop has started. */ * running() will be emitted when the event loop has started. */
int int

View File

@ -61,6 +61,9 @@ public:
/** Destructor. */ /** Destructor. */
~Rshare(); ~Rshare();
/** Return the version info */
static QString retroshareVersion();
/** Return the map of command-line arguments and values. */ /** Return the map of command-line arguments and values. */
static QMap<QString, QString> arguments() { return _args; } static QMap<QString, QString> arguments() { return _args; }
/** Validates that all arguments were well-formed. */ /** Validates that all arguments were well-formed. */

View File

@ -1,30 +0,0 @@
/****************************************************************
* 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 "rsguiversion.h"
QString retroshareVersion() {
return QString(GUI_VERSION);
}
QString retroshareRevision() {
return QString(GUI_REVISION);
}

View File

@ -1,31 +0,0 @@
/****************************************************************
* 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 <QString>
QString retroshareVersion();
QString retroshareRevision();
#define GUI_VERSION "0.6.x"
#define GUI_REVISION "Revision: 7669"

View File

@ -1,31 +0,0 @@
/****************************************************************
* 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 <QString>
QString retroshareVersion();
QString retroshareRevision();
#define GUI_VERSION "0.6.x"
#define GUI_REVISION "Revision: $WCREV$"