diff --git a/build-all-mingw32make.bat b/build-all-mingw32make.bat index 9dbaf9c7a..67aa98694 100644 --- a/build-all-mingw32make.bat +++ b/build-all-mingw32make.bat @@ -3,8 +3,7 @@ set MINGW=C:\MinGW 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" . retroshare-gui\src\util\rsguiversion.in retroshare-gui\src\util\rsguiversion.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\retroshare.in retroshare-gui\src\retroshare.nsi diff --git a/build_scripts/Windows/make_installer.bat b/build_scripts/Windows/make_installer.bat index 282b812db..e2f8cfc14 100644 --- a/build_scripts/Windows/make_installer.bat +++ b/build_scripts/Windows/make_installer.bat @@ -13,7 +13,6 @@ set SourceDir=%~dp0..\.. :: Optional environment variables ::set OutDir= -::set Revision= :: Build defines for script 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 "%MinGWDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DMINGWDIR="%MinGWDir%" if "%OutDir%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DOUTDIR="%OutDir%" -if "%Revision%" NEQ "" set NSIS_PARAM=%NSIS_PARAM% /DREVISION="%Revision%" :: Scan version from source -set Version= -set VersionFile="%SourceDir%\retroshare-gui\src\util\rsguiversion.h" +set BuildAdd= +set VersionFile="%SourceDir%\libretroshare\src\retroshare\rsversion.h" if not exist "%VersionFile%" ( echo. @@ -36,22 +34,22 @@ if not exist "%VersionFile%" ( 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 "%%B"=="GUI_VERSION" ( - set Version=%%~C + if "%%B"=="RS_BUILD_NUMBER_ADD" ( + set BuildAdd=%%~C ) ) ) -if "%Version%"=="" ( +if "%BuildAdd%"=="" ( echo. echo Version not found in echo %VersionFile% goto :exit ) -set NSIS_PARAM=%NSIS_PARAM% /DVERSION=%Version% +set NSIS_PARAM=%NSIS_PARAM% /DBUILDADD=%BuildAdd% :: Create installer "%NSIS_EXE%" %NSIS_PARAM% "%~dp0retroshare.nsi" diff --git a/build_scripts/Windows/retroshare.nsi b/build_scripts/Windows/retroshare.nsi index 3352c8c05..3dc86181e 100644 --- a/build_scripts/Windows/retroshare.nsi +++ b/build_scripts/Windows/retroshare.nsi @@ -2,19 +2,18 @@ ; Reworked by Thunder # Needed defines -;!define VERSION "" +;!define BUILDADD "" ;!define SOURCEDIR "" ;!define RELEASEDIR "" ;!define QTDIR "" ;!define MINGWDIR "" # Optional defines -;!define REVISION "" ;!define OUTDIR "" # Check needed defines -!ifndef VERSION -!error "VERSION is not defined" +!ifndef BUILDADD +!error "BUILDADD is not defined" !endif !ifndef SOURCEDIR @@ -32,13 +31,6 @@ !endif # Check optional defines -!ifdef REVISION -!define REVISION_ "${REVISION}_" -!else -!define REVISION "" -!define REVISION_ "" -!endif - !ifdef OUTDIR !define OUTDIR_ "${OUTDIR}\" !else @@ -46,6 +38,21 @@ !define OUTDIR_ "" !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 !define APPNAME "RetroShare" !define APPNAMEANDVERSION "${APPNAME} ${VERSION}" @@ -61,7 +68,7 @@ # Main Install settings Name "${APPNAMEANDVERSION}" InstallDirRegKey HKLM "Software\${APPNAME}" "" -OutFile "${OUTDIR_}RetroShare_${VERSION}_${REVISION_}setup.exe" +OutFile "${OUTDIR_}RetroShare_${VERSION}_${REVISION}_setup.exe" BrandingText "${APPNAMEANDVERSION}" RequestExecutionlevel highest # Use compression @@ -120,7 +127,6 @@ Page Custom PortableModePageCreate PortableModePageLeave # Set languages (first is default language) !insertmacro MUI_RESERVEFILE_LANGDLL -ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll" # Installer languages !define MUI_LANGDLL_ALLLANGUAGES diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index 3964860bf..f9d0c459f 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -105,6 +105,7 @@ PUBLIC_HEADERS = retroshare/rsdisc.h \ retroshare/rsdht.h \ retroshare/rsrtt.h \ retroshare/rsconfig.h \ + retroshare/rsversion.h \ retroshare/rsservicecontrol.h \ @@ -451,7 +452,7 @@ HEADERS += util/folderiterator.h \ util/rsprint.h \ util/rsstring.h \ util/rsthreads.h \ - util/rsversion.h \ + util/rsversioninfo.h \ util/rswin.h \ util/rsrandom.h \ util/radix64.h \ @@ -603,7 +604,7 @@ SOURCES += util/folderiterator.cc \ util/rsprint.cc \ util/rsstring.cc \ util/rsthreads.cc \ - util/rsversion.cc \ + util/rsversioninfo.cc \ util/rswin.cc \ util/rsaes.cc \ util/rsrandom.cc \ diff --git a/libretroshare/src/plugins/pluginmanager.cc b/libretroshare/src/plugins/pluginmanager.cc index f4c3e53c9..fe103a1d8 100644 --- a/libretroshare/src/plugins/pluginmanager.cc +++ b/libretroshare/src/plugins/pluginmanager.cc @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/libretroshare/src/retroshare/rsplugin.h b/libretroshare/src/retroshare/rsplugin.h index e622a1f6b..afa8daae6 100644 --- a/libretroshare/src/retroshare/rsplugin.h +++ b/libretroshare/src/retroshare/rsplugin.h @@ -32,7 +32,7 @@ #include #include "retroshare/rspeers.h" #include "retroshare/rsfiles.h" -#include "util/rsversion.h" +#include "retroshare/rsversion.h" #include "util/rsinitedptr.h" class RsPluginHandler ; @@ -184,11 +184,11 @@ class RsPlugin // // 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 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 ================================// diff --git a/libretroshare/src/retroshare/rsversion.h b/libretroshare/src/retroshare/rsversion.h new file mode 100644 index 000000000..db32db6c7 --- /dev/null +++ b/libretroshare/src/retroshare/rsversion.h @@ -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 diff --git a/libretroshare/src/retroshare/rsversion.in b/libretroshare/src/retroshare/rsversion.in new file mode 100644 index 000000000..d405810f7 --- /dev/null +++ b/libretroshare/src/retroshare/rsversion.in @@ -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$ diff --git a/libretroshare/src/services/p3discovery2.cc b/libretroshare/src/services/p3discovery2.cc index 16be50bd8..86c16c3a4 100644 --- a/libretroshare/src/services/p3discovery2.cc +++ b/libretroshare/src/services/p3discovery2.cc @@ -24,7 +24,7 @@ */ #include "services/p3discovery2.h" -#include "util/rsversion.h" +#include "util/rsversioninfo.h" #include "retroshare/rsiface.h" #include "rsserver/p3face.h" diff --git a/libretroshare/src/util/rsversion.cc b/libretroshare/src/util/rsversion.cc deleted file mode 100644 index 18f9d8ac4..000000000 --- a/libretroshare/src/util/rsversion.cc +++ /dev/null @@ -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; -} - diff --git a/libretroshare/src/util/rsversion.h b/libretroshare/src/util/rsversion.h deleted file mode 100644 index f60bc7ea6..000000000 --- a/libretroshare/src/util/rsversion.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * rsversion.h - * - * Created on: Jun 23, 2009 - * Author: alexandrut - */ - -#include -#include - -// 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(); - -} diff --git a/libretroshare/src/util/rsversion.in b/libretroshare/src/util/rsversion.in deleted file mode 100644 index 7e2f7cab1..000000000 --- a/libretroshare/src/util/rsversion.in +++ /dev/null @@ -1,22 +0,0 @@ -/* - * rsversion.h - * - * Created on: Jun 23, 2009 - * Author: alexandrut - */ - -#include -#include - -// 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(); - -} diff --git a/libretroshare/src/util/rsversioninfo.cc b/libretroshare/src/util/rsversioninfo.cc new file mode 100644 index 000000000..96520af62 --- /dev/null +++ b/libretroshare/src/util/rsversioninfo.cc @@ -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; +} diff --git a/libretroshare/src/util/rsversioninfo.h b/libretroshare/src/util/rsversioninfo.h new file mode 100644 index 000000000..3cc331aca --- /dev/null +++ b/libretroshare/src/util/rsversioninfo.h @@ -0,0 +1,16 @@ +/* + * rsversion.h + * + * Created on: Jun 23, 2009 + * Author: alexandrut + */ + +#include +#include + +namespace RsUtil { + + uint32_t retroshareRevision(); + std::string retroshareVersion(); + +} diff --git a/plugins/FeedReader/FeedReaderPlugin.cpp b/plugins/FeedReader/FeedReaderPlugin.cpp index 99826f3e4..f2ad4015e 100644 --- a/plugins/FeedReader/FeedReaderPlugin.cpp +++ b/plugins/FeedReader/FeedReaderPlugin.cpp @@ -54,7 +54,7 @@ extern "C" { #ifdef WIN32 __declspec(dllexport) #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. // 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 ; } -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; - minor = 4; - svn_rev = SVN_REVISION_NUMBER; + major = RS_MAJOR_VERSION; + minor = RS_MINOR_VERSION; + build = RS_BUILD_NUMBER; + svn_rev = RS_REVISION_NUMBER; } FeedReaderPlugin::FeedReaderPlugin() diff --git a/plugins/FeedReader/FeedReaderPlugin.h b/plugins/FeedReader/FeedReaderPlugin.h index e51010a85..26db5c9a7 100644 --- a/plugins/FeedReader/FeedReaderPlugin.h +++ b/plugins/FeedReader/FeedReaderPlugin.h @@ -44,7 +44,7 @@ public: virtual QIcon *qt_icon() 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 std::string configurationFileName() const { return "feedreader.cfg" ; } diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index 86001fa50..25903aed6 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ extern "C" { // 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. // - 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. // 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 ; } -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 ; - minor = 4 ; - svn_rev = SVN_REVISION_NUMBER ; + major = RS_MAJOR_VERSION ; + minor = RS_MINOR_VERSION ; + build = RS_BUILD_NUMBER ; + svn_rev = RS_REVISION_NUMBER ; } VOIPPlugin::VOIPPlugin() diff --git a/plugins/VOIP/VOIPPlugin.h b/plugins/VOIP/VOIPPlugin.h index 9dd655cbf..b81ec68d3 100644 --- a/plugins/VOIP/VOIPPlugin.h +++ b/plugins/VOIP/VOIPPlugin.h @@ -24,7 +24,7 @@ class VOIPPlugin: public RsPlugin virtual QTranslator *qt_translator(QApplication *app, const QString& languageCode, const QString& externalDir) 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 std::string configurationFileName() const { return "voip.cfg" ; } diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 27b95136c..8c3efb590 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -106,7 +106,6 @@ #include "gui/connect/ConnectFriendWizard.h" #include "gui/common/RsCollectionFile.h" -#include "util/rsguiversion.h" #include "settings/rsettingswin.h" #include "settings/rsharesettings.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())); } - 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 */ QDesktopServices::setUrlHandler(RSLINK_SCHEME, this, "retroshareLinkActivated"); diff --git a/retroshare-gui/src/gui/images/retroshare_win.rc b/retroshare-gui/src/gui/images/retroshare_win.rc index 7d88cfe32..404d6ecd2 100644 --- a/retroshare-gui/src/gui/images/retroshare_win.rc +++ b/retroshare-gui/src/gui/images/retroshare_win.rc @@ -1,3 +1,37 @@ +#include #include "retroshare_win.rc.h" +#include "retroshare/rsversion.h" 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 diff --git a/retroshare-gui/src/gui/settings/PluginsPage.cpp b/retroshare-gui/src/gui/settings/PluginsPage.cpp index f6b4a0cb0..2e7327fe8 100644 --- a/retroshare-gui/src/gui/settings/PluginsPage.cpp +++ b/retroshare-gui/src/gui/settings/PluginsPage.cpp @@ -98,9 +98,10 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags) int major = 0; int minor = 0; + int build = 0; int svn_rev = 0; - plugin->getPluginVersion(major, minor, svn_rev); - pluginVersion = QString("%1.%2.%3").arg(major).arg(minor).arg(svn_rev); + plugin->getPluginVersion(major, minor, build, 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, diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index d9e93e609..79010e08b 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -204,6 +204,14 @@ win32 { DEPENDPATH += . 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 ###################################### @@ -357,7 +365,6 @@ HEADERS += rshare.h \ util/EventFilter.h \ util/EventReceiver.h \ util/Widget.h \ - util/rsguiversion.h \ util/RsAction.h \ util/RsUserdata.h \ util/printpreview.h \ @@ -486,7 +493,7 @@ HEADERS += rshare.h \ gui/statusbar/SoundStatus.h \ gui/statusbar/OpModeStatus.h \ gui/statusbar/ToasterDisable.h \ - gui/statusbar/SysTrayStatus.h \ + gui/statusbar/SysTrayStatus.h \ gui/advsearch/advancedsearchdialog.h \ gui/advsearch/expressionwidget.h \ gui/advsearch/guiexprelement.h \ @@ -695,7 +702,6 @@ SOURCES += main.cpp \ util/EventReceiver.cpp \ util/Widget.cpp \ util/RsAction.cpp \ - util/rsguiversion.cpp \ util/printpreview.cpp \ util/log.cpp \ util/misc.cpp \ @@ -809,7 +815,7 @@ SOURCES += main.cpp \ gui/statusbar/SoundStatus.cpp \ gui/statusbar/OpModeStatus.cpp \ gui/statusbar/ToasterDisable.cpp \ - gui/statusbar/SysTrayStatus.cpp \ + gui/statusbar/SysTrayStatus.cpp \ gui/toaster/MessageToaster.cpp \ gui/toaster/DownloadToaster.cpp \ gui/toaster/OnlineToaster.cpp \ diff --git a/retroshare-gui/src/rshare.cpp b/retroshare-gui/src/rshare.cpp index 27c24cde9..990057d7d 100644 --- a/retroshare-gui/src/rshare.cpp +++ b/retroshare-gui/src/rshare.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #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 * running() will be emitted when the event loop has started. */ int diff --git a/retroshare-gui/src/rshare.h b/retroshare-gui/src/rshare.h index ee04b7686..3bfafac06 100644 --- a/retroshare-gui/src/rshare.h +++ b/retroshare-gui/src/rshare.h @@ -61,6 +61,9 @@ public: /** Destructor. */ ~Rshare(); + /** Return the version info */ + static QString retroshareVersion(); + /** Return the map of command-line arguments and values. */ static QMap arguments() { return _args; } /** Validates that all arguments were well-formed. */ diff --git a/retroshare-gui/src/util/rsguiversion.cpp b/retroshare-gui/src/util/rsguiversion.cpp deleted file mode 100644 index 7d6edbdf1..000000000 --- a/retroshare-gui/src/util/rsguiversion.cpp +++ /dev/null @@ -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); -} diff --git a/retroshare-gui/src/util/rsguiversion.h b/retroshare-gui/src/util/rsguiversion.h deleted file mode 100644 index 55b3b02bd..000000000 --- a/retroshare-gui/src/util/rsguiversion.h +++ /dev/null @@ -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 retroshareVersion(); -QString retroshareRevision(); - -#define GUI_VERSION "0.6.x" -#define GUI_REVISION "Revision: 7669" - - - diff --git a/retroshare-gui/src/util/rsguiversion.in b/retroshare-gui/src/util/rsguiversion.in deleted file mode 100644 index c1da2ea14..000000000 --- a/retroshare-gui/src/util/rsguiversion.in +++ /dev/null @@ -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 retroshareVersion(); -QString retroshareRevision(); - -#define GUI_VERSION "0.6.x" -#define GUI_REVISION "Revision: $WCREV$" - - -