meson.build: add a bunch of validating tests
This commit is contained in:
parent
7cbd24dd2f
commit
dcbc8a90b4
39
meson.build
39
meson.build
|
@ -172,13 +172,44 @@ if get_option('tools').enabled()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gsettings_schemas = ['fiv.gschema.xml']
|
gsettings_schemas = ['fiv.gschema.xml']
|
||||||
install_data(gsettings_schemas,
|
foreach schema : gsettings_schemas
|
||||||
rename : [application_ns + gsettings_schemas[0]],
|
install_data(schema,
|
||||||
|
rename : [application_ns + schema],
|
||||||
install_dir : get_option('datadir') / 'glib-2.0' / 'schemas')
|
install_dir : get_option('datadir') / 'glib-2.0' / 'schemas')
|
||||||
|
endforeach
|
||||||
|
|
||||||
# For the purposes of development: make the program find its GSettings schemas.
|
# For the purposes of development: make the program find its GSettings schemas.
|
||||||
gnome.compile_schemas(depend_files : files(gsettings_schemas))
|
gnome.compile_schemas(depend_files : files(gsettings_schemas))
|
||||||
|
|
||||||
|
# Validate various files, if there are tools around to do it.
|
||||||
|
xmls = ['fiv.svg', 'fiv.manifest', 'resources/resources.gresource.xml'] + \
|
||||||
|
gsettings_schemas
|
||||||
|
xmls += run_command(find_program('sed', required : false, disabler : true),
|
||||||
|
'-n', 's@.*>\([^<>]*[.]svg\)<.*@resources/\\1@p',
|
||||||
|
configure_file(
|
||||||
|
input : 'resources/resources.gresource.xml',
|
||||||
|
output : 'resources.gresource.xml.stamp',
|
||||||
|
copy : true,
|
||||||
|
), capture : true, check : true).stdout().strip().split('\n')
|
||||||
|
|
||||||
|
xmlwf = find_program('xmlwf', required : false, disabler : true)
|
||||||
|
xmllint = find_program('xmllint', required : false, disabler : true)
|
||||||
|
foreach xml : xmls
|
||||||
|
test('xmlwf ' + xml, xmlwf, args : files(xml))
|
||||||
|
test('xmllint ' + xml, xmllint, args : ['--noout', files(xml)])
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
dfv = find_program('desktop-file-validate', required : false, disabler : true)
|
||||||
|
foreach desktop : desktops
|
||||||
|
test(desktop, dfv, args : files(desktop))
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
# Finish the installation.
|
||||||
|
install_data('fiv.svg',
|
||||||
|
install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
|
||||||
|
install_subdir('docs',
|
||||||
|
install_dir : docdir, strip_directory : true)
|
||||||
|
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
foreach desktop : desktops
|
foreach desktop : desktops
|
||||||
install_data(desktop,
|
install_data(desktop,
|
||||||
|
@ -213,7 +244,3 @@ elif meson.is_cross_build()
|
||||||
'XDG_DATA_DIRS' : msys2_root / 'share',
|
'XDG_DATA_DIRS' : msys2_root / 'share',
|
||||||
})
|
})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data('fiv.svg',
|
|
||||||
install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
|
|
||||||
install_subdir('docs', install_dir : docdir, strip_directory : true)
|
|
||||||
|
|
Loading…
Reference in New Issue