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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
autostart_files = [
'gnome-initial-setup-copy-worker.desktop',
'gnome-initial-setup-first-login.desktop',
'gnome-welcome-tour.desktop'
]
gis_shell_component = 'org.gnome.Shell'
gis_gnome_session_required_components = [
'org.gnome.SettingsDaemon.A11ySettings',
'org.gnome.SettingsDaemon.Color',
'org.gnome.SettingsDaemon.Datetime',
'org.gnome.SettingsDaemon.Housekeeping',
'org.gnome.SettingsDaemon.Keyboard',
'org.gnome.SettingsDaemon.MediaKeys',
'org.gnome.SettingsDaemon.Power',
'org.gnome.SettingsDaemon.PrintNotifications',
'org.gnome.SettingsDaemon.Rfkill',
'org.gnome.SettingsDaemon.ScreensaverProxy',
'org.gnome.SettingsDaemon.Sharing',
'org.gnome.SettingsDaemon.Smartcard',
'org.gnome.SettingsDaemon.Sound',
'org.gnome.SettingsDaemon.UsbProtection',
'org.gnome.SettingsDaemon.Wacom',
'org.gnome.SettingsDaemon.XSettings',
]
gis_user_session_wanted_components = gis_gnome_session_required_components
desktop_conf = configuration_data()
desktop_conf.set('LIBEXECDIR', libexec_dir)
desktop_conf.set('systemd_hidden', enable_systemd ? 'true' : 'false')
foreach desktop_file: autostart_files
i18n.merge_file(
'desktop',
input: configure_file(
input: files(desktop_file + '.in.in'),
output: desktop_file + '.in',
configuration: desktop_conf
),
output: desktop_file,
install_dir: join_paths(get_option('sysconfdir'), 'xdg', 'autostart'),
po_dir: po_dir,
install: true,
type: 'desktop'
)
endforeach
i18n.merge_file(
'desktop',
input: configure_file(
input: files('gnome-initial-setup.desktop.in.in'),
output: 'gnome-initial-setup.desktop.in',
configuration: desktop_conf
),
output: 'gnome-initial-setup.desktop',
install_dir: join_paths(data_dir, 'gdm', 'greeter', 'applications'),
po_dir: po_dir,
install: true,
type: 'desktop'
)
if enable_systemd
unitconf = configuration_data()
unitconf.set('libexecdir', libexec_dir)
unit_files = {
'gnome-initial-setup-first-login.service' : [ 'gnome-session.target.wants/' ],
'gnome-initial-setup-copy-worker.service' : [ 'gnome-session.target.wants/' ],
'gnome-welcome-tour.service' : [ 'gnome-session.target.wants/' ],
}
foreach unit, wants: unit_files
configure_file(
input: unit + '.in',
output: unit,
configuration: unitconf,
install_dir: systemd_userunitdir
)
foreach target: wants
meson.add_install_script('meson-add-wants.sh', systemd_userunitdir, target, unit)
endforeach
endforeach
gis_user_session_wanted_targets = []
foreach component: gis_user_session_wanted_components
gis_user_session_wanted_targets += 'Wants=@0@.target'.format(component)
endforeach
configure_file(
input: '@0@.session.conf.in'.format(meson.project_name()),
output: 'session.conf',
configuration: {
'this_component': meson.project_name(),
'requires_component': gis_shell_component,
'wants_required_components': '\n'.join(
gis_user_session_wanted_targets),
},
install_dir: systemd_userunitdir / 'gnome-session@@0@.target.d'.format(
meson.project_name()),
)
endif
rules_dir = join_paths(data_dir, 'polkit-1', 'rules.d')
install_data('20-gnome-initial-setup.rules', install_dir: rules_dir)
session_dir = join_paths(data_dir, 'gnome-session', 'sessions')
configure_file(
input: '@0@.session.in'.format(meson.project_name()),
output: '@BASENAME@',
configuration: {
'this_component': meson.project_name(),
'gnome_session_required_components': ';'.join([
gis_shell_component,
meson.project_name(),
] +
gis_gnome_session_required_components),
},
install_dir: session_dir,
)
mode_dir = join_paths(data_dir, 'gnome-shell', 'modes')
install_data('initial-setup.json', install_dir: mode_dir)
install_data('gnome-welcome-tour', install_dir: get_option('libexecdir'))
|