Gimp/plug-ins/script-fu/libscriptfu/meson.build
bootchk 98bf051e7a Fix #10044 more natural binding of PDB return values
Allow (script-fu-use-v3) in script, or in SF Console.

Definitive description is in script-fu/docs/using-v3-binding.md

Makes SF interpret v3 of SF dialect.
  - marshals single return value from PDB without wrapping in list
  - marshals boolean return value from PDB as #t #f instead of integers
  - marshals boolean to PDB from #t and #f or TRUE and FALSE
  - marshals void return from PDB as () instead of (#t), but that is moot.

The version of SF dialect is distinct from the version of the PDB API.

Dialect v3 is opt-in: the initial dialect of all SF tools remains v2.

Commit also allows #t,#f for defaults of SF-TOGGLE instead of TRUE, FALSE
but that is an independent enhancement (but closely related.)

Affects interpreter state of the current process.
Not an attribute per se of a plugin.
While in this state, a plugin should not call PDB procedures
which are themselves v2 script plugins,
or a few utility scripts in script-fu-util.scm,
but that is rarely needed.

Does not remove symbols TRUE and FALSE from dialect.

A script can also call (script-fu-use-v2) to revert.
That is also discouraged but useful e.g. for testing.
2024-03-09 07:21:50 -05:00

71 lines
1.9 KiB
Meson

libscriptfuInclude = include_directories('.')
subdir('tinyscheme')
subdir('ftx')
libscriptfu_sources = [
'scheme-wrapper.c',
'scheme-marshal.c',
'scheme-marshal-return.c',
'script-fu-interface.c',
'script-fu-regex.c',
'script-fu-script.c',
'script-fu-scripts.c',
'script-fu-utils.c',
'script-fu-errors.c',
'script-fu-compat.c',
'script-fu-lib.c',
'script-fu-proc-factory.c',
'script-fu-arg.c',
'script-fu-register.c',
'script-fu-dialog.c',
'script-fu-run-func.c',
'script-fu-command.c',
'script-fu-version.c',
'script-fu-widgets-custom.c',
'script-fu-color.c',
'script-fu-resource.c',
]
# !! just "library(...)" which means shared versus static depends on configuration of project.
# Meson defaults to shared, but you can reconfigure to static.
# This library is not generally useful except by core GIMP developers.
# Dependencies:
# libscriptfu uses Gtk (which libgimpui_dep references)
# FUTURE: libscriptfu should use libgimpui but not Gtk directly
# libscriptfu does not use sockets (unlike the outer script-fu or script-fu-server)
# link_whole means the entire ftx and tinyscheme static libraries are in
# this library, whether or not they are used (see meson docs.)
# FUTURE: install private to gimp, in 'lib' subdir parallel to 'modules' subdir
# Not doing this because it complicates packaging
# Instead, this library installs in same place as libgimp
# install_dir: gimpplugindir / 'lib',
libscriptfu = library('gimp-scriptfu-'+ gimp_api_version,
libscriptfu_sources,
include_directories: [
rootInclude,
appInclude,
],
c_args: [
'-DG_LOG_DOMAIN="scriptfu"',
'-DSTANDALONE=0',
'-DUSE_INTERFACE=1',
'-DUSE_STRLWR=0',
],
dependencies: [
libgimpui_dep,
math,
gi,
],
link_whole: [
scriptfu_tinyscheme,
scriptfu_ftx,
],
vs_module_defs: 'script-fu.def',
version: so_version,
install: true,
)