From 979eab69f2dc588dd5cf1238c1666ec2c6775274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 22 Dec 2014 17:35:21 +0100 Subject: [PATCH] nsis: use libgovirt conditionally Only include libgovirt as dep when it's explicitly done in the configure. --- data/Makefile.am | 1 + data/virt-viewer.nsis.in | 40 ++++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/data/Makefile.am b/data/Makefile.am index f5e71d3..02b9cd4 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -50,6 +50,7 @@ virt-viewer-$(VERSION).exe: virt-viewer.nsis deps.txt -DDESTDIR=$$DESTDIR \ -DGTK_VERSION=$(GTK_API_VERSION) \ -DHaveLibvirt=$(HaveLibvirt) \ + -DHaveOVirt=$(HaveOVirt) \ $< >/dev/null && \ rm -rf $$DESTDIR diff --git a/data/virt-viewer.nsis.in b/data/virt-viewer.nsis.in index 5344139..6581e65 100755 --- a/data/virt-viewer.nsis.in +++ b/data/virt-viewer.nsis.in @@ -171,12 +171,14 @@ Section "VirtViewer" File /nonfatal "@prefix@/bin/libgcc_s_seh-1.dll" #libgovirt (and its dependencies) - File "@prefix@/bin/libgovirt-2.dll" - File "@prefix@/bin/librest-0.7-0.dll" - File "@prefix@/bin/librest-extras-0.7-0.dll" - File "@prefix@/bin/libsoup-2.4-1.dll" - File "@prefix@/bin/libsqlite3-0.dll" - File "@prefix@/bin/libsoup-gnome-2.4-1.dll" + !if ${HaveOVirt} == True + File "@prefix@/bin/libgovirt-2.dll" + File "@prefix@/bin/librest-0.7-0.dll" + File "@prefix@/bin/librest-extras-0.7-0.dll" + File "@prefix@/bin/libsoup-2.4-1.dll" + File "@prefix@/bin/libsqlite3-0.dll" + File "@prefix@/bin/libsoup-gnome-2.4-1.dll" + !endif File "@prefix@/bin/pango-querymodules.exe" File /oname=remote-viewer.com "${DESTDIR}@prefix@/bin/windows-cmdline-wrapper.exe" @@ -223,8 +225,10 @@ Section "VirtViewer" File "@prefix@/lib/gstreamer-0.10/libgstdirectsoundsink.dll" File "@prefix@/lib/gstreamer-0.10/libgstdirectsoundsrc.dll" - SetOutPath "$INSTDIR\lib\gio\modules" - File "@prefix@/lib/gio/modules/libgiognutls.dll" + !if ${HaveOVirt} == True + SetOutPath "$INSTDIR\lib\gio\modules" + File "@prefix@/lib/gio/modules/libgiognutls.dll" + !endif SetOutPath "$INSTDIR\share" !if ${HaveLibvirt} == True @@ -634,15 +638,19 @@ Section "Uninstall" Delete /rebootok "$INSTDIR\bin\libcairo-gobject-2.dll" !endif Delete /rebootok "$INSTDIR\bin\libatk-1.0-0.dll" - Delete /rebootok "$INSTDIR\bin\libgovirt-2.dll" - Delete /rebootok "$INSTDIR\bin\librest-0.7-0.dll" - Delete /rebootok "$INSTDIR\bin\librest-extras-0.7-0.dll" - Delete /rebootok "$INSTDIR\bin\libsoup-2.4-1.dll" - Delete /rebootok "$INSTDIR\bin\libsqlite3-0.dll" - Delete /rebootok "$INSTDIR\bin\libsoup-gnome-2.4-1.dll" + !if ${HaveOVirt} == True + Delete /rebootok "$INSTDIR\bin\libgovirt-2.dll" + Delete /rebootok "$INSTDIR\bin\librest-0.7-0.dll" + Delete /rebootok "$INSTDIR\bin\librest-extras-0.7-0.dll" + Delete /rebootok "$INSTDIR\bin\libsoup-2.4-1.dll" + Delete /rebootok "$INSTDIR\bin\libsqlite3-0.dll" + Delete /rebootok "$INSTDIR\bin\libsoup-gnome-2.4-1.dll" + !endif - Delete /rebootok "$INSTDIR\lib\gio\modules\libgiognutls.dll" - RMDir /r "$INSTDIR\lib\gio" + !if ${HaveOVirt} == True + Delete /rebootok "$INSTDIR\lib\gio\modules\libgiognutls.dll" + RMDir /r "$INSTDIR\lib\gio" + !endif RMDir "$INSTDIR\bin" RMDir "$INSTDIR\lib"