1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
icon_sizes = ['16', '24', '32', '48', '64', '128']
icons_dir = join_paths(get_option('datadir'), 'icons', 'hicolor')
foreach size : icon_sizes
asset = join_paths('assets', 'icons', '@0@x@0@'.format(size), '@0@.svg'.format(meson.project_name()))
install_data(
asset,
install_dir: join_paths(icons_dir, '@0@x@0@'.format(size), 'apps'),
rename: '@0@.svg'.format(application_id)
)
install_data(
asset,
install_dir: join_paths(icons_dir, '@0@x@0@@2'.format(size), 'apps'),
rename: '@0@.svg'.format(application_id)
)
endforeach
install_data(
join_paths('assets', 'icons', '128x128', '@0@.svg'.format(meson.project_name())),
install_dir: join_paths(icons_dir , 'scalable', 'apps'),
rename: '@0@.svg'.format(application_id)
)
install_data(
join_paths('assets', 'icons', 'status', 'table.svg'),
install_dir: join_paths(icons_dir , '16x16', 'status'),
)
install_data(
join_paths('assets', 'icons', 'status', 'table-empty.svg'),
install_dir: join_paths(icons_dir , '16x16', 'status'),
)
install_data(
join_paths('assets', 'icons', 'actions', 'office-database-new.svg'),
install_dir: join_paths(icons_dir , '24x24', 'actions'),
)
install_data(
join_paths('assets', 'icons', 'actions', 'office-database-remove.svg'),
install_dir: join_paths(icons_dir , '24x24', 'actions'),
)
install_data(
join_paths('assets', 'icons', 'actions', 'office-database-edit.svg'),
install_dir: join_paths(icons_dir , '24x24', 'actions'),
)
install_data(
join_paths('assets', 'icons', 'actions', 'application-logout.svg'),
install_dir: join_paths(icons_dir , '24x24', 'actions'),
)
# Install the Desktop file
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_conf.set('binary', application_id)
desktop_file = i18n.merge_file(
input: configure_file(
input: '@0@.desktop.in.in'.format(meson.project_name()),
output: '@0@.desktop.in'.format(application_id),
configuration: desktop_conf
),
output:'@0@.desktop'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po', 'extra'),
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
# Validate desktop file
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file.full_path()
]
)
endif
# Install the AppData file
appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)
appdata_file = i18n.merge_file(
input: configure_file(
input: '@0@.appdata.xml.in.in'.format(meson.project_name()),
output: '@0@.appdata.xml.in'.format(application_id),
configuration: appdata_conf
),
output: '@0@.appdata.xml'.format(application_id),
po_dir: join_paths(meson.source_root(), 'po'),
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
# Validate AppData file
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate-relax', appdata_file.full_path()
]
)
endif
|