Add versioning info to binary

This commit is contained in:
2025-05-05 19:58:17 +02:00
parent 2b75b17ca4
commit cc82af3375
2 changed files with 41 additions and 1 deletions

View File

@@ -21,6 +21,18 @@ project("eu07")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined -Wformat")
#set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fsanitize=address -fsanitize=undefined")
string(TIMESTAMP VERSION_YEAR "%y")
string(TIMESTAMP VERSION_MONTH "%m")
string(TIMESTAMP VERSION_DAY "%d")
# Use these as version numbers
set(VERSION_MAJOR ${VERSION_YEAR})
set(VERSION_MINOR ${VERSION_MONTH})
set(VERSION_PATCH ${VERSION_DAY})
set(VERSION_STRING "${VERSION_YEAR}.${VERSION_MONTH}.${VERSION_DAY}")
set(CMAKE_CXX_STANDARD 17)
file(GLOB HEADERS "*.h"

30
eu07.rc
View File

@@ -1,2 +1,30 @@
#include <windows.h>
IDI_ICON1 ICON "eu07.ico"
GLFW_ICON ICON "eu07.ico"
GLFW_ICON ICON "eu07.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "eu07.pl\0"
VALUE "FileDescription", "Symulator pojazdów szynowych\0"
VALUE "FileVersion", "@VERSION_STRING@\0"
VALUE "ProductName", "MaSzyna\0"
VALUE "ProductVersion", "@VERSION_STRING@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END