Simplify version number handling

This commit is contained in:
Andrew Nelless 2017-05-23 16:05:35 +01:00
parent 9bb4f564e5
commit 1070ffce53
4 changed files with 5 additions and 10 deletions

View File

@ -120,6 +120,9 @@ endif()
set (SYNERGY_VERSION "${SYNERGY_VERSION_MAJOR}.${SYNERGY_VERSION_MINOR}.${SYNERGY_VERSION_PATCH}")
set (SYNERGY_VERSION_STRING "${SYNERGY_VERSION}-${SYNERGY_VERSION_TAG}")
add_definitions (-DSYNERGY_VERSION="${SYNERGY_VERSION}")
add_definitions (-DSYNERGY_VERSION_STRING="${SYNERGY_VERSION_STRING}")
message (STATUS "Full Synergy version string is " ${SYNERGY_VERSION_STRING})
# TODO: Find out why we need these, and remove them

View File

@ -33,8 +33,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
qt5_use_modules (synergy Core Widgets Network)
target_compile_definitions (synergy PRIVATE -DSYNERGY_VERSION_STAGE="${SYNERGY_VERSION_STAGE}")
target_compile_definitions (synergy PRIVATE -DSYNERGY_REVISION="${SYNERGY_REVISION}")
if (WIN32)
target_link_libraries (synergy ${DNSSD_LIB})

View File

@ -28,13 +28,7 @@ AboutDialog::AboutDialog(QWidget* parent, const QString& synergyApp) :
setupUi(this);
m_versionChecker.setApp(synergyApp);
QString version = m_versionChecker.getVersion();
version = version + '-' + SYNERGY_VERSION_STAGE;
#ifdef SYNERGY_REVISION
version += '-';
version += SYNERGY_REVISION;
#endif
m_pLabelSynergyVersion->setText(version);
m_pLabelSynergyVersion->setText(SYNERGY_VERSION_STRING);
QString buildDateString = QString::fromLocal8Bit(__DATE__).simplified();
QDate buildDate = QLocale("en_US").toDate(buildDateString, "MMM d yyyy");

View File

@ -25,4 +25,4 @@ const char* kCopyright = "Copyright (C) 2012-2016 Symless Ltd.\n"
const char* kContact = "Email: engineering@symless.com";
const char* kWebsite = "https://symless.com/";
const char* kVersion = SYNERGY_VERSION;
const char* kAppVersion = "Synergy " SYNERGY_VERSION;
const char* kAppVersion = "Synergy " SYNERGY_VERSION_STRING;