[virt-tools-list] [PATCH 02/12] msi: use libvirt conditionally
Fabiano Fidêncio
fidencio at redhat.com
Tue Dec 23 00:01:55 UTC 2014
Only include libvirt as dep when it's explicitly done in the configure.
---
data/Makefile.am | 7 +++++++
data/virt-viewer.wxs.in | 8 ++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/data/Makefile.am b/data/Makefile.am
index b9a928f..5f1e4ee 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,6 +16,12 @@ all-local: adwaita-icons-needed.wxi virt-viewer.wxs virt-viewer.nsis virt-viewer
if OS_WIN32
+if HAVE_LIBVIRT
+HaveLibvirt = True
+else
+HaveLibvirt = False
+endif
+
deps.txt:
$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
@@ -40,6 +46,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 HaveLibvirt=$(HaveLibvirt) \
--arch $(WIXL_ARCH) \
-o $@ \
$< virt-viewer-files.wxs && \
diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
index cc5b2fa..3db7813 100644
--- a/data/virt-viewer.wxs.in
+++ b/data/virt-viewer.wxs.in
@@ -24,7 +24,9 @@
<?require gtk-vnc2.wxi?>
<?require adwaita-icons-needed.wxi?>
<?endif?>
- <?require libvirt.wxi?>
+ <?if $(var.HaveLibvirt) = "True"?>
+ <?require libvirt.wxi?>
+ <?endif?>
<?require libgovirt.wxi?>
<?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?>
@@ -127,7 +129,9 @@
<ComponentGroupRef Id="CG.gtk-vnc2"/>
<ComponentGroupRef Id="CG.adwaita-icons-needed"/>
<?endif?>
- <ComponentGroupRef Id="CG.libvirt"/>
+ <?if $(var.HaveLibvirt) = "True"?>
+ <ComponentGroupRef Id="CG.libvirt"/>
+ <?endif?>
<ComponentGroupRef Id="CG.libgovirt"/>
<ComponentGroupRef Id="CG.virt-viewer"/>
<ComponentRef Id="CDepsFile"/>
--
2.1.0
More information about the virt-tools-list
mailing list