From 06babbdae8099bd83be20d1a1a96a724c5bc6de8 Mon Sep 17 00:00:00 2001 From: Neil Horne Date: Sun, 28 Jan 2024 12:17:58 +1100 Subject: [PATCH] chore: Automate Windows installer license copyright year (#4576) --- companion/src/CMakeLists.txt | 5 ++++- companion/targets/windows/{license.txt => license.txt.in} | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) rename companion/targets/windows/{license.txt => license.txt.in} (95%) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 619ad9914..9e6508aa3 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -418,7 +418,10 @@ elseif(WIN32) endif() endif() - install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/license.txt" DESTINATION ${INSTALL_DESTINATION}) + string(TIMESTAMP BUILD_YEAR "%Y") + set(LICENSE_FILE "${CMAKE_CURRENT_BINARY_DIR}/license.txt") + configure_file("${COMPANION_SRC_DIRECTORY}/../targets/windows/license.txt.in" ${LICENSE_FILE} @ONLY) + install(FILES "${LICENSE_FILE}" DESTINATION ${INSTALL_DESTINATION}) if(SDL2_FOUND AND DEFINED SDL2_LIB_PATH) install(FILES "${SDL2_LIB_PATH}" DESTINATION ${INSTALL_DESTINATION}) diff --git a/companion/targets/windows/license.txt b/companion/targets/windows/license.txt.in similarity index 95% rename from companion/targets/windows/license.txt rename to companion/targets/windows/license.txt.in index c73d84b7c..7de3fd7b1 100644 --- a/companion/targets/windows/license.txt +++ b/companion/targets/windows/license.txt.in @@ -1,5 +1,5 @@ Copyright © 2011-2019 OpenTX team -Copyright © 2021 EdgeTX team +Copyright © 2021-@BUILD_YEAR@ EdgeTX team EdgeTX Companion is based on code: - named eePe by author - Erez Raviv