@@ -2,12 +2,15 @@ project('ssh-studio', 'c',
22 version : ' 1.3.1' ,
33 license : ' GPL-3.0-or-later' ,
44 meson_version : ' >= 0.60.0' ,
5- default_options : [' warning_level=2' ,
6- ' buildtype=debugoptimized' ])
7-
5+ default_options : [
6+ ' warning_level=2' ,
7+ ' buildtype=debugoptimized' ,
8+ ' python.install_env=auto' ,
9+ ' python.platlibdir='
10+ ])
811
912python = import (' python' )
10- python_installation = python.find_installation()
13+ python_installation = python.find_installation(' python3 ' , required : true )
1114
1215gnome = import (' gnome' )
1316
@@ -22,24 +25,45 @@ subdir('src')
2225
2326subdir (' data' )
2427
25- install_data (join_paths (meson .current_source_dir(), ' data' , application_id + ' .desktop' ),
26- install_dir : join_paths (get_option (' datadir' ), ' applications' ))
27-
28- install_data (join_paths (meson .current_source_dir(), ' data' , ' ssh-studio.in' ),
29- rename : ' ssh-studio' ,
30- install_mode : ' rwxr-xr-x' ,
31- install_dir : join_paths (get_option (' bindir' )))
32-
33- install_data (join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon_256.png' ),
34- rename : application_id + ' .png' ,
35- install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , ' 256x256' , ' apps' ))
36- install_data (join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon_128.png' ),
37- rename : application_id + ' .png' ,
38- install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , ' 128x128' , ' apps' ))
39- install_data (join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon_512.png' ),
40- rename : application_id + ' .png' ,
41- install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , ' 512x512' , ' apps' ))
42- install_data (join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon.svg' ),
43- rename : application_id + ' .svg' ,
44- install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , ' scalable' , ' apps' ))
28+ if get_option (' install_desktop_file' )
29+ install_data (
30+ join_paths (meson .current_source_dir(), ' data' , application_id + ' .desktop' ),
31+ install_dir : join_paths (get_option (' datadir' ), ' applications' )
32+ )
33+ endif
34+
35+ install_data (
36+ join_paths (meson .current_source_dir(), ' data' , ' ssh-studio.in' ),
37+ rename : ' ssh-studio' ,
38+ install_mode : ' rwxr-xr-x' ,
39+ install_dir : join_paths (get_option (' bindir' ))
40+ )
41+
42+ if get_option (' install_icons' )
43+ icon_sizes = [' 128' , ' 256' , ' 512' ]
44+ icon_extensions = [' png' , ' png' , ' png' ]
45+
46+ foreach i : range(icon_sizes.length())
47+ size = icon_sizes[i]
48+ ext = icon_extensions[i]
49+ install_data (
50+ join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon_' + size + ' .' + ext),
51+ rename : application_id + ' .' + ext,
52+ install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , size + ' x' + size, ' apps' )
53+ )
54+ endforeach
55+
56+ install_data (
57+ join_paths (meson .current_source_dir(), ' data' , ' media' , ' icon.svg' ),
58+ rename : application_id + ' .svg' ,
59+ install_dir : join_paths (get_option (' datadir' ), ' icons' , ' hicolor' , ' scalable' , ' apps' )
60+ )
61+ endif
62+
63+ if get_option (' install_metainfo' )
64+ install_data (
65+ join_paths (meson .current_source_dir(), ' data' , application_id + ' .metainfo.xml' ),
66+ install_dir : join_paths (get_option (' datadir' ), ' metainfo' )
67+ )
68+ endif
4569
0 commit comments