Move resources to data

This commit is contained in:
Elias Projahn 2023-07-06 18:29:33 +02:00
parent 25eb7591f8
commit 3f1a9a5756
5 changed files with 19 additions and 17 deletions

View file

@ -1,21 +1,4 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
gnome = import('gnome')
blueprints = custom_target('blueprints',
input: files(
'window.blp'
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
gnome.compile_resources('musicus',
'musicus.gresource.xml',
dependencies: blueprints,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
conf = configuration_data()
conf.set_quoted('VERSION', meson.project_version())

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/de/johrpan/musicus">
<file preprocess="xml-stripblanks">window.ui</file>
</gresource>
</gresources>

View file

@ -1,36 +0,0 @@
using Gtk 4.0;
using Adw 1;
template $MusicusWindow : Adw.ApplicationWindow {
default-width: 600;
default-height: 300;
Box {
orientation: vertical;
HeaderBar header_bar {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
}
}
Label label {
label: _("Hello, World!");
vexpand: true;
styles ["title-1"]
}
}
}
menu primary_menu {
item {
label: _("_Preferences");
action: "app.preferences";
}
item {
label: _("_About Musicus");
action: "app.about";
}
}