[virt-tools-list] [PATCH 3/4] msi: use spice-gtk conditionally

Fabiano Fidêncio fidencio at redhat.com
Wed Dec 17 10:36:18 UTC 2014


Only include spice-gtk as dep when it's explicitly done in the configure.
---
 data/Makefile.am        |  1 +
 data/virt-viewer.wxs.in | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index 1bd2183..de1fde1 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -40,6 +40,7 @@ virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
 	MANUFACTURER="$(MANUFACTURER)" wixl -D SourceDir=$(prefix)	\
              -D DESTDIR=$$DESTDIR$(prefix)				\
              -D GtkVersion=${GTK_API_VERSION}				\
+             -D HaveSpiceGtk=${HAVE_SPICE_GTK}				\
              -D HaveLibvirt=${HAVE_LIBVIRT}				\
              -D HaveOVirt=${HAVE_OVIRT}					\
              --arch $(WIXL_ARCH)					\
diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
index 7faac05..7cad9fa 100644
--- a/data/virt-viewer.wxs.in
+++ b/data/virt-viewer.wxs.in
@@ -17,10 +17,14 @@
   <?endif?>
 
   <?if $(var.GtkVersion) = "2.0"?>
+    <?if $(var.HaveSpiceGtk) = "1"?>
       <?require spice-gtk.wxi?>
+    <?endif?>
       <?require gtk-vnc.wxi?>
   <?else?>
+    <?if $(var.HaveSpiceGtk) = "1"?>
       <?require spice-gtk3.wxi?>
+    <?endif?>
       <?require gtk-vnc2.wxi?>
       <?require adwaita-icons-needed.wxi?>
   <?endif?>
@@ -124,10 +128,14 @@
 
     <Feature Id="Complete"  Level="1">
       <?if $(var.GtkVersion) = "2.0"?>
-        <ComponentGroupRef Id="CG.spice-gtk"/>
+        <?if $(var.HaveSpiceGtk) = "1"?>
+          <ComponentGroupRef Id="CG.spice-gtk"/>
+        <?endif?>
         <ComponentGroupRef Id="CG.gtk-vnc"/>
       <?else?>
-        <ComponentGroupRef Id="CG.spice-gtk3"/>
+        <?if $(var.HaveSpiceGtk) = "1"?>
+          <ComponentGroupRef Id="CG.spice-gtk3"/>
+        <?endif?>
         <ComponentGroupRef Id="CG.gtk-vnc2"/>
         <ComponentGroupRef Id="CG.adwaita-icons-needed"/>
       <?endif?>
-- 
2.1.0




More information about the virt-tools-list mailing list