[vdagent-win 1/2] build: Automatically update version/copyright in .rc files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The versions/copyright in vdservice.rc and vdagent.rc are very outdated.
Updating them automatically at configure time should ensure they are
updated more often.
The generated .rc files are kept in git as they are needed for VC++
builds.
---
 configure.ac              |   8 +++-
 vdagent/vdagent.rc.in     | 102 ++++++++++++++++++++++++++++++++++++++++++++++
 vdservice/vdservice.rc.in | 102 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 vdagent/vdagent.rc.in
 create mode 100644 vdservice/vdservice.rc.in

diff --git a/configure.ac b/configure.ac
index 7f6511d..6689602 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,11 @@ 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_SUBST([RC_PRODUCTVERSION])
+BUILD_YEAR=`date +%Y`
+AC_SUBST([BUILD_YEAR])
 # Check for programs
 AC_PROG_CC
 AC_PROG_CXX
@@ -105,6 +109,8 @@ AC_CONFIG_FILES([
 Makefile
 mingw-spice-vdagent.spec
 spice-vdagent.wxs
+vdagent/vdagent.rc
+vdservice/vdservice.rc
 ])
 AC_OUTPUT
 
diff --git a/vdagent/vdagent.rc.in b/vdagent/vdagent.rc.in
new file mode 100644
index 0000000..7c4481f
--- /dev/null
+++ b/vdagent/vdagent.rc.in
@@ -0,0 +1,102 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Hebrew resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#ifdef _WIN32
+LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
+#pragma code_page(1255)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @RC_PRODUCTVERSION@
+ PRODUCTVERSION @RC_PRODUCTVERSION@
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "000904b0"
+        BEGIN
+            VALUE "CompanyName", "Red Hat Inc."
+            VALUE "FileDescription", "Spice agent"
+            VALUE "FileVersion", "@RC_PRODUCTVERSION@"
+            VALUE "InternalName", "vdagent"
+            VALUE "LegalCopyright", "Copyright (c) 2009-@BUILD_YEAR@  Red Hat Inc. and/or its affiliates"
+            VALUE "OriginalFilename", "vdagent.exe"
+            VALUE "ProductName", "Red Hat Spice"
+            VALUE "ProductVersion", "@RC_PRODUCTVERSION@"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x9, 1200
+    END
+END
+
+#endif    // Hebrew resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/vdservice/vdservice.rc.in b/vdservice/vdservice.rc.in
new file mode 100644
index 0000000..6a2284f
--- /dev/null
+++ b/vdservice/vdservice.rc.in
@@ -0,0 +1,102 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Hebrew resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#ifdef _WIN32
+LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT
+#pragma code_page(1255)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @RC_PRODUCTVERSION@
+ PRODUCTVERSION @RC_PRODUCTVERSION@
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "000904b0"
+        BEGIN
+            VALUE "CompanyName", "Red Hat Inc."
+            VALUE "FileDescription", "Spice service"
+            VALUE "FileVersion", "@RC_PRODUCTVERSION@"
+            VALUE "InternalName", "vdservice"
+            VALUE "LegalCopyright", "Copyright (c) 2009-@BUILD_YEAR@  Red Hat Inc. and/or its affiliates"
+            VALUE "OriginalFilename", "vdservice.exe"
+            VALUE "ProductName", "Red Hat Spice"
+            VALUE "ProductVersion", "@RC_PRODUCTVERSION@"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x9, 1200
+    END
+END
+
+#endif    // Hebrew resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]