I’ve been trying to learn how to create a GTK4 application using Vala, so far so good… But I’m facing problems when it comes to include the resource files…
This is the meson.build at the data directory:
resource_files = files('hola-mundo-gresource.xml')
resources = gnome.compile_resources(application_id, resource_files,
c_name: 'resources'
)
And this is the meson.build located at the src directory:
hola_mundo_sources =[
resources,
'Main.vala',
'HolaMundo.vala',
'Window.vala',
]
hola_mundo_args = [
'--gresources', resource_files,
]
dependencies = [
dependency ('glib-2.0'),
dependency ('gobject-2.0'),
dependency ('gtk4'),
]
executable ('hola-mundo', hola_mundo_sources,
dependencies: dependencies,
c_args: [ '-DGETTEXT_PACKAGE="co.edu.uniquindio.HolaMundoGTK4"'],
vala_args: hola_mundo_args,
install: true
)
But when I try to build…
src/meson.build:1:0: ERROR: Unknown variable "resources".
It doesn’t seem to be able to find any resources variable yet I declared it in the data directory… I don’t know what am I doing wrong…
Any clue…?