Add local revision to version number.

--HG--
branch : develop
This commit is contained in:
dismine 2014-05-11 21:03:01 +03:00
parent 1c28bb1da7
commit 5bed7e7a86
2 changed files with 11 additions and 1 deletions

View File

@ -134,6 +134,15 @@ message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
message(Settings: $$[QT_INSTALL_SETTINGS]) message(Settings: $$[QT_INSTALL_SETTINGS])
message(Examples: $$[QT_INSTALL_EXAMPLES]) message(Examples: $$[QT_INSTALL_EXAMPLES])
#local revision number for using in version
!system(hg) {
DEFINES += LOCAL_REVISION=\\\"0\\\"
}
else
{
DEFINES += LOCAL_REVISION=$$system(hg parents --template '{rev}')
}
win32:RC_FILE = share/resources/valentina.rc win32:RC_FILE = share/resources/valentina.rc
# Remove generated files at cleaning # Remove generated files at cleaning

View File

@ -32,6 +32,7 @@ extern const int MAJOR_VERSION = 0;
extern const int MINOR_VERSION = 2; extern const int MINOR_VERSION = 2;
extern const int DEBUG_VERSION = 2; extern const int DEBUG_VERSION = 2;
extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); extern const QString APP_VERSION(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)
.arg(LOCAL_REVISION));
extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE "
"WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE."); "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.");