[Spice-commits] 4 commits - Makefile.am common/version.rc configure.ac vdagent/vdagent.rc vdservice/vdservice.rc
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Nov 17 13:17:40 UTC 2016
Makefile.am | 6 +++-
common/version.rc | 51 ++++++++++++++++++++++++++++++++++++++++
configure.ac | 8 +++++-
vdagent/vdagent.rc | 61 +++++++++++++------------------------------------
vdservice/vdservice.rc | 61 +++++++++++++------------------------------------
5 files changed, 96 insertions(+), 91 deletions(-)
New commits:
commit 86cd88b1f862de1a5bd3e3d7e70106126278f7c3
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 17 12:07:53 2016 +0000
build: Package zip file
zip files are better supported under Windows, this make
possible for instance to copy directly the file on a Windows
machine without having to use additional tools.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/configure.ac b/configure.ac
index 4f409fd..ff489cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([1.11 foreign subdir-objects no-dist-gzip dist-xz tar-ustar])
+AM_INIT_AUTOMAKE([1.11 foreign subdir-objects no-dist-gzip dist-zip dist-xz tar-ustar])
AM_SILENT_RULES([yes])
commit a814ff95c1e282abd9121c4fdb6a5e79e0e35b09
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 17 12:06:41 2016 +0000
build: Automatically update version/copyright in version.rc
The versions/copyright in version.rc are very outdated.
Updating them automatically at configure time should ensure they are
updated more often.
Looks a bit weird to distribute config.h file however in this
case it contain only version information and the file is
useful to compile under Windows.
This patch is inspired by a work of Christophe Fergeau
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/Makefile.am b/Makefile.am
index 92e51e9..b60a718 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,7 @@ vdagent_SOURCES = \
$(NULL)
vdagent_rc.$(OBJEXT): vdagent/vdagent.rc
- $(AM_V_GEN)$(WINDRES) -i $< -o $@
+ $(AM_V_GEN)$(WINDRES) -I $(top_builddir)/common -i $< -o $@
MAINTAINERCLEANFILES += vdagent_rc.$(OBJEXT)
@@ -60,7 +60,7 @@ vdservice_SOURCES = \
$(NULL)
vdservice_rc.$(OBJEXT): vdservice/vdservice.rc
- $(AM_V_GEN)$(WINDRES) -i $< -o $@
+ $(AM_V_GEN)$(WINDRES) -I $(top_builddir)/common -i $< -o $@
MAINTAINERCLEANFILES += vdservice_rc.$(OBJEXT)
@@ -87,6 +87,7 @@ CLEANFILES = spice-vdagent-$(WIXL_ARCH)-$(VERSION)$(BUILDID).msi
EXTRA_DIST += \
$(top_srcdir)/.version \
+ config.h \
common/version.rc \
tests/clipboard.py \
vdagent.sln \
diff --git a/common/version.rc b/common/version.rc
index e78a7ef..2603dce 100644
--- a/common/version.rc
+++ b/common/version.rc
@@ -1,6 +1,8 @@
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
+#include "../config.h"
+
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@@ -13,8 +15,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,5,1,0
- PRODUCTVERSION 0,5,1,0
+ FILEVERSION RC_PRODUCTVERSION
+ PRODUCTVERSION RC_PRODUCTVERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -31,12 +33,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Red Hat Inc."
VALUE "FileDescription", FILE_DESCRIPTION
- VALUE "FileVersion", "0, 5, 1, 0"
+ VALUE "FileVersion", RC_PRODUCTVERSION_STR
VALUE "InternalName", INTERNAL_NAME
- VALUE "LegalCopyright", "Copyright (c) 2009 Red Hat Inc. and/or its affiliates"
+ VALUE "LegalCopyright", "Copyright (c) 2009-" BUILD_YEAR " Red Hat Inc. and/or its affiliates"
VALUE "OriginalFilename", ORIGINAL_FILENAME
VALUE "ProductName", "Red Hat Spice"
- VALUE "ProductVersion", "0, 5, 1, 0"
+ VALUE "ProductVersion", RC_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
diff --git a/configure.ac b/configure.ac
index 7f6511d..4f409fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,12 @@ fi
build=`expr $micro \* 256 + $buildid`
WINDOWS_PRODUCTVERSION="$major.$minor.$build"
AC_SUBST([WINDOWS_PRODUCTVERSION])
+microdigit=`echo $micro | cut -d- -f1`
+RC_PRODUCTVERSION="$major, $minor, $microdigit, 0"
+AC_DEFINE_UNQUOTED([RC_PRODUCTVERSION_STR], "$RC_PRODUCTVERSION", [Resource product version])
+AC_DEFINE_UNQUOTED([RC_PRODUCTVERSION], [$RC_PRODUCTVERSION], [Resource product version])
+BUILD_YEAR=`date +%Y`
+AC_DEFINE_UNQUOTED([BUILD_YEAR], "$BUILD_YEAR", [Build year])
# Check for programs
AC_PROG_CC
commit 4fbd7b485ec5912e326741cfe9faebf661387a5b
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 17 12:11:45 2016 +0000
Move common resource code to a common file
Allows to reuse code. Differences between the two
version information are managed using additional defines
in the top rc files.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/Makefile.am b/Makefile.am
index 84507e8..92e51e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,6 +87,7 @@ CLEANFILES = spice-vdagent-$(WIXL_ARCH)-$(VERSION)$(BUILDID).msi
EXTRA_DIST += \
$(top_srcdir)/.version \
+ common/version.rc \
tests/clipboard.py \
vdagent.sln \
vdagent/resource.h \
diff --git a/common/version.rc b/common/version.rc
new file mode 100644
index 0000000..e78a7ef
--- /dev/null
+++ b/common/version.rc
@@ -0,0 +1,49 @@
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,5,1,0
+ PRODUCTVERSION 0,5,1,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Red Hat Inc."
+ VALUE "FileDescription", FILE_DESCRIPTION
+ VALUE "FileVersion", "0, 5, 1, 0"
+ VALUE "InternalName", INTERNAL_NAME
+ VALUE "LegalCopyright", "Copyright (c) 2009 Red Hat Inc. and/or its affiliates"
+ VALUE "OriginalFilename", ORIGINAL_FILENAME
+ VALUE "ProductName", "Red Hat Spice"
+ VALUE "ProductVersion", "0, 5, 1, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
diff --git a/vdagent/vdagent.rc b/vdagent/vdagent.rc
index 7746756..66c2e6f 100644
--- a/vdagent/vdagent.rc
+++ b/vdagent/vdagent.rc
@@ -9,6 +9,12 @@
//
#include "afxres.h"
+#define FILE_DESCRIPTION "Spice agent"
+#define INTERNAL_NAME "vdagent"
+#define ORIGINAL_FILENAME "vdagent.exe"
+
+#include "../common/version.rc"
+
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -35,6 +41,12 @@ END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
+ "\r\n"
+ "#define FILE_DESCRIPTION ""Spice agent""\r\n"
+ "#define INTERNAL_NAME ""vdagent""\r\n"
+ "#define ORIGINAL_FILENAME ""vdagent.exe""\r\n"
+ "\r\n"
+ "#include ""../common/version.rc""\r\n"
"\0"
END
@@ -46,45 +58,6 @@ END
#endif // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,5,1,0
- PRODUCTVERSION 0,5,1,0
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "Red Hat Inc."
- VALUE "FileDescription", "Spice agent"
- VALUE "FileVersion", "0, 5, 1, 0"
- VALUE "InternalName", "vdagent"
- VALUE "LegalCopyright", "Copyright (c) 2009 Red Hat Inc. and/or its affiliates"
- VALUE "OriginalFilename", "vdagent.exe"
- VALUE "ProductName", "Red Hat Spice"
- VALUE "ProductVersion", "0, 5, 1, 0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/vdservice/vdservice.rc b/vdservice/vdservice.rc
index 4eda50d..329008b 100644
--- a/vdservice/vdservice.rc
+++ b/vdservice/vdservice.rc
@@ -9,6 +9,12 @@
//
#include "afxres.h"
+#define FILE_DESCRIPTION "Spice service"
+#define INTERNAL_NAME "vdservice"
+#define ORIGINAL_FILENAME "vdservice.exe"
+
+#include "../common/version.rc"
+
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -35,6 +41,12 @@ END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
+ "\r\n"
+ "#define FILE_DESCRIPTION ""Spice service""\r\n"
+ "#define INTERNAL_NAME ""vdservice""\r\n"
+ "#define ORIGINAL_FILENAME ""vdservice.exe""\r\n"
+ "\r\n"
+ "#include ""../common/version.rc""\r\n"
"\0"
END
@@ -46,45 +58,6 @@ END
#endif // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,5,1,0
- PRODUCTVERSION 0,5,1,0
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "Red Hat Inc."
- VALUE "FileDescription", "Spice service"
- VALUE "FileVersion", "0, 5, 1, 0"
- VALUE "InternalName", "vdservice"
- VALUE "LegalCopyright", "Copyright (c) 2009 Red Hat Inc. and/or its affiliates"
- VALUE "OriginalFilename", "vdservice.exe"
- VALUE "ProductName", "Red Hat Spice"
- VALUE "ProductVersion", "0, 5, 1, 0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
commit 4d51e5709f3560ae18f472490de09d57fe367746
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 17 11:23:03 2016 +0000
Convert resource information to English
They don't contain Hebrew so avoid to say so.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/vdagent/vdagent.rc b/vdagent/vdagent.rc
index 0973068..7746756 100644
--- a/vdagent/vdagent.rc
+++ b/vdagent/vdagent.rc
@@ -13,12 +13,12 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Hebrew resources
+// English (U.S.) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
-LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
-#pragma code_page(1255)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
@@ -67,7 +67,7 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "000904b0"
+ BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Red Hat Inc."
VALUE "FileDescription", "Spice agent"
@@ -81,11 +81,11 @@ BEGIN
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x9, 1200
+ VALUE "Translation", 0x409, 1200
END
END
-#endif // Hebrew resources
+#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/vdservice/vdservice.rc b/vdservice/vdservice.rc
index f0bf88f..4eda50d 100644
--- a/vdservice/vdservice.rc
+++ b/vdservice/vdservice.rc
@@ -13,12 +13,12 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Hebrew resources
+// English (U.S.) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
-LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
-#pragma code_page(1255)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
@@ -67,7 +67,7 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "000904b0"
+ BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Red Hat Inc."
VALUE "FileDescription", "Spice service"
@@ -81,11 +81,11 @@ BEGIN
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x9, 1200
+ VALUE "Translation", 0x409, 1200
END
END
-#endif // Hebrew resources
+#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
More information about the Spice-commits
mailing list