diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 9e6508aa3..a0e784e57 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -92,6 +92,8 @@ include_directories( ) ############# Do macro replacements on input files ############# +string(TIMESTAMP BUILD_YEAR "%Y") + configure_file(${COMPANION_SRC_DIRECTORY}/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY) configure_file(${COMPANION_SRC_DIRECTORY}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY) configure_file(${COMPANION_SRC_DIRECTORY}/simulator.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop @ONLY) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 48e8b9d2c..75421cce5 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -668,7 +668,7 @@ void MainWindow::about() aboutStr.append("

"); aboutStr.append(tr("File new Issue or Request").arg("https://github.com/EdgeTX/edgetx/issues/new/choose")); aboutStr.append("

"); - aboutStr.append(tr("Copyright") + QString(" © 2024 EdgeTX
")); + aboutStr.append(tr("Copyright") + QString(" © 2021-%1 EdgeTX
").arg(BUILD_YEAR)); QMessageBox msgBox(this); msgBox.setWindowIcon(CompanionIcon("information.png")); diff --git a/companion/src/version.h.in b/companion/src/version.h.in index 5e1a1c8c1..a1d75bb35 100644 --- a/companion/src/version.h.in +++ b/companion/src/version.h.in @@ -6,6 +6,7 @@ #cmakedefine VERSION_TAG "@VERSION_TAG@" #define CODENAME "@CODENAME@" #define GIT_STR "@GIT_STR@" +#define BUILD_YEAR @BUILD_YEAR@ #define VERSION_NUMBER ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | VERSION_REVISION)