use resources instead of direct ui-file loading
This commit is contained in:
parent
7e7c0a3ce5
commit
397f225fa8
4
data/meson.build
Normal file
4
data/meson.build
Normal file
@ -0,0 +1,4 @@
|
||||
yggtk_resources = gnome.compile_resources(
|
||||
'yggtk-resources',
|
||||
'org.yggtk.yggtk.gresource.xml'
|
||||
)
|
6
data/org.yggtk.yggtk.gresource.xml
Normal file
6
data/org.yggtk.yggtk.gresource.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="org/yggtk/yggtk">
|
||||
<file preprocess="xml-stripblanks">ui/main.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
@ -22,7 +22,7 @@ int main (string[] args) {
|
||||
try {
|
||||
|
||||
var builder = new Builder ();
|
||||
builder.add_from_file ("main.ui");
|
||||
builder.add_from_resource ("/org/yggtk/yggtk/ui/main.ui");
|
||||
builder.connect_signals (null);
|
||||
var window = builder.get_object ("window") as Window;
|
||||
var browse = builder.get_object ("browse") as Button;
|
||||
|
@ -5,14 +5,21 @@ project(
|
||||
)
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
gnome = import('gnome')
|
||||
|
||||
subdir('data')
|
||||
|
||||
yggtk = executable(
|
||||
meson.project_name(),
|
||||
[
|
||||
'main.vala',
|
||||
],
|
||||
] + yggtk_resources,
|
||||
dependencies: [
|
||||
dependency('gtk+-3.0'),
|
||||
dependency('json-glib-1.0'),
|
||||
],
|
||||
vala_args: [
|
||||
'--gresources',
|
||||
join_paths(meson.source_root(), 'data', 'org.yggtk.yggtk.gresource.xml'),
|
||||
]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user