mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 01:13:24 +00:00

The dialogs-menuitems is shared between dockable-menu and image-menu, just as it was with the old format. For this, we use XSL transformation with XInclude, then drop the namespace (because GTK doesn't like the unknown namespace being defined and crash immediately otherwise).
111 lines
2.7 KiB
Meson
111 lines
2.7 KiB
Meson
menus_dir = prefix / gimpdatadir / 'menus'
|
|
|
|
menus_files = files(
|
|
'brush-editor-menu.xml',
|
|
'brushes-menu.xml',
|
|
'buffers-menu.xml',
|
|
'channels-menu.xml',
|
|
'colormap-menu.xml',
|
|
'cursor-info-menu.xml',
|
|
'dashboard-menu.xml',
|
|
'documents-menu.xml',
|
|
'dynamics-editor-menu.xml',
|
|
'dynamics-menu.xml',
|
|
'error-console-menu.xml',
|
|
'fonts-menu.xml',
|
|
'gradient-editor-menu.xml',
|
|
'gradients-menu.xml',
|
|
'images-menu.xml',
|
|
'layers-menu.xml',
|
|
'mypaint-brushes-menu.xml',
|
|
'palette-editor-menu.xml',
|
|
'palettes-menu.xml',
|
|
'patterns-menu.xml',
|
|
'quick-mask-menu.xml',
|
|
'sample-points-menu.xml',
|
|
'selection-menu.xml',
|
|
'templates-menu.xml',
|
|
'text-editor-toolbar.xml',
|
|
'text-tool-menu.xml',
|
|
'tool-options-menu.xml',
|
|
'tool-preset-editor-menu.xml',
|
|
'tool-presets-menu.xml',
|
|
'undo-menu.xml',
|
|
'vector-toolpath-menu.xml',
|
|
'vectors-menu.xml',
|
|
)
|
|
|
|
install_data(menus_files,
|
|
install_dir: menus_dir,
|
|
)
|
|
|
|
unstable_menus_args = stable ? [] : [ '--stringparam', 'unstable-menus', 'yes' ]
|
|
|
|
menus_built_files = []
|
|
foreach menu_filegen : [ 'dockable-menu.xml', 'image-menu.xml', ]
|
|
menus_built_files += custom_target(menu_filegen,
|
|
input : [ menu_filegen +'.in', 'menus.xsl', ],
|
|
output: [ menu_filegen ],
|
|
command: [
|
|
xsltproc,
|
|
'--xinclude',
|
|
unstable_menus_args,
|
|
'--output', '@OUTPUT@',
|
|
'@INPUT1@',
|
|
'@INPUT0@',
|
|
],
|
|
install: true,
|
|
install_dir: menus_dir,
|
|
)
|
|
endforeach
|
|
|
|
menus_ui_built_files = []
|
|
foreach menu_filegen : [ 'dockable-menu.ui', 'image-menu.ui', ]
|
|
menus_ui_built_files += custom_target(menu_filegen,
|
|
input : [ menu_filegen +'.in', 'menus.xsl', ],
|
|
output: [ menu_filegen ],
|
|
command: [
|
|
xsltproc,
|
|
'--xinclude',
|
|
unstable_menus_args,
|
|
'--output', '@OUTPUT@',
|
|
'@INPUT1@',
|
|
'@INPUT0@',
|
|
],
|
|
install: true,
|
|
install_dir: menus_dir,
|
|
)
|
|
endforeach
|
|
|
|
if xmllint.found()
|
|
custom_target('validate_menus',
|
|
command: [
|
|
xmllint,
|
|
'--output', '@OUTPUT@',
|
|
'--valid',
|
|
'--path', meson.current_source_dir(),
|
|
menus_files, menus_built_files
|
|
],
|
|
# The output file is only useful as a flag file, so that the command
|
|
# knows if it has been run already.
|
|
output: [ 'validate_menus-output.xml' ],
|
|
build_by_default: true,
|
|
install: false
|
|
)
|
|
|
|
# XXX: no DTD validation as GtkBuilder UI format does not have a DTD (as far as
|
|
# we could find).
|
|
custom_target('validate_ui_menus',
|
|
command: [
|
|
xmllint,
|
|
'--output', '@OUTPUT@',
|
|
'--path', meson.current_source_dir(),
|
|
menus_ui_built_files
|
|
],
|
|
# The output file is only useful as a flag file, so that the command
|
|
# knows if it has been run already.
|
|
output: [ 'validate_ui_menus-output.xml' ],
|
|
build_by_default: true,
|
|
install: false
|
|
)
|
|
endif
|