Custom Resources
Include additional resources with your app like icons or CSS files using GResource
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="io/github/myteam/myapp">
</gresource>
</gresources># Include the GNOME module
gnome = import('gnome')
# Tell meson where to find our resources file and to compile it as a GResource
gresource = gnome.compile_resources(
'gresource',
'data' / 'gresource.xml',
source_dir: 'data'
)
# Add the gresource to the executable step to be build into the app binary
executable(
meson.project_name(),
gresource,
'src' / 'Application.vala',
dependencies: [
dependency('gtk4')
],
install: true
)Icons
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="io/github/myteam/myapp/icons">
<file compressed="true" preprocess="xml-stripblanks">custom-icon.svg</file>
</gresource>
</gresources>Last updated
Was this helpful?