From e2edbfe47d89059f2020baccd76ad4715ef87871 Mon Sep 17 00:00:00 2001 From: Arnavion Date: Sat, 12 Oct 2013 18:41:27 -0700 Subject: win32: Use version information from configure.ac to populate the Windows-specific files that need it - config-win32.h, version.txt, hexchat.rc, hexchat.iss This is done via T4 templates. The original files are now generated at build-time and so have been added to .gitignore and removed from the repository, with the exception of version.txt which must be hosted on GitHub for the updater plugin. --- src/common/common.vcxproj | 16 +++++++++++++++- src/fe-gtk/fe-gtk.vcxproj | 11 +++++++++-- src/fe-gtk/hexchat.rc | 26 -------------------------- src/fe-gtk/hexchat.rc.tt | 27 +++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 29 deletions(-) delete mode 100644 src/fe-gtk/hexchat.rc create mode 100644 src/fe-gtk/hexchat.rc.tt (limited to 'src') diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index bc2605dd..13610cee 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -14,7 +14,6 @@ - @@ -75,6 +74,10 @@ + + + + {87554B59-006C-4D94-9714-897B27067BA3} Win32Proj @@ -151,4 +154,15 @@ + + + + + + + \ No newline at end of file diff --git a/src/fe-gtk/fe-gtk.vcxproj b/src/fe-gtk/fe-gtk.vcxproj index 73526766..7cc40da8 100644 --- a/src/fe-gtk/fe-gtk.vcxproj +++ b/src/fe-gtk/fe-gtk.vcxproj @@ -97,8 +97,14 @@ - $(DepsRoot)\bin\glib-compile-resources.exe --generate-source --sourcedir $(DataDir) --target "$(ProjectDir)resources.c" "$(DataDir)hexchat.gresource.xml" - Build gresource file + + + + Build hexchat.rc and gresource file @@ -166,6 +172,7 @@ + diff --git a/src/fe-gtk/hexchat.rc b/src/fe-gtk/hexchat.rc deleted file mode 100644 index 789aa26e..00000000 --- a/src/fe-gtk/hexchat.rc +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include "../../config-win32.h" -#include "../../resource.h" - -XC_ICON ICON "../../data/icons/hexchat.ico" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION COMMA_VERSION - PRODUCTVERSION COMMA_VERSION - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - - VALUE "FileDescription", "HexChat IRC Client" - VALUE "ProductName", "HexChat" - VALUE "ProductVersion", PACKAGE_VERSION - VALUE "FileVersion", PACKAGE_VERSION - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04B0 - END - END diff --git a/src/fe-gtk/hexchat.rc.tt b/src/fe-gtk/hexchat.rc.tt new file mode 100644 index 00000000..87507340 --- /dev/null +++ b/src/fe-gtk/hexchat.rc.tt @@ -0,0 +1,27 @@ +<#@ include file="..\..\version.include.tt" #>#include +#include "../../config-win32.h" + +#define COMMA_VERSION <#= string.Join(",", versionParts) #>,0 + +XC_ICON ICON "../../data/icons/hexchat.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION COMMA_VERSION + PRODUCTVERSION COMMA_VERSION + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + + VALUE "FileDescription", "HexChat IRC Client" + VALUE "ProductName", "HexChat" + VALUE "ProductVersion", PACKAGE_VERSION + VALUE "FileVersion", PACKAGE_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END + END -- cgit 1.4.1