virt-viewer/data/Makefile.am
Fabiano Fidêncio c3179a4c69 msi: add gtk3 support
Add support to build the virt-viewer's msi using GTK3.
For the GTK3 build, in order to provide all used icons for Windows
systems we have to include manually all the icons we want to or add
adwaita-icon-theme as dependency. I've decided to go with the first
approach, what can be improved when we have "foreach" support in
msitools (https://bugzilla.gnome.org/show_bug.cgi?id=741296).
2014-12-15 17:36:10 +01:00

86 lines
2.5 KiB
Makefile

NULL =
CLEANFILES =
MANUFACTURER = Virt Manager Project
EXTRA_DIST = \
spice-xpi-client-remote-viewer \
adwaita-icons-needed.wxi.in \
virt-viewer.wxs.in \
virt-viewer.nsis.in \
virt-viewer-debug.nsis.in \
$(NULL)
# this make sure those files are regenerated when they change
# (in maintainer-mode)
all-local: adwaita-icons-needed.wxi virt-viewer.wxs virt-viewer.nsis virt-viewer-debug.nsis
if OS_WIN32
deps.txt:
$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
virt-viewer-$(VERSION).exe: virt-viewer.nsis deps.txt
$(AM_V_GEN)DESTDIR=`mktemp -d` && \
make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
makensis -NOCD -DDESTDIR=$$DESTDIR -DGTK_VERSION=$(GTK_API_VERSION) $< >/dev/null && \
rm -rf $$DESTDIR
virt-viewer-debug-$(VERSION).exe: virt-viewer-debug.nsis
$(AM_V_GEN)DESTDIR=`mktemp -d` && \
make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
rm -rf $$DESTDIR
virt-viewer-$(WIXL_ARCH)-$(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 && \
MANUFACTURER="$(MANUFACTURER)" wixl -D SourceDir=$(prefix) \
-D DESTDIR=$$DESTDIR$(prefix) \
-D GtkVersion=${GTK_API_VERSION} \
--arch $(WIXL_ARCH) \
-o $@ \
$< virt-viewer-files.wxs && \
rm -rf $$DESTDIR virt-viewer-files.wxs
msi: virt-viewer-$(WIXL_ARCH)-$(VERSION).msi
CLEANFILES += \
deps.txt \
virt-viewer-$(VERSION).exe \
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi \
$(NULL)
else #!WIN32
desktopdir = $(datadir)/applications
DESKTOPFILES = remote-viewer.desktop.in
desktop_DATA = $(DESKTOPFILES:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
MIMEFILES = virt-viewer-mime.xml.in
mimedir = $(datadir)/mime/packages
mime_DATA = virt-viewer-mime.xml
@INTLTOOL_XML_RULE@
install-data-hook:
if ENABLE_UPDATE_MIMEDB
@if $(AM_V_P); then set -x; else echo " INSTALL update-mime-database"; fi; \
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime";
endif
uninstall-hook:
if ENABLE_UPDATE_MIMEDB
@if $(AM_V_P); then set -x; else echo " UNINSTALL update-mime-database"; fi; \
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime";
endif
CLEANFILES += $(mime_DATA) $(desktop_DATA)
EXTRA_DIST += $(MIMEFILES) $(DESKTOPFILES)
endif
-include $(top_srcdir)/git.mk