From 572fb29537ae576298bb224dbec0f6f4215d3b90 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 23 Mar 2018 10:35:01 +0100 Subject: [PATCH] Windows: Set exe version with CMake configure file --- src/main/CMakeLists.txt | 6 ++---- src/main/falkonversion.h.cmake | 6 ++++++ src/main/{appicon.rc => version.rc} | 15 ++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 src/main/falkonversion.h.cmake rename src/main/{appicon.rc => version.rc} (57%) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index e31cbc933..ec6bb5076 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -7,10 +7,8 @@ include_directories( ) set(SRCS main.cpp) if (WIN32) - set(SRCS ${SRCS} appicon.rc) -endif() -if (${CMAKE_SYSTEM} MATCHES "OS2") - set(SRCS ${SRCS} appicon_os2.rc) + set(SRCS ${SRCS} version.rc) + configure_file(falkonversion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/falkonversion.h) endif() ecm_create_qm_loader(SRCS falkon_qt) add_executable(falkon ${SRCS}) diff --git a/src/main/falkonversion.h.cmake b/src/main/falkonversion.h.cmake new file mode 100644 index 000000000..ddab42048 --- /dev/null +++ b/src/main/falkonversion.h.cmake @@ -0,0 +1,6 @@ +/* falkonversion.h. Generated by cmake from falkonversion.h.cmake */ + +#define FALKON_VERSION_STRING "${PROJECT_VERSION}" +#define FALKON_VERSION_MAJOR ${PROJECT_VERSION_MAJOR} +#define FALKON_VERSION_MINOR ${PROJECT_VERSION_MINOR} +#define FALKON_VERSION_PATCH ${PROJECT_VERSION_PATCH} diff --git a/src/main/appicon.rc b/src/main/version.rc similarity index 57% rename from src/main/appicon.rc rename to src/main/version.rc index 6080721d9..c7767d367 100644 --- a/src/main/appicon.rc +++ b/src/main/version.rc @@ -1,11 +1,12 @@ #include "winver.h" +#include "falkonversion.h" IDI_ICON1 ICON DISCARDABLE "..\lib\data\icons\exeicons\falkon.ico" IDI_ICON2 ICON DISCARDABLE "..\lib\data\icons\exeicons\page.ico" VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,1,2,0 - PRODUCTVERSION 2,1,2,0 + FILEVERSION FALKON_VERSION_MAJOR,FALKON_VERSION_MINOR,FALKON_VERSION_PATCH,0 + PRODUCTVERSION FALKON_VERSION_MAJOR,FALKON_VERSION_MINOR,FALKON_VERSION_PATCH,0 FILEFLAGS 0x0L FILEFLAGSMASK 0x3fL FILEOS 0x00040004L @@ -16,14 +17,14 @@ BEGIN BEGIN BLOCK "000004b0" BEGIN - VALUE "CompanyName", "Falkon Team" - VALUE "FileDescription", "Falkon Web Browser" - VALUE "FileVersion", "2.1.2" - VALUE "LegalCopyright", "Copyright (C) 2010-2017 David Rosca" + VALUE "CompanyName", "KDE" + VALUE "FileDescription", "Falkon" + VALUE "FileVersion", FALKON_VERSION_STRING + VALUE "LegalCopyright", "Copyright (C) 2010-2018 David Rosca" VALUE "InternalName", "falkon" VALUE "OriginalFilename", "falkon.exe" VALUE "ProductName", "Falkon" - VALUE "ProductVersion", "2.1.2" + VALUE "ProductVersion", FALKON_VERSION_STRING END END BLOCK "VarFileInfo"