Merge branch 'trunk' of git.ddd.rip:zerica/audrey into trunk

This commit is contained in:
Erica Z 2024-10-15 22:53:39 +02:00
commit 86ca684643
5 changed files with 58 additions and 46 deletions

View file

@ -3,11 +3,11 @@ application_id = 'eu.callcc.audrey'
scalable_dir = 'hicolor' / 'scalable' / 'apps' scalable_dir = 'hicolor' / 'scalable' / 'apps'
install_data( install_data(
scalable_dir / ('@0@.svg').format(application_id), scalable_dir / ('@0@.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / scalable_dir install_dir: get_option('datadir') / 'icons' / scalable_dir,
) )
symbolic_dir = 'hicolor' / 'symbolic' / 'apps' symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
install_data( install_data(
symbolic_dir / ('@0@-symbolic.svg').format(application_id), symbolic_dir / ('@0@-symbolic.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / symbolic_dir install_dir: get_option('datadir') / 'icons' / symbolic_dir,
) )

View file

@ -4,7 +4,7 @@ desktop_file = i18n.merge_file(
type: 'desktop', type: 'desktop',
po_dir: '../po', po_dir: '../po',
install: true, install: true,
install_dir: get_option('datadir') / 'applications' install_dir: get_option('datadir') / 'applications',
) )
desktop_utils = find_program('desktop-file-validate', required: false) desktop_utils = find_program('desktop-file-validate', required: false)
@ -17,21 +17,31 @@ appstream_file = i18n.merge_file(
output: 'eu.callcc.audrey.metainfo.xml', output: 'eu.callcc.audrey.metainfo.xml',
po_dir: '../po', po_dir: '../po',
install: true, install: true,
install_dir: get_option('datadir') / 'metainfo' install_dir: get_option('datadir') / 'metainfo',
) )
appstreamcli = find_program('appstreamcli', required: false, disabler: true) appstreamcli = find_program('appstreamcli', required: false, disabler: true)
test('Validate appstream file', appstreamcli, test(
args: ['validate', '--no-net', '--explain', appstream_file]) 'Validate appstream file',
appstreamcli,
install_data('eu.callcc.audrey.gschema.xml', args: ['validate', '--no-net', '--explain', appstream_file],
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
) )
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) install_data(
test('Validate schema file', 'eu.callcc.audrey.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
)
compile_schemas = find_program(
'glib-compile-schemas',
required: false,
disabler: true,
)
test(
'Validate schema file',
compile_schemas, compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()]) args: ['--strict', '--dry-run', meson.current_source_dir()],
)
service_conf = configuration_data() service_conf = configuration_data()
@ -40,7 +50,7 @@ configure_file(
input: 'eu.callcc.audrey.service.in', input: 'eu.callcc.audrey.service.in',
output: 'eu.callcc.audrey.service', output: 'eu.callcc.audrey.service',
configuration: service_conf, configuration: service_conf,
install_dir: get_option('datadir') / 'dbus-1' / 'services' install_dir: get_option('datadir') / 'dbus-1' / 'services',
) )
subdir('icons') subdir('icons')

View file

@ -1,7 +1,9 @@
project('audrey', ['c', 'vala'], project(
'audrey',
['c', 'vala'],
version: '0.1.0', # AUDREY_VERSION version: '0.1.0', # AUDREY_VERSION
meson_version: '>= 1.0.0', meson_version: '>= 1.0.0',
default_options: [ 'warning_level=0', 'werror=false', ], default_options: ['warning_level=0', 'werror=false'],
) )
i18n = import('i18n') i18n = import('i18n')
@ -20,7 +22,10 @@ configure_file(output: 'config.h', configuration: config_h)
config_dep = valac.find_library('config', dirs: srcdir) config_dep = valac.find_library('config', dirs: srcdir)
config_inc = include_directories('.') config_inc = include_directories('.')
add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name () + '"', language: 'c') add_project_arguments(
'-DGETTEXT_PACKAGE="' + meson.project_name() + '"',
language: 'c',
)
subdir('data') subdir('data')

1
meson.format Normal file
View file

@ -0,0 +1 @@
indent_by = ' '

View file

@ -20,17 +20,10 @@ audrey_deps = [
dependency('sqlite3'), dependency('sqlite3'),
] ]
blueprints = custom_target('blueprints', blueprints = custom_target(
input: files( 'blueprints',
'ui/play_queue.blp', input: files('ui/play_queue.blp', 'ui/setup.blp', 'ui/window.blp'),
'ui/setup.blp', output: ['play_queue.ui', 'setup.ui', 'window.ui'],
'ui/window.blp',
),
output: [
'play_queue.ui',
'setup.ui',
'window.ui',
],
command: [ command: [
find_program('blueprint-compiler'), find_program('blueprint-compiler'),
'batch-compile', 'batch-compile',
@ -40,13 +33,16 @@ blueprints = custom_target('blueprints',
], ],
) )
audrey_sources += gnome.compile_resources('audrey-resources', audrey_sources += gnome.compile_resources(
'audrey-resources',
'audrey.gresource.xml', 'audrey.gresource.xml',
c_name: 'audrey', c_name: 'audrey',
dependencies: blueprints, dependencies: blueprints,
) )
executable('audrey', audrey_sources, executable(
'audrey',
audrey_sources,
dependencies: audrey_deps, dependencies: audrey_deps,
include_directories: config_inc, include_directories: config_inc,
install: true, install: true,