[virt-tools-list] [PATCH 04/12] msi: use spice-gtk conditionally

Fabiano Fidêncio fidencio at redhat.com
Tue Dec 23 00:01:57 UTC 2014


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

diff --git a/data/Makefile.am b/data/Makefile.am
index 4c5ff2c..52a1249 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -28,6 +28,12 @@ else
 HaveOVirt = False
 endif
 
+if HAVE_SPICE_GTK
+HaveSpiceGtk = True
+else
+HaveSpiceGtk = False
+endif
+
 deps.txt:
 	$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
 
@@ -52,6 +58,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=$(HaveSpiceGtk)				\
              -D HaveLibvirt=$(HaveLibvirt)				\
              -D HaveOVirt=$(HaveOVirt)					\
              --arch $(WIXL_ARCH)					\
diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
index d9af0e9..01e86a1 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) = "True"?>
       <?require spice-gtk.wxi?>
+    <?endif?>
       <?require gtk-vnc.wxi?>
   <?else?>
+    <?if $(var.HaveSpiceGtk) = "True"?>
       <?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) = "True"?>
+          <ComponentGroupRef Id="CG.spice-gtk"/>
+        <?endif?>
         <ComponentGroupRef Id="CG.gtk-vnc"/>
       <?else?>
-        <ComponentGroupRef Id="CG.spice-gtk3"/>
+        <?if $(var.HaveSpiceGtk) = "True"?>
+          <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