From a8260d3876389eb52ca5c62ed4d80cdb7e025c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 10 Jan 2019 12:00:45 +0000 Subject: ui: install logo icons to $prefix/share/icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU currently installs logos to $prefix/share/qemu/ which means no GUI toolkit or applications can find them by default. The accepted standards for desktop applications declare that application logos / icons should be installed under $prefix/share/icons, so use this directory location. Pre-rendered icons are provided at the standard sizes expected for GUI applications, along with the scalable SVG, to ensure maximum portability. The PNGs are rendered from the SVG using inkscape, however, this is not wired up into the default make rules to avoid requiring inkscape as a mandatory tool in build systems / developer workstations. Signed-off-by: Daniel P. Berrangé Message-id: 20190110120047.25369-2-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dccba1dca2..e4218d1192 100644 --- a/Makefile +++ b/Makefile @@ -667,7 +667,6 @@ pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \ efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \ efi-e1000e.rom efi-vmxnet3.rom \ -qemu-icon.bmp qemu_logo_no_text.svg \ bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \ multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin \ s390-ccw.img s390-netboot.img \ @@ -720,6 +719,7 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif +ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir ifneq ($(TOOLS),) @@ -741,6 +741,17 @@ ifneq ($(BLOBS),) $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ done endif + for s in $(ICON_SIZES); do \ + mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps"; \ + $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \ + "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \ + done; \ + mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps"; \ + $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \ + "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \ + mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps"; \ + $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \ + "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps/qemu.svg" ifdef CONFIG_GTK $(MAKE) -C po $@ endif -- cgit v1.2.3