forked from Jas-SinghFSU/HyprPanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
64 lines (54 loc) · 1.36 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
project('hyprpanel')
bindir = get_option('prefix') / get_option('bindir')
datadir = get_option('prefix') / get_option('datadir') / 'hyprpanel'
ags = find_program('ags', required: true)
find_program('gjs', required: true)
src_file_list_process = run_command(
'find',
'src',
'-type', 'f',
'(',
'-name', '*.ts',
'-o',
'-name', '*.tsx',
'-o',
'-name', '*.scss',
')',
)
if src_file_list_process.returncode() != 0
error('Failed to find source files.')
endif
src_file_list = src_file_list_process.stdout().split('\n')
all_sources = []
foreach file : src_file_list
file_stripped = file.strip()
if file_stripped != ''
all_sources += meson.project_source_root() / file_stripped
endif
endforeach
custom_target(
'hyprpanel_bundle',
input: all_sources,
command: [
ags,
'bundle',
meson.project_source_root() / 'app.ts',
'@OUTPUT@',
'--src', meson.project_source_root(),
],
output: 'hyprpanel.js',
install: true,
install_dir: datadir,
)
configure_file(
input: 'scripts/hyprpanel_launcher.sh.in',
output: 'hyprpanel',
configuration: {'DATADIR': datadir},
install: true,
install_dir: bindir,
install_mode: 'rwxr-xr-x',
)
install_subdir('scripts', install_dir: datadir)
install_subdir('themes', install_dir: datadir)
install_subdir('assets', install_dir: datadir)
install_subdir('src/scss', install_dir: datadir / 'src')