# bindir /usr/local/bin geeqie executable
# gq_bindir /usr/local/lib/geeqie * plugins scripts
# datadir /usr/local/share/
-# /usr/local/share/applications geeqie.desktop
-# [gq_]appdir /usr/local/share/geeqie/ * template.desktop
+# /usr/local/share/applications org.geeqie.Geeqie.desktop
+# [gq_]appdir /usr/local/share/geeqie/ * org,geeqie.template.desktop
# desktopdir /usr/local/share/geeqie/applications plugin desktop files
# appdatadir /usr/local/share/metainfo org.geeqie.Geeqie.appdata.xml
# icondir /usr/local/share/pixmaps geeqie.png icon
'cpp',
version : run_command('./version.sh', check : true).stdout().strip(),
license : ['GPL-2.0-or-later'],
- meson_version : '>=0.53.0',
- default_options : ['warning_level=3', 'buildtype=debugoptimized']
+ meson_version : '>=1.0.0',
+ default_options : ['cpp_std=c++14', 'warning_level=3', 'buildtype=debugoptimized', 'cpp_link_args=-rdynamic']
)
-# To inhibit warnings from the generated files icons_inline.h and ui_icons.h
+# To inhibit warnings from the generated file icons.h
add_global_arguments('-Wno-overlength-strings', language : 'c')
# To compile originally-C files as C++
-add_global_arguments('-fpermissive', language : 'cpp')
add_global_arguments('-Wno-error=deprecated-declarations', language : 'cpp')
-add_global_arguments('-Wno-error=sign-compare', language : 'cpp')
-add_global_arguments('-Wno-error=return-type', language : 'cpp')
-add_global_arguments('-Wno-error=literal-suffix', language : 'cpp')
-add_global_arguments('-Wno-error=write-strings', language : 'cpp')
# Project requirements
project_sources = []
gnome = import('gnome')
thread_dep = dependency('threads')
-cc = meson.get_compiler('c')
+cc = meson.get_compiler('cpp')
i18n = import('i18n')
fs = import('fs')
configuration_inc = include_directories('.')
+# Extended stack trace using backward-app
+option = get_option('devel')
+if option.enabled()
+ if cc.has_link_argument('-ldwarf')
+ add_project_link_arguments('-ldwarf', language: 'cpp')
+ endif
+endif
+
# External programs
-gdk_pixbuf_csource = find_program('gdk-pixbuf-csource', required : true)
+glib_compile_resources = find_program('glib-compile-resources', required : true)
glib_genmarshal = find_program('glib-genmarshal', required : true)
-gnome_doc_tool = find_program('yelp-build', required : false)
-if gnome_doc_tool.found()
- summary({'help' : ['Help files created:', true]}, section : 'Documentation', bool_yn : true)
+
+option = get_option('git')
+if not option.disabled()
+ running_from_git = find_program('git', required: false).found() and fs.is_dir('.git')
else
- summary({'help' : ['yelp-build not found - Help files created:', false]}, section : 'Documentation', bool_yn : true)
+ running_from_git = false
+ summary({'git' : ['disabled - ChangeLog, ChangeLog.html, lua-api help file created:', false]}, section : 'Documentation', bool_yn : true)
endif
-running_from_git = find_program('git', required: false).found() and fs.is_dir('.git')
-
debug = get_option('debug')
# Note that main.cc sets prefix to the directory above where the executable is run from.
icondir = join_paths(datadir, 'pixmaps')
mandir1 = join_paths(datadir, 'man', 'man1')
-podir = join_paths(meson.source_root(), 'po')
+podir = join_paths(meson.project_source_root(), 'po')
+scriptsdir = join_paths(meson.project_source_root(), 'scripts')
summary({'gq_appdir': gq_appdir,
'gq_bindir': gq_helpdir,
conf_data.set_quoted('VERSION', meson.project_version())
conf_data.set('DEBUG', debug)
-gtk_dep = dependency('gtk+-3.0', version : '>=3.22', required: true)
+option = get_option('gtk4')
+if option.enabled()
+ gtk_dep = dependency('gtk4', required: true)
+ conf_data.set('HAVE_GTK4', 1)
+else
+ gtk_dep = dependency('gtk+-3.0', version : '>=3.24', required: true)
+endif
glib_dep = dependency('glib-2.0', version : '>=2.52', required: true)
+# Required only when backward-cpp is used
+libdw_dep = []
+libunwind_dep = []
+option = get_option('devel')
+if option.enabled()
+ libdw_dep = dependency('libdw', required : true)
+ if libdw_dep.found()
+ libunwind_dep = dependency('libunwind', required : true)
+ if libunwind_dep.found()
+ conf_data.set('HAVE_DEVELOPER', 1)
+ summary({'developer mode' : ['extended stacktrace:', true]}, section : 'Debugging', bool_yn : true)
+ else
+ summary({'developer mode' : ['libunwind not found. extended stacktrace:', false]}, section : 'Debugging', bool_yn : true)
+ endif
+ else
+ summary({'developer mode' : ['libdw not found. extended stacktrace:', false]}, section : 'Debugging', bool_yn : true)
+ endif
+else
+ summary({'developer mode' : ['extended stacktrace:', false]}, section : 'Debugging', bool_yn : true)
+endif
+
+# Required only for seg. fault stacktrace and backtrace debugging
+option = get_option('execinfo')
+libexecinfo_dep = []
+if not option.disabled()
+ result = cc.check_header('execinfo.h')
+ if result
+ # Include unconditionally dependency for NetBSD.
+ libexecinfo_dep = cc.find_library('execinfo', required : false)
+ conf_data.set('HAVE_EXECINFO_H', 1)
+ summary({'execinfo' : ['stacktrace supported:', true]}, section : 'Debugging', bool_yn : true)
+ else
+ summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Debugging', bool_yn : true)
+ endif
+else
+ summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Debugging', bool_yn : true)
+endif
+
libarchive_dep = []
req_version = '>=3.4.0'
option = get_option('archive')
req_version = '>=2.0'
option = get_option('cms')
if not option.disabled()
- lcms_dep = dependency('lcms2', version : req_version, required : get_option('cms'))
- if lcms_dep.found()
- conf_data.set('HAVE_LCMS', 1)
- conf_data.set('HAVE_LCMS2', 1)
- summary({'cms' : ['color management supported:', true]}, section : 'Configuration', bool_yn : true)
+ xxd = find_program('xxd', 'xxdi.pl', required : false)
+ if xxd.found()
+ lcms_dep = dependency('lcms2', version : req_version, required : get_option('cms'))
+ if lcms_dep.found()
+ conf_data.set('HAVE_LCMS', 1)
+ conf_data.set('HAVE_LCMS2', 1)
+ summary({'cms' : ['color management supported:', true]}, section : 'Configuration', bool_yn : true)
+ else
+ summary({'cms' : ['lcms2' + req_version + ' not found - color management supported:', false]}, section : 'Configuration', bool_yn : true)
+ endif
else
- summary({'cms' : ['lcms2' + req_version + ' not found - color management supported:', false]}, section : 'Configuration', bool_yn : true)
+ summary({'cms' : ['xxd or xxdi.pl not found - color management supported:', false]}, section : 'Configuration', bool_yn : true)
endif
else
summary({'cms' : ['disabled - color management supported:', false]}, section : 'Configuration', bool_yn : true)
summary({'djvu' : ['disabled - djvu files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+option = get_option('evince')
+if not option.disabled()
+ evince = find_program('evince', required : false)
+ if evince.found()
+ summary({'print preview' : ['print preview supported:', true]}, section : 'Configuration', bool_yn : true)
+ else
+ summary({'print preview' : ['evince not found - print preview supported:', false]}, section : 'Configuration', bool_yn : true)
+ endif
+else
+ summary({'print preview' : ['disabled - print preview supported:', false]}, section : 'Configuration', bool_yn : true)
+endif
+
+# Required only for seg. fault stacktrace and backtrace debugging
+option = get_option('execinfo')
+if not option.disabled()
+ result = cc.check_header('execinfo.h')
+ if result
+ conf_data.set('HAVE_EXECINFO_H', 1)
+ summary({'execinfo' : ['stacktrace supported:', true]}, section : 'Configuration', bool_yn : true)
+ else
+ summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Configuration', bool_yn : true)
+ endif
+else
+ summary({'execinfo' : ['stacktrace supported:', false]}, section : 'Configuration', bool_yn : true)
+endif
+
exiv2_dep = []
req_version = '>=0.11'
option = get_option('exiv2')
summary({'exiv2' : ['disabled - image data processed by exiv2:', false]}, section : 'Configuration', bool_yn : true)
endif
-libffmpegthumbnailer_dep = []
-req_version = '>=2.1.0'
-option = get_option('videothumbnailer')
-if not option.disabled()
- libffmpegthumbnailer_dep = dependency('libffmpegthumbnailer',
- version : req_version,
- required : get_option('videothumbnailer'))
-
- if libffmpegthumbnailer_dep.found()
- conf_data.set('HAVE_FFMPEGTHUMBNAILER', 1)
- summary({'videothumbnailer' : ['thumbnails of video files supported:', true]}, section : 'Configuration', bool_yn : true)
-
- result = cc.has_member('struct video_thumbnailer_struct', 'prefer_embedded_metadata', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>')
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_METADATA', 1)
- endif
- summary({'fmpegthumbnailer_metadata' : ['fmpegthumbnailer_metadata found:', result]}, section : 'Thumbnailer', bool_yn : true)
-
- result = cc.has_member('struct image_data_struct', 'image_data_width', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>' )
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_RGB', 1)
- endif
- summary({'fmpegthumbnailer_rgb' : ['fmpegthumbnailer_rgb found:', result]}, section : 'Thumbnailer', bool_yn : true)
-
- result = cc.has_function('video_thumbnailer_set_size', dependencies : libffmpegthumbnailer_dep)
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_WH', 1)
- endif
- summary({'fmpegthumbnailer_set_size' : ['fmpegthumbnailer_set_size found:', result]}, section : 'Thumbnailer', bool_yn : true)
- else
- summary({'videothumbnailer' : ['libvideothumbnailer ' + req_version + ' not found - thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
- endif
-else
- summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
-endif
-
champlain_dep = []
champlain_gtk_dep = []
clutter_dep = []
req_version = '>=5.3'
option = get_option('lua')
if not option.disabled()
- lua_dep = dependency('lua5.3', version : req_version, required : get_option('lua'))
+ lua_dep = dependency('lua', 'lua5.3', 'lua-5.3', 'lua53', version: req_version, required: get_option('lua'))
if lua_dep.found()
conf_data.set('HAVE_LUA', 1)
summary({'lua' : ['lua supported:', true]}, section : 'Configuration', bool_yn : true)
else
- summary({'lua' : ['lua5.3 ' + req_version + ' not found - lua supported:', false]}, section : 'Configuration', bool_yn : true)
+ summary({'lua' : ['lua ' + req_version + ' not found - lua supported:', false]}, section : 'Configuration', bool_yn : true)
endif
else
summary({'lua' : ['disabled - lua supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+# Install standard documents
+option = get_option('pandoc')
+if not option.disabled()
+ pandoc = find_program('pandoc', required : false)
+ if pandoc.found()
+ readme_html = custom_target(
+ 'README.html',
+ input: 'README.md',
+ output: 'README.html',
+ command: [pandoc, '@INPUT@', '-o', '@OUTPUT@'],
+ install: true,
+ install_dir: helpdir)
+
+ summary({'README' : ['README.html created:', true]}, section : 'Documentation', bool_yn : true)
+ else
+ summary({'README' : ['pandoc not found - README.html created:', false]}, section : 'Documentation', bool_yn : true)
+ endif
+else
+ summary({'pandoc' : ['disabled - README.html created:', false]}, section : 'Documentation', bool_yn : true)
+endif
+install_data('README.md', 'COPYING', 'TODO', install_dir : helpdir)
+
poppler_glib_dep = []
req_version = '>=0.62'
option = get_option('pdf')
conf_data.set('HAVE_SPELL', 1)
summary({'spell' : ['spelling checks enabled', true]}, section : 'Configuration', bool_yn : true)
else
- summary({'spell' : ['gspell-1 ' + req_version + ' not found - spelling checks not enabled', false]}, section : 'Configuration', bool_yn : true)
+ summary({'spell' : ['gspell-1 ' + req_version + ' not found - spelling checks enabled', false]}, section : 'Configuration', bool_yn : true)
endif
else
- summary({'spell' : ['disabled - spelling checks not enabled', false]}, section : 'Configuration', bool_yn : true)
+ summary({'spell' : ['disabled - spelling checks enabled', false]}, section : 'Configuration', bool_yn : true)
endif
tiff_dep = []
summary({'tiff' : ['disabled - tiff files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
+libffmpegthumbnailer_dep = []
+req_version = '>=2.1.0'
+option = get_option('videothumbnailer')
+if not option.disabled()
+ libffmpegthumbnailer_dep = dependency('libffmpegthumbnailer',
+ version : req_version,
+ required : get_option('videothumbnailer'))
+
+ if libffmpegthumbnailer_dep.found()
+ conf_data.set('HAVE_FFMPEGTHUMBNAILER', 1)
+ summary({'videothumbnailer' : ['thumbnails of video files supported:', true]}, section : 'Configuration', bool_yn : true)
+
+ result = cc.has_member('struct video_thumbnailer_struct', 'prefer_embedded_metadata', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>')
+ if result
+ conf_data.set('HAVE_FFMPEGTHUMBNAILER_METADATA', 1)
+ endif
+ summary({'fmpegthumbnailer_metadata' : ['fmpegthumbnailer_metadata found:', result]}, section : 'Thumbnailer', bool_yn : true)
+
+ result = cc.has_member('struct image_data_struct', 'image_data_width', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>' )
+ if result
+ conf_data.set('HAVE_FFMPEGTHUMBNAILER_RGB', 1)
+ endif
+ summary({'fmpegthumbnailer_rgb' : ['fmpegthumbnailer_rgb found:', result]}, section : 'Thumbnailer', bool_yn : true)
+
+ result = cc.has_function('video_thumbnailer_set_size', dependencies : libffmpegthumbnailer_dep)
+ if result
+ conf_data.set('HAVE_FFMPEGTHUMBNAILER_WH', 1)
+ endif
+ summary({'fmpegthumbnailer_set_size' : ['fmpegthumbnailer_set_size found:', result]}, section : 'Thumbnailer', bool_yn : true)
+ else
+ summary({'videothumbnailer' : ['libvideothumbnailer ' + req_version + ' not found - thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
+ endif
+else
+ summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
+endif
+
libwebp_dep = []
req_version = '>=0.6.1'
option = get_option('webp')
summary({'nl_langinfo' : ['nl_langinfo not found - first weekday depends on locale:', false, 'first weekday defaults to Monday']}, section : 'Documentation', bool_yn : true)
endif
-result = cc.has_function('strverscmp', prefix : '#include <string.h>')
-if result
- conf_data.set('HAVE_STRVERSCMP', 1)
-endif
-
conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf_data.set_quoted('GQ_APPDIR', gq_appdir)
conf_data.set_quoted('GQ_BINDIR', gq_bindir)
encoding : 'UTF-8',
configuration : conf_data)
+# For shellcheck on scripts
+script_sources = []
+subdir('scripts')
+
+# For markdownlint on .md files
+mdl_sources = []
+
+# For gtk builder checks on .ui files
+ui_sources = []
+
+# For checks on .desktop files
+desktop_sources = []
+
# Process subdirs before the sources
subdir('po')
subdir('plugins')
# Install other project files
if running_from_git
+ cmd = [find_program('gen_changelog.sh'), meson.current_source_dir(), meson.current_build_dir()]
custom_target(
'ChangeLog',
input: 'ChangeLog.gqview',
output: ['ChangeLog', 'ChangeLog.html'],
- command: [find_program('gen_changelog.sh'), meson.current_source_dir(), meson.current_build_dir()],
+ command: cmd,
install: true,
install_dir: helpdir)
+ meson.add_dist_script(cmd)
summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', true]}, section : 'Documentation', bool_yn : true)
-else
- summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', false]}, section : 'Documentation', bool_yn : true)
-endif
-
-pandoc = find_program('pandoc', required : false)
-if pandoc.found()
- readme_html = custom_target(
- 'README.html',
- input: 'README.md',
- output: 'README.html',
- command: [pandoc, '@INPUT@', '-o', '@OUTPUT@'],
- install: true,
- install_dir: helpdir)
-
- summary({'README' : ['README.html created:', true]}, section : 'Documentation', bool_yn : true)
-else
- summary({'README' : ['pandoc not found - README.html created:', false]}, section : 'Documentation', bool_yn : true)
-endif
-install_data('README.md', 'COPYING', 'TODO', 'AUTHORS',
- install_dir : helpdir)
-
-evince = find_program('evince', required : false)
-if evince.found()
- summary({'print preview' : ['print preview supported:', true]}, section : 'Documentation', bool_yn : true)
-else
- summary({'print preview' : ['evince not found - print preview supported:', false]}, section : 'Documentation', bool_yn : true)
+elif fs.exists('ChangeLog.html')
+ install_data('ChangeLog', 'ChangeLog.html', install_dir: helpdir)
+ summary({'ChangeLog' : ['ChangeLog, ChangeLog.html installed from dist:', true]}, section : 'Documentation', bool_yn : true)
endif
install_data('geeqie.png', install_dir : icondir)
install_data('geeqie.1', install_dir : mandir1)
i18n.merge_file(
- input : 'geeqie.desktop.in',
- output : 'geeqie.desktop',
+ input : 'org.geeqie.Geeqie.desktop.in',
+ output : 'org.geeqie.Geeqie.desktop',
type : 'desktop',
po_dir : podir,
install : true,
install_dir : appdatadir)
configure_file(input: 'geeqie.spec.in', output: 'geeqie.spec', configuration: conf_data)
+
+# Basic test of the executable
+# is_parallel false is to avoid problems with images tests
+xvfb = find_program('xvfb-run', required : false)
+if xvfb.found()
+ test('Basic test', xvfb, args: ['--auto-servernum', geeqie_exe, '--version'], is_parallel : false, timeout: 100)
+ summary({'xvfb' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+else
+ summary({'xvfb' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# The tests are run on GitHub with all options disabled, and then
+# with all or most options enabled. Shellcheck and GtkBuilder need only
+# be run once when options are disabled. Use option archive as a flag.
+# Image tests use option devel as a flag so that normal users do not
+# download the test image database.
+
+# Shellcheck
+option = get_option('archive')
+if option.disabled()
+ shellcheck_exe = find_program('shellcheck', required : false)
+ script_sources += files('gen_changelog.sh',
+ 'geeqie-install-debian.sh',
+ 'version.sh')
+
+ if shellcheck_exe.found()
+ foreach script : script_sources
+ script_path = '@0@'.format(script)
+ test('Shellcheck_ ' + script_path, shellcheck_exe, args: ['--norc', '--shell=sh', '--enable=add-default-case,avoid-nullary-conditions,check-unassigned-uppercase,deprecate-which,quote-safe-variables', script], timeout: 100)
+ endforeach
+ summary({'shellcheck' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'shellcheck' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'shellcheck' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# Markdownlint
+option = get_option('archive')
+if option.disabled()
+ mdl_exe = find_program('mdl', required : false)
+
+ if mdl_exe.found()
+ mdl_sources += files('CHECKLIST.md',
+ 'CODING.md',
+ 'DEVELOPER-NOTES.md',
+ 'README.md',
+ join_paths(meson.project_source_root(), '.github', 'ISSUE_TEMPLATE.md'))
+
+ style = join_paths(meson.project_source_root(), '.mdl.rb')
+ foreach md_file : mdl_sources
+ md_path = '@0@'.format(md_file)
+ test('Mdl_check_ ' + md_path, mdl_exe, args: ['--style', style, md_file], timeout: 100)
+ endforeach
+ summary({'markdownlint' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'markdownlint' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'markdownlint' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# GtkBuilder .ui check
+option = get_option('archive')
+if option.disabled()
+ if xvfb.found()
+ gtk_builder_tool = find_program('gtk-builder-tool', required : false)
+ if gtk_builder_tool.found()
+ foreach ui_file : ui_sources
+ ui_path = '@0@'.format(ui_file)
+ test('UI Build_ ' + ui_path, xvfb, args: ['--auto-servernum', gtk_builder_tool.full_path(), 'validate', ui_file], timeout: 100)
+ endforeach
+ summary({'gtk-builder-tool' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'gtk-builder-tool' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+ else
+ summary({'gtk-builder-tool xvfb' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'gtk-builder-tool xvfb' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# Image checks
+option = get_option('devel')
+if option.enabled()
+ if xvfb.found()
+ get_test_images_sh = find_program('get-test-images.sh', dirs : scriptsdir, required : true)
+ image_test_sh = find_program('image-test.sh', dirs : scriptsdir, required : true)
+
+ images_dir = join_paths(meson.current_build_dir(), 'test-images.p')
+
+ message('Downloading test images')
+ sources_list = run_command(get_test_images_sh, images_dir, 'https://github.com/caclark/geeqie-test.git', check: true)
+
+ sources = sources_list.stdout().strip().split('\n')
+
+ foreach image : sources
+ image_path = '@0@'.format(image)
+ path_array = image_path.split('/')
+ image_name = path_array[path_array.length() - 1]
+
+ if image_name.startswith('fail')
+ test('Image_ ' + image_name, image_test_sh, args: [geeqie_exe, image], is_parallel : false, should_fail : true, timeout: 100)
+ else
+ test('Image_ ' + image_name, image_test_sh, args: [geeqie_exe, image], is_parallel : false, timeout: 100)
+ endif
+ endforeach
+ summary({'Image tests' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'Image tests' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'Image tests' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# Code correctness checks
+if running_from_git
+ clang_tidy_exe = find_program('clang-tidy', required : false)
+ if clang_tidy_exe.found()
+ git_exe = find_program('git', required : true)
+ modified_file_list = run_command(git_exe, 'diff', '--name-only', check: true)
+ modified_files = modified_file_list.stdout().strip().split('\n')
+
+ foreach modified_file : modified_files
+ if modified_file.endswith('.cc')
+ modified_file_path = '@0@'.format(modified_file)
+ path_array = modified_file_path.split('/')
+ modified_file_name = path_array[path_array.length() - 1]
+ modified_file_full_path = join_paths(meson.project_source_root(), modified_file)
+
+ test('Code Correctness_ ' + modified_file_name, clang_tidy_exe, args : ['-p', './build', '-quiet', modified_file_full_path], timeout : 100)
+ endif
+ endforeach
+
+ summary({'Code Correctness' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'Code Correctness' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'Code Correctness' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# Lua test
+option = get_option('lua')
+if not option.disabled()
+ if lua_dep.found()
+ if xvfb.found()
+ lua_test_sh = find_program('lua-test.sh', dirs : scriptsdir, required : true)
+ test('Lua test', lua_test_sh, args: [geeqie_exe], is_parallel : false, timeout: 100)
+
+ summary({'lua' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'lua' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+ else
+ summary({'lua' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'lua' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif
+
+# Desktop files test
+option = get_option('desktop')
+if not option.disabled()
+ desktop_exe = find_program('desktop-file-validate', required : false)
+ if desktop_exe.found()
+ desktop_sh = find_program('desktop-file-validate.sh', dirs : scriptsdir, required : true)
+ test_desktop_dir = join_paths(meson.current_build_dir(), 'test-desktop-files.p')
+ foreach desktop_file : desktop_sources
+ desktop_path = '@0@'.format(desktop_file)
+ test('Desktop_check_ ' + desktop_path, desktop_sh, args: [test_desktop_dir, desktop_file], timeout: 100)
+ endforeach
+
+ summary({'Desktop files' : ['Test runs:', true]}, section : 'Testing', bool_yn : true)
+ else
+ summary({'Desktop files' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+ endif
+else
+ summary({'Desktop files' : ['Test runs:', false]}, section : 'Testing', bool_yn : true)
+endif