Re: [PATCH win-vdagent] Learn to build spice-vdagent MSI installer

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

 



On Mon, Feb 17, 2014 at 05:41:55PM +0100, Marc-André Lureau wrote:
> ---
>  Makefile.am          | 23 +++++++++++++++-
>  configure.ac         | 30 ++++++++++++++++++++
>  spice-vdagent.wxs.in | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 130 insertions(+), 1 deletion(-)
>  create mode 100644 spice-vdagent.wxs.in
> 
> diff --git a/Makefile.am b/Makefile.am
> index 749ef56..9fa9f14 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,4 +1,5 @@
>  NULL =
> +EXTRA_DIST =
>  MAINTAINERCLEANFILES =
>  
>  DIST_SUBDIRS = spice-protocol
> @@ -61,8 +62,28 @@ vdservice_rc.$(OBJEXT): vdservice/vdservice.rc
>  
>  MAINTAINERCLEANFILES += vdservice_rc.$(OBJEXT)
>  
> +deps.txt:
> +	$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
>  
> -EXTRA_DIST =			\
> +MANUFACTURER = The Spice Project
> +
> +EXTRA_DIST += spice-vdagent.wxs.in
> +CONFIG_STATUS_DEPENDENCIES = spice-vdagent.wxs.in
> +
> +spice-vdagent-$(WIXL_ARCH)-$(VERSION)$(BUILDID).msi: spice-vdagent.wxs deps.txt all
> +	$(AM_V_GEN)DESTDIR=`mktemp -d`&&				\
> +	make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null &&	\
> +	MANUFACTURER="$(MANUFACTURER)" wixl -D SourceDir=$(prefix)	\
> +	  -D DESTDIR=$$DESTDIR$(prefix)					\
> +	  --arch $(WIXL_ARCH)  -o $@ $<
> +
> +msi: spice-vdagent-$(WIXL_ARCH)-$(VERSION)$(BUILDID).msi
> +
> +CLEANFILES = spice-vdagent-$(WIXL_ARCH)-$(VERSION)$(BUILDID).msi
> +
> +.PHONY: msi
> +
> +EXTRA_DIST +=			\
>  	$(top_srcdir)/.version	\
>  	tests/clipboard.py	\
>  	vdagent.sln		\
> diff --git a/configure.ac b/configure.ac
> index 12329b4..7f6511d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -9,11 +9,30 @@ AC_CONFIG_SRCDIR([vdagent])
>  AC_CONFIG_HEADERS([config.h])
>  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_SILENT_RULES([yes])
>  
> +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])
> +

Would be better if this part of configure.ac was closer to what
virt-viewer is doing. Looks good otherwise (though I did not look at the
.wxs file in details).

Christophe

Attachment: pgpCKCyn3xLur.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]