VERSION_FAMILY dynamic string introduced

This commit is contained in:
Bertrand Songis
2015-11-14 19:17:34 +01:00
parent edf1dbc0b7
commit 2f54e85421
10 changed files with 33 additions and 32 deletions
+1
View File
@@ -5,6 +5,7 @@ SET(VERSION_MINOR "2")
SET(VERSION_REVISION "0")
SET(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
SET(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
SET(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
MESSAGE(STATUS "OpenTX Companion ${VERSION}")
+1 -1
View File
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
QStringList strl = QApplication::arguments();
if (strl.contains("--version")) {
printf("%s\n", C9X_VERSION);
printf("%s\n", VERSION);
fflush(stdout);
exit(0);
}
+1 -1
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Companion @C9X_VERSION@
Name=Companion @VERSION@
GenericName=Transmitter Companion App
Comment=The Ultimate Transmitter Companion
Icon=@COMPANION_NAME@
@@ -1,4 +1,4 @@
// Automatically generated file (CMake) - do not edit
#define DATE_STR "@DATE@"
#define TIME_STR "@TIME@"
#define VERS_STR "@C9X_VERSION@"
#define VERS_STR "@VERSION@"
+4 -4
View File
@@ -278,7 +278,7 @@ void MainWindow::closeUpdatesWaitDialog()
void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
{
QByteArray qba = reply->readAll();
int i = qba.indexOf("C9X_VERSION");
int i = qba.indexOf("VERSION");
if (i>0) {
QString version = qba.mid(i+14, qba.indexOf("\"", i+14)-i-14);
@@ -288,7 +288,7 @@ void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
int vnum = version2index(version);
QString c9xversion = QString(C9X_VERSION);
QString c9xversion = QString(VERSION);
int c9xver = version2index(c9xversion);
if (c9xver < vnum) {
@@ -899,7 +899,7 @@ void MainWindow::about()
aboutStr.append("<br/><br/>");
aboutStr.append(tr("If you've found this program useful, please support by <a href='%1'>donating</a>").arg(DONATE_STR));
aboutStr.append("<br/><br/>");
aboutStr.append(QString("Version %1, %2").arg(C9X_VERSION).arg(__DATE__));
aboutStr.append(QString("Version %1, %2").arg(VERSION).arg(__DATE__));
aboutStr.append("<br/><br/>");
aboutStr.append(tr("Copyright OpenTX Team") + "<br/>&copy; 2011-2015<br/>");
QMessageBox msgBox(this);
@@ -930,7 +930,7 @@ void MainWindow::updateMenus()
updateLanguageActions();
updateIconSizeActions();
updateIconThemeActions();
setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(C9X_VERSION).arg(GetCurrentFirmware()->getName()).arg(g.profile[g.id()].name()));
setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(VERSION).arg(GetCurrentFirmware()->getName()).arg(g.profile[g.id()].name()));
}
MdiChild *MainWindow::createMdiChild()
+1 -1
View File
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Simulator @C9X_VERSION@
Name=Simulator @VERSION@
GenericName=Transmitter Simulator App
Comment=The Ultimate Transmitter Simulator
Icon=@COMPANION_NAME@
+1 -1
View File
@@ -1,2 +1,2 @@
#define C9X_VERSION "@C9X_VERSION@"
#define VERSION "@VERSION@"
#define SIMULATOR_LIB_SEARCH_PATH "@SIMULATOR_LIB_PATH@"