RS version is now parametrizable at compile time

Avoid the need of dirty patching to set the version at build time
In case RS version is not passed as argument attempt to determine it
  using git describe, if unavailable use hardcoded default
This commit is contained in:
Gioacchino Mazzurco 2018-09-12 00:33:29 +02:00
parent 5495f43c51
commit 92f90178c4
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
12 changed files with 126 additions and 103 deletions

View file

@ -356,15 +356,7 @@ void Rshare::slotConnectionEstablished()
}
}
QString Rshare::retroshareVersion(bool withRevision)
{
QString version = QString("%1.%2.%3%4").arg(RS_MAJOR_VERSION).arg(RS_MINOR_VERSION).arg(RS_BUILD_NUMBER).arg(RS_BUILD_NUMBER_ADD);
if (withRevision) {
version += QString(" %1 %2").arg(tr("Revision")).arg(RS_REVISION_NUMBER,8,16,QChar('0'));
}
return version;
}
QString Rshare::retroshareVersion(bool) { return RS_HUMAN_READABLE_VERSION; }
/** Enters the main event loop and waits until exit() is called. The signal
* running() will be emitted when the event loop has started. */