Add stage and revision info in about page #4893
This commit is contained in:
parent
faa170b40d
commit
6320156279
|
@ -508,6 +508,8 @@ class InternalCommands:
|
||||||
qmake_cmd_string += " QMAKE_MAC_SDK=" + shortForm
|
qmake_cmd_string += " QMAKE_MAC_SDK=" + shortForm
|
||||||
qmake_cmd_string += " QMAKE_MAC_SDK." + shortForm + ".path=" + sdkDir
|
qmake_cmd_string += " QMAKE_MAC_SDK." + shortForm + ".path=" + sdkDir
|
||||||
|
|
||||||
|
qmake_cmd_string += " QMAKE_VERSION_STAGE=" + self.getVersionStage()
|
||||||
|
qmake_cmd_string += " QMAKE_VERSION_REVISION=" + self.getGitRevision()
|
||||||
print "QMake command: " + qmake_cmd_string
|
print "QMake command: " + qmake_cmd_string
|
||||||
|
|
||||||
# run qmake from the gui dir
|
# run qmake from the gui dir
|
||||||
|
|
|
@ -2,6 +2,8 @@ QT += widgets \
|
||||||
network
|
network
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET = synergy
|
TARGET = synergy
|
||||||
|
DEFINES += VERSION_STAGE=\\\"$$QMAKE_VERSION_STAGE\\\"
|
||||||
|
DEFINES += VERSION_REVISION=\\\"$$QMAKE_VERSION_REVISION\\\"
|
||||||
DEPENDPATH += . \
|
DEPENDPATH += . \
|
||||||
res
|
res
|
||||||
INCLUDEPATH += . \
|
INCLUDEPATH += . \
|
||||||
|
|
|
@ -28,7 +28,9 @@ AboutDialog::AboutDialog(QWidget* parent, const QString& synergyApp) :
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
m_versionChecker.setApp(synergyApp);
|
m_versionChecker.setApp(synergyApp);
|
||||||
m_pLabelSynergyVersion->setText(m_versionChecker.getVersion());
|
QString version = m_versionChecker.getVersion();
|
||||||
|
version = version + '-' + VERSION_STAGE + '-' + VERSION_REVISION;
|
||||||
|
m_pLabelSynergyVersion->setText(version);
|
||||||
|
|
||||||
// change default size based on os
|
// change default size based on os
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
|
|
|
@ -96,8 +96,10 @@ QString VersionChecker::getVersion()
|
||||||
QRegExp rx(VERSION_REGEX);
|
QRegExp rx(VERSION_REGEX);
|
||||||
QString text = process.readLine();
|
QString text = process.readLine();
|
||||||
if (rx.indexIn(text) != -1)
|
if (rx.indexIn(text) != -1)
|
||||||
|
{
|
||||||
return rx.cap(1);
|
return rx.cap(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tr("Unknown");
|
return tr("Unknown");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue