forked from lutris/lutris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
79 lines (67 loc) · 1.62 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
project(
'lutris',
license: 'GPL-3.0-or-later'
)
# Find Python installation
python = import('python').find_installation()
# Set folders
prefix = get_option('prefix')
bindir = get_option('bindir')
pylibdir = python.get_install_dir()
datadir = get_option('datadir')
localedir = get_option('localedir')
mandir = get_option('mandir')
lutrisdir = join_paths(pylibdir, 'lutris')
podir = join_paths(meson.source_root(), 'po')
# Generate configuration files
config = configuration_data()
config.set('localedir_path', join_paths(prefix, localedir))
configure_file(
input: 'optional_settings.py.in',
output: 'optional_settings.py',
configuration: config,
install: true,
install_dir: lutrisdir,
)
# Translations
subdir('po')
# Do installation
install_data(
files('bin/lutris'),
install_dir: bindir,
install_mode: 'rwxr-xr-x',
)
install_subdir(
'lutris',
install_dir: pylibdir,
)
install_subdir(
'share/icons',
install_dir: join_paths(datadir, 'icons'),
strip_directory: true,
)
install_subdir(
'share/lutris',
install_dir: join_paths(datadir, 'lutris'),
strip_directory: true,
)
install_man(
files('share/man/man1/lutris.1'),
install_dir: join_paths(mandir, 'man1'),
)
i18n.merge_file(
input: files('share/applications/net.lutris.Lutris.desktop'),
output: 'net.lutris.Lutris.desktop',
type: 'desktop',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'applications'),
)
i18n.merge_file(
input: files('share/metainfo/net.lutris.Lutris.metainfo.xml'),
output: 'net.lutris.Lutris.metainfo.xml',
type: 'xml',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo'),
)