ACK. On 07/26/2013 02:55 PM, Marc-André Lureau wrote:
Windows Installer expects version of form major.minor.build in order to perform updates. Following Daniel Berrange suggestion, compute a ProductVersion compatible with this scheme by shifting virt-viewer "micro" release number and adding the extra "buildid". --- configure.ac | 14 ++++++++++++++ data/virt-viewer.wxs.in | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4cf6a60..98277fa 100644 --- a/configure.ac +++ b/configure.ac @@ -201,6 +201,20 @@ fi AC_ARG_WITH([buildid], AS_HELP_STRING([--with-buildid=id], [Set additional build version details])) AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details]) +if test "x$with_buildid" != x; then + AC_SUBST([BUILDID], "-$with_buildid") +fi + +major=`echo $PACKAGE_VERSION | cut -d. -f1` +minor=`echo $PACKAGE_VERSION | cut -d. -f2` +micro=`echo $PACKAGE_VERSION | cut -d. -f3` +buildid=`echo $with_buildid | cut -d. -f1` +if test "x$buildid" = x; then + buildid=0 +fi +build=`expr $micro \* 256 + $buildid` +WINDOWS_PRODUCTVERSION="$major.$minor.$build" +AC_SUBST([WINDOWS_PRODUCTVERSION]) AC_CONFIG_FILES([ Makefile diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in index c2c8502..6c1d412 100644 --- a/data/virt-viewer.wxs.in +++ b/data/virt-viewer.wxs.in @@ -2,7 +2,7 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> - <?define Version = "@VERSION@"?> + <?define Version = "@WINDOWS_PRODUCTVERSION@"?> <?define Arch = "@WIXL_ARCH@"?> <?if $(var.Arch) = "x64"?> <?define GLIB_ARCH = "win64"?> @@ -32,7 +32,7 @@ <?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?> <Product Id="*" - Name="VirtViewer $(var.Version) ($(var.ArchString)$(var.UserString))" + Name="VirtViewer @VERSION@@BUILDID@ ($(var.ArchString)$(var.UserString))" Manufacturer="$(env.MANUFACTURER)" Version="$(var.Version)" UpgradeCode="$(var.UpgradeCode)"
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list