[virt-tools-list] [PATCH virt-viewer] win: add virt-viewer.msi build rule
Christophe Fergeau
cfergeau at redhat.com
Tue Feb 12 17:36:53 UTC 2013
Looks much better, but one of my comments in the previous review is still
pending.
Christophe
On Mon, Feb 11, 2013 at 07:32:26PM +0100, Marc-André Lureau wrote:
> In order to build the MSI, you will need msitools:
> http://ftp.gnome.org/pub/GNOME/sources/msitools/
> ---
> configure.ac | 1 +
> data/Makefile.am | 19 +++++++++-
> data/virt-viewer.wxs.in | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 111 insertions(+), 1 deletion(-)
> create mode 100644 data/virt-viewer.wxs.in
>
> diff --git a/configure.ac b/configure.ac
> index 30c2042..fb13ec7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -199,6 +199,7 @@ fi
> AC_CONFIG_FILES([
> Makefile
> data/Makefile
> + data/virt-viewer.wxs
> data/virt-viewer.nsis
> data/virt-viewer-debug.nsis
> icons/Makefile
> diff --git a/data/Makefile.am b/data/Makefile.am
> index 2c3d739..a9fbf03 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -2,6 +2,7 @@ NULL=
>
> EXTRA_DIST = \
> spice-xpi-client-remote-viewer \
> + virt-viewer.wxs.in \
> virt-viewer.nsis.in \
> virt-viewer-debug.nsis.in \
> $(NULL)
> @@ -16,7 +17,23 @@ virt-viewer-$(VERSION).exe: virt-viewer.nsis deps.txt
> makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
> rm -rf $$DESTDIR
>
> -CLEANFILES = deps.txt virt-viewer-$(VERSION).exe
> +
> +virt-viewer-$(VERSION).msi: virt-viewer.wxs deps.txt
> + $(AM_V_GEN)DESTDIR=`mktemp -d` && \
> + make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
> + find $$DESTDIR | wixl-heat -p $$DESTDIR$(prefix)/ \
> + --component-group CG.virt-viewer --var var.DESTDIR \
> + --directory-ref=INSTALLDIR > virt-viewer-files.wxs && \
> + wixl -D SourceDir=$(prefix) \
> + -D DESTDIR=$$DESTDIR$(prefix) -o $@ \
> + $< virt-viewer-files.wxs && \
> + rm -rf $$DESTDIR virt-viewer-files.wxs
> +
> +CLEANFILES = \
> + deps.txt \
> + virt-viewer-$(VERSION).exe \
> + virt-viewer-$(VERSION).msi \
> + $(NULL)
> endif
>
> -include $(top_srcdir)/git.mk
> diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
> new file mode 100644
> index 0000000..755cdb9
> --- /dev/null
> +++ b/data/virt-viewer.wxs.in
> @@ -0,0 +1,92 @@
> +<?xml version="1.0" encoding="utf-8"?>
> +
> +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
> +
> + <?require spice-gtk.wxi?>
> + <?require gtk-vnc.wxi?>
> + <?require libvirt.wxi?>
> +
> + <?define Version = "@VERSION@"?>
> + <?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?>
> + <Product Id="*" Name="VirtViewer" Manufacturer="Red Hat, Inc."
> + Version="$(var.Version)" UpgradeCode="$(var.UpgradeCode)"
> + Language="1033">
> +
> + <Package InstallerVersion="200" Compressed="yes" Comments="comments"/>
> + <Media Id="1" Cabinet="cabinet.cab" EmbedCab="yes"/>
> +
> + <Property Id="ARPHELPLINK" Value="http://www.spice-space.org"/>
> + <Property Id="ARPNOMODIFY" Value="1"/>
> + <Property Id="ARPNOREPAIR" Value="1"/>
> + <Property Id="ARPPRODUCTICON" Value="virt-viewer.ico"/>
> +<!-- <Property Id="ARPURLINFOABOUT" Value="http://www.spice-space.org/info"/> -->
> + <Upgrade Id="$(var.UpgradeCode)">
> + <UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
> + <UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
> + </Upgrade>
> + <Condition Message="VirtViewer is already installed.">NOT NEWERVERSIONDETECTED</Condition>
> +
> + <DirectoryRef Id="TARGETDIR">
> + <Component Id="CRegistryEntries" Guid="*">
> + <RegistryKey Root='HKLM' Key='Software\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{96190E9D-6FBB-64DB-9095-29F6FDE0B897}'>
> + <RegistryValue Type='string' Name='AppPath' Value='[INSTALLDIR]\bin'/>
> + <RegistryValue Type='string' Name='AppName' Value='remote-viewer.exe'/>
> + <RegistryValue Type='integer' Name='Policy' Value='3'/>
> + </RegistryKey>
> + <RegistryKey Root='HKLM' Key='Software\spice-space.org\spicex'>
> + <RegistryValue Type='string' Name='client' Value='[INSTALLDIR]\bin\remote-viewer.exe --spice-controller'/>
> + </RegistryKey>
> + </Component>
> + <Component Id="CProgIds" Guid="89D6F46D-9C5E-4D65-8456-58FC361E553E">
> + <ProgId Id='VirtViewer.vvfile' Description='VirtViewer connection file'>
> + <Extension Id='vv' ContentType='application/x-virt-viewer'>
> + <Verb Id='open' Command='Open' TargetFile='fil808B4A5BAB4ACD727D3823632E798743' Argument='"%1"' />
> + <MIME ContentType="application/x-virt-viewer" Default="yes"/>
> + </Extension>
> + </ProgId>
> + </Component>
> + </DirectoryRef>
> +
> + <Directory Id="TARGETDIR" Name="SourceDir">
> + <Directory Id="ProgramFilesFolder">
> + <Directory Id="INSTALLDIR" Name="VirtViewer">
> + <Component Id="CDepsFile" Guid="*">
> + <File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="deps.txt"/>
> + </Component>
> + </Directory>
> + </Directory>
> + <Directory Id="ProgramMenuFolder">
> + <Directory Id="MENUDIR" Name="VirtViewer"/>
> + </Directory>
> + </Directory>
> +
> + <DirectoryRef Id="MENUDIR">
> + <Component Id="CShortcut" Guid="*">
> + <Shortcut Id="ApplicationStartMenuShortcut"
> + Name="Remote viewer"
> + Description="A SPICE/VNC client"
> + Target="[INSTALLDIR]\bin\remote-viewer.exe"
> + Icon="virt-viewer.ico"/>
> + <RemoveFolder Id="MENUDIR" On="uninstall"/>
> + <RegistryValue Root="HKCU" Key="Software\VirtViewer\remote-viewer-shortcut" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
> + </Component>
> + </DirectoryRef>
> +
> + <Feature Id="Complete" Level="1">
> + <ComponentGroupRef Id="CG.spice-gtk"/>
> + <ComponentGroupRef Id="CG.libvirt"/>
> + <ComponentGroupRef Id="CG.gtk-vnc"/>
> + <ComponentGroupRef Id="CG.virt-viewer"/>
> + <ComponentRef Id="CDepsFile"/>
> + <ComponentRef Id="CShortcut"/>
> + <ComponentRef Id="CRegistryEntries"/>
> + <ComponentRef Id="CProgIds"/>
> + </Feature>
> +
> + <InstallExecuteSequence>
> + <RemoveExistingProducts After="InstallValidate"/>
> + </InstallExecuteSequence>
> +
> + <Icon Id="virt-viewer.ico" SourceFile="virt-viewer.ico"/>
> + </Product>
> +</Wix>
> --
> 1.8.1.1.439.g50a6b54
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130212/be7edf58/attachment.sig>
More information about the virt-tools-list
mailing list