aports/community/avizo/unbundle-images.patch
2022-01-09 03:35:48 +01:00

61 lines
2.1 KiB
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Fri, 7 Jan 2022 21:32:41 +0100
Subject: [PATCH] Unbundle images and install them to /usr/share/avizo
Bundling images into executable is nasty and inefficient.
diff --git a/avizo.gresource.xml b/avizo.gresource.xml
index 53e4c0f..fab2d1a 100644
--- a/avizo.gresource.xml
+++ b/avizo.gresource.xml
@@ -2,16 +2,5 @@
<gresources>
<gresource prefix="/org/danb/avizo">
<file preprocess="xml-stripblanks">ui/avizo.ui</file>
-
- <file preprocess="to-pixdata">data/images/volume_muted.png</file>
- <file preprocess="to-pixdata">data/images/volume_low.png</file>
- <file preprocess="to-pixdata">data/images/volume_medium.png</file>
- <file preprocess="to-pixdata">data/images/volume_high.png</file>
- <file preprocess="to-pixdata">data/images/mic_muted.png</file>
- <file preprocess="to-pixdata">data/images/mic_unmuted.png</file>
-
- <file preprocess="to-pixdata">data/images/brightness_low.png</file>
- <file preprocess="to-pixdata">data/images/brightness_medium.png</file>
- <file preprocess="to-pixdata">data/images/brightness_high.png</file>
</gresource>
</gresources>
diff --git a/data/meson.build b/data/meson.build
index e69de29..3edf369 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -0,0 +1,14 @@
+png_images = files(
+ 'images/brightness_high.png',
+ 'images/brightness_low.png',
+ 'images/brightness_medium.png',
+ 'images/brightness.png',
+ 'images/mic_muted.png',
+ 'images/mic_unmuted.png',
+ 'images/volume_high.png',
+ 'images/volume_low.png',
+ 'images/volume_medium.png',
+ 'images/volume_muted.png',
+)
+
+install_data(png_images, install_dir: 'share/avizo')
diff --git a/src/avizo_client.vala b/src/avizo_client.vala
index 95ac4fd..fa785f2 100644
--- a/src/avizo_client.vala
+++ b/src/avizo_client.vala
@@ -138,7 +138,8 @@ public class AvizoClient : GLib.Application
}
else
{
- _service.image_resource = _image_resource;
+ // XXX-Patched: don't bundle images into avizo-service binary
+ _service.image_path = @"/usr/share/avizo/$(_image_resource).png";
}
_service.progress = _progress;