summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2018-03-15 17:15:15 +0100
committerAndre Heinecke <[email protected]>2018-03-15 17:15:15 +0100
commit621e4c24a469c8c8e1ccd41f310933255f9d8f0a (patch)
tree61fd2a8cff607f2acc944a00e30fc47037647489
parentb80b12ad58b550f70c93cd8e3261c926ac20e723 (diff)
Add versioninfo for Windows
This is mostly important for the description as that is user visible if "Open With" is used on windows. GnuPG-Bug-Id: T3516
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/versioninfo.rc.in44
3 files changed, 51 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36c3871..58a6e84 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,6 @@
set(kleopatra_version 3.1.0)
+# The following is for Windows. Keep in line with kleopatra_version.
+set(kleopatra_fileversion 3,1,0,0)
cmake_minimum_required(VERSION 3.0)
project(kleopatra VERSION ${kleopatra_version})
# Add version suffix for internal usage of the version string
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 96755cb..18621b4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -238,6 +238,11 @@ set(_kleopatra_SRCS
main.cpp
)
+if(WIN32)
+ configure_file (versioninfo.rc.in versioninfo.rc)
+ set(_kleopatra_SRCS ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc ${_kleopatra_SRCS})
+endif()
+
if(HAVE_KCMUTILS)
set (_kleopatra_extra_libs KF5::KCMUtils)
else()
diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in
new file mode 100644
index 0000000..77b3c76
--- /dev/null
+++ b/src/versioninfo.rc.in
@@ -0,0 +1,44 @@
+/* versioninfo.rc.in
+* Copyright (C) 2013 g10 Code GmbH
+* 2018 Intevation GmbH
+*
+* This file is free software; as a special exception the author gives
+* unlimited permission to copy and/or distribute it, with or without
+* modifications, as long as this notice is preserved.
+*
+* This program is distributed in the hope that it will be useful, but
+* WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/* This file is processed by cmake to create versioninfo.rc */
+#include "afxres.h"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @[email protected]
+ PRODUCTVERSION @[email protected]
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x20L
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "This program is available under the terms of the GNU General Public License, version 2 or any later version.\0"
+ VALUE "CompanyName", "Gpg4win Initiative\0"
+ VALUE "FileDescription", "Kleopatra - GnuPG User Interface\0"
+ VALUE "FileVersion", "@[email protected]\0"
+ VALUE "InternalName", "kleopatra\0"
+ VALUE "LegalCopyright", "Copyright 2010-2018 The Kleopatra developers\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "kleopatra.exe\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "Kleopatra\0"
+ VALUE "ProductVersion", "@[email protected]\0"
+ VALUE "SpecialBuild", "@[email protected]\0"
+ END
+ END
+END