forked from elementary/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
89 lines (76 loc) · 2.51 KB
/
meson.build
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
icon_sizes = ['16', '24', '32', '48', '64', '128']
foreach i : icon_sizes
install_data(
'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps',
rename: meson.project_name() + '.svg'
)
install_data(
'icons' / i + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps',
rename: meson.project_name() + '.svg'
)
endforeach
install_data([
'styles/elementary-dark.xml',
'styles/elementary-light.xml',
], install_dir: get_option('datadir') / 'gtksourceview-4' / 'styles')
install_data([
'fonts/BuilderBlocks.ttf',
], install_dir: get_option('datadir') / meson.project_name() / 'fonts')
install_data(
'io.elementary.code.gschema.xml',
'io.elementary.code.plugins.spell.gschema.xml',
install_dir: get_option('prefix') / get_option('datadir') / 'glib-2.0' / 'schemas'
)
config_data = configuration_data()
config_data.set('EXEC_NAME', meson.project_name())
if (branch != '')
config_data.set('NAME', 'Code - ' + branch)
else
config_data.set('NAME', 'Code')
endif
# Set the executable name and translate the desktop files
desktop_in_file = configure_file(
input: 'io.elementary.code.desktop.in.in',
output: '@BASENAME@',
configuration: config_data
)
desktop_file = i18n.merge_file(
input: desktop_in_file,
output: 'io.elementary.code.desktop',
po_dir: meson.project_source_root () / 'po' / 'extra',
type: 'desktop',
install_dir: get_option('datadir') / 'applications',
install: true
)
i18n.merge_file(
input: 'code.metainfo.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'xml',
install: true,
install_dir: get_option('datadir') / 'metainfo',
)
config_data = configuration_data()
config_data.set('install_prefix', get_option('prefix'))
config_data.set('bin_dir', get_option('bindir'))
config_data.set('exec_name', meson.project_name())
if get_option ('have_pkexec')
policy_in = configure_file(
input: 'code.policy.in.in',
output: meson.project_name() + '.policy.in',
configuration: config_data,
install: false,
)
i18n.merge_file(
input: policy_in,
output: meson.project_name() + '.policy',
po_dir: meson.project_source_root () / 'po' / 'extra',
install: true,
install_dir: get_option('datadir') / 'polkit-1' / 'actions',
)
endif
install_man(
'io.elementary.code.1'
)