Add the build timestamp to Windows executables.

This commit is contained in:
Username404-59 2021-07-07 17:02:49 +02:00
parent f6f0a1dc64
commit c7b5960783
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,8 @@ if (NOT DEFINED CODENAME)
endif()
set(EXEDESC "Transpiler for the yerbacon language.")
string(TIMESTAMP SHORT_BUILD_TIMESTAMP "%Y%m")
string(SUBSTRING ${SHORT_BUILD_TIMESTAMP} 2 4 SHORT_BUILD_TIMESTAMP)
string(ASCII 169 CopyrightCharacter)
string(TIMESTAMP LEGALCOPYRIGHT "Copyright ${CopyrightCharacter} 2020-%Y. Available under the MPL-2.0 license.")
file(COPY "resources/${PROJECT_NAME}.ico" DESTINATION "processed")

View File

@ -3,7 +3,7 @@
256 ICON "@PROJECT_NAME@.ico"
1 VERSIONINFO
FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@,0
FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@,@SHORT_BUILD_TIMESTAMP@
PRODUCTVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@
BEGIN
BLOCK "StringFileInfo"
@ -12,7 +12,7 @@ BEGIN
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "@EXEDESC@"
VALUE "FileVersion", "@CMAKE_PROJECT_VERSION@"
VALUE "FileVersion", "@CMAKE_PROJECT_VERSION@.@SHORT_BUILD_TIMESTAMP@"
VALUE "InternalName", "@EXENAME@"
VALUE "LegalCopyright", "@LEGALCOPYRIGHT@"
VALUE "OriginalName", "@EXENAME@.exe"