feat(minor): Better showing of version info in firmware and cpn, remove seperate cpn32 build script (#1913)

* fix: Prevent potential wordsplitting of variables

* chore: Remove need for separate cpn 32bit script

* Build script tag/branch/PR auto-detection

* Teach companion about VERSION_TAG

* Update some constant names

* Only one companion build script

* Actually use `VERSION_SUFFIX` in about screen 🤦

* Add space

* Remove line that was only for testing 32bit build

* Remove hyphen between win and bits

* Show codename in Settings -> Version

* cpn: Only show codename on tagged versions

* Update about screen also

* Double quotes around codename on colorlcd

* Update copyright year

* About screen should use VERSION_TAG when set
This commit is contained in:
Peter Feerick
2022-05-08 16:24:31 +10:00
committed by GitHub
parent 5196c2a916
commit b0e3cb015f
16 changed files with 80 additions and 331 deletions
+1 -1
View File
@@ -83,6 +83,6 @@
#define CPN_STR_SW_INDICATOR_NEUT QCoreApplication::translate("RawSwitch", "-") // Switch neutral (middle) position indicator.
#define CPN_STR_SW_INDICATOR_REV QCoreApplication::translate("RawSwitch", "!") // Switch reversed logic (NOT) indicator.
#define OPENTX_HOME_PAGE_URL "https://edgetx.org"
#define EDGETX_HOME_PAGE_URL "https://edgetx.org"
#endif // _CONSTANTS_H_
@@ -1197,7 +1197,7 @@ QString OpenTxFirmware::getFirmwareUrl()
QString OpenTxFirmware::getReleaseNotesUrl()
{
return QString("%1/downloads").arg(OPENTX_HOME_PAGE_URL);
return QString("%1/downloads").arg(EDGETX_HOME_PAGE_URL);
}
QString OpenTxFirmware::getStampUrl()
+7 -3
View File
@@ -65,7 +65,7 @@
#define INTERACTIVE_DOWNLOAD 4
#define AUTOMATIC_DOWNLOAD 8
#define OPENTX_DOWNLOADS_PAGE_URL QStringLiteral("https://edgetx.org/downloads")
#define EDGETX_DOWNLOADS_PAGE_URL QStringLiteral("https://edgetx.org/downloads")
#define DONATE_STR QStringLiteral("https://opencollective.com/edgetx/donate")
#ifdef Q_OS_MACOS
@@ -382,7 +382,7 @@ void MainWindow::checkForCompanionUpdateFinished(QNetworkReply * reply)
}
}
#else
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available, please check the <a href='%1'>EdgeTX website!</a>").arg(OPENTX_DOWNLOADS_PAGE_URL));
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available, please check the <a href='%1'>EdgeTX website!</a>").arg(EDGETX_DOWNLOADS_PAGE_URL));
#endif
}
else {
@@ -1023,9 +1023,13 @@ 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\", %3").arg(VERSION).arg(CODENAME).arg(__DATE__));
#if defined(VERSION_TAG)
aboutStr.append(QString("Version %1 \"%2\", %3").arg(VERSION_TAG).arg(CODENAME).arg(__DATE__));
#else
aboutStr.append(QString("Version %1-%2, %3").arg(VERSION).arg(VERSION_SUFFIX).arg(__DATE__));
aboutStr.append("<br/>");
aboutStr.append(QString("Commit <a href='%1'>%2</a>").arg("https://github.com/EdgeTX/edgetx/commit/" GIT_STR).arg(GIT_STR));
#endif
aboutStr.append("<br/><br/>");
aboutStr.append(tr("File new <a href='%1'>Issue or Request</a>").arg("https://github.com/EdgeTX/edgetx/issues/new/choose"));
aboutStr.append("<br/><br/>");
+1
View File
@@ -3,6 +3,7 @@
#define VERSION_MINOR @VERSION_MINOR@
#define VERSION_REVISION @VERSION_REVISION@
#define VERSION_SUFFIX "@VERSION_SUFFIX@"
#cmakedefine VERSION_TAG "@VERSION_TAG@"
#define CODENAME "@CODENAME@"
#define GIT_STR "@GIT_STR@"