Skip to content

Commit

Permalink
Meson: modernize data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Sep 23, 2024
1 parent d9b5983 commit 8b49cc6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
33 changes: 20 additions & 13 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,42 @@ icon_sizes = ['24', '32', '48', '64', '128']

foreach i : icon_sizes
install_data(
join_paths('icons', i + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps'),
'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps',
rename: meson.project_name() + '.svg'
)
install_data(
join_paths('icons', i + '.svg'),
install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps'),
'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps',
rename: meson.project_name() + '.svg'
)
endforeach

install_data(
meson.project_name() + '.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
'taxi.gschema.xml',
rename: meson.project_name() + '.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)

i18n.merge_file(
input: meson.project_name() + '.desktop.in',
input: 'taxi.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: join_paths(meson.source_root(), 'po'),
po_dir: meson.source_root() / 'po',
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
install_dir: get_option('datadir') / 'applications'
)

i18n.merge_file(
input: meson.project_name() + '.appdata.xml.in',
output: meson.project_name() + '.appdata.xml',
po_dir: join_paths(meson.source_root(), 'po'),
input: 'taxi.metainfo.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: meson.source_root() / 'po',
type: 'xml',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
install_dir: get_option('datadir') / 'metainfo'
)

gresource = gnome.compile_resources(
'taxi-resources',
'css.gresource.xml'
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 1 addition & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ i18n = import('i18n')

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')

asresources = gnome.compile_resources(
'as-resources', 'data/css.gresource.xml',
source_dir: 'data',
c_name: 'as'
)

vala_lint = find_program('io.elementary.vala-lint', required : false)
if vala_lint.found()
test (
Expand All @@ -20,8 +14,8 @@ if vala_lint.found()
)
endif

subdir('src')
subdir('data')
subdir('src')
subdir('po')

meson.add_install_script('meson/post_install.py')
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ executable(
'Frontend/Widgets/OperationsPopover.vala',
'Frontend/Widgets/PathBarSeparator.vala',
'Frontend/Widgets/PathBar.vala',
asresources,
gresource,
dependencies: [
dependency('glib-2.0'),
dependency('gobject-2.0'),
Expand Down

0 comments on commit 8b49cc6

Please sign in to comment.