2017-11-01 14:27:13 +01:00
|
|
|
plugins = [
|
2019-12-14 13:19:44 +01:00
|
|
|
{ 'name': 'colorxhtml' },
|
2017-11-01 14:27:13 +01:00
|
|
|
{ 'name': 'file-openraster' },
|
|
|
|
{ 'name': 'foggify' },
|
2019-09-15 10:17:29 +02:00
|
|
|
{ 'name': 'gradients-save-as-css' },
|
2019-12-26 20:10:44 +02:00
|
|
|
{ 'name': 'histogram-export' },
|
2017-11-01 14:27:13 +01:00
|
|
|
{ 'name': 'palette-offset' },
|
2020-05-04 19:03:22 +03:00
|
|
|
{ 'name': 'palette-sort' },
|
2017-11-01 14:27:13 +01:00
|
|
|
{ 'name': 'palette-to-gradient' },
|
2019-12-16 02:11:10 +02:00
|
|
|
{ 'name': 'python-eval' },
|
2017-11-01 14:27:13 +01:00
|
|
|
{ 'name': 'spyro-plus' },
|
|
|
|
]
|
|
|
|
|
2024-09-05 22:44:10 +02:00
|
|
|
if not stable or not release
|
2022-09-05 19:28:35 -04:00
|
|
|
plugins += [
|
|
|
|
{ 'name': 'test-dialog' },
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2017-11-01 14:27:13 +01:00
|
|
|
subdir('python-console')
|
2023-11-22 11:56:38 -05:00
|
|
|
subdir('tests')
|
2017-11-01 14:27:13 +01:00
|
|
|
|
|
|
|
foreach plugin : plugins
|
|
|
|
name = plugin.get('name')
|
build, plug-ins, gitlab: make GIMP runnable from build directory without…
… being installed.
There is already most of the main code logic for this, though now plug-ins need
to be in their own subdirectories, which breaks for plug-ins/common/ and
plug-ins/python/, while I needed plug-ins in both these categories to generate
the Windows installer welcome images (file-png, and python-fu-eval in
particular).
Once again, meson was not very helpful, since all its functions still refuse to
output generated files in subdirectories, so I end up duplicating plug-in files
with a custom Python script.
This should fix the CI. It was working on my machine as GIMP was installed, but
such a build rule should work even without GIMP installed.
This will also be useful in the future when we'll want to run unit tests of
plug-ins through the finale GIMP binary itself.
2023-06-27 17:41:04 +02:00
|
|
|
srcs = plugin.get('srcs', [name + '.py'])
|
2017-11-01 14:27:13 +01:00
|
|
|
|
2024-08-09 01:01:58 +02:00
|
|
|
install_data(srcs, install_dir: gimpplugindir / 'plug-ins' / name,
|
|
|
|
install_mode: 'rwxr-xr-x')
|
build, plug-ins, gitlab: make GIMP runnable from build directory without…
… being installed.
There is already most of the main code logic for this, though now plug-ins need
to be in their own subdirectories, which breaks for plug-ins/common/ and
plug-ins/python/, while I needed plug-ins in both these categories to generate
the Windows installer welcome images (file-png, and python-fu-eval in
particular).
Once again, meson was not very helpful, since all its functions still refuse to
output generated files in subdirectories, so I end up duplicating plug-in files
with a custom Python script.
This should fix the CI. It was working on my machine as GIMP was installed, but
such a build rule should work even without GIMP installed.
This will also be useful in the future when we'll want to run unit tests of
plug-ins through the finale GIMP binary itself.
2023-06-27 17:41:04 +02:00
|
|
|
|
|
|
|
foreach src : srcs
|
|
|
|
# Ugly trick to copy Python plug-ins into subfolders so that we can run GIMP
|
|
|
|
# from the build directory without installing it.
|
2024-04-24 18:42:26 +02:00
|
|
|
# To be run even if we don't install Python plug-ins so that we can
|
|
|
|
# still run them for in-build scripts.
|
2025-04-17 17:15:24 -03:00
|
|
|
run_command(python, meson.project_source_root() / 'build/meson/cp-plug-in-subfolder.py',
|
build, plug-ins, gitlab: make GIMP runnable from build directory without…
… being installed.
There is already most of the main code logic for this, though now plug-ins need
to be in their own subdirectories, which breaks for plug-ins/common/ and
plug-ins/python/, while I needed plug-ins in both these categories to generate
the Windows installer welcome images (file-png, and python-fu-eval in
particular).
Once again, meson was not very helpful, since all its functions still refuse to
output generated files in subdirectories, so I end up duplicating plug-in files
with a custom Python script.
This should fix the CI. It was working on my machine as GIMP was installed, but
such a build rule should work even without GIMP installed.
This will also be useful in the future when we'll want to run unit tests of
plug-ins through the finale GIMP binary itself.
2023-06-27 17:41:04 +02:00
|
|
|
meson.current_source_dir() / src, meson.current_build_dir() / name, check: true)
|
|
|
|
endforeach
|
2017-11-01 14:27:13 +01:00
|
|
|
endforeach
|
|
|
|
|
2024-11-18 15:50:23 -03:00
|
|
|
# Fallback fix to the problem of non-configured interpreters (needed by MSIX)
|
2024-08-09 01:01:58 +02:00
|
|
|
if platform_windows and not meson.is_cross_build() and python.found()
|
|
|
|
python_config = configuration_data()
|
2025-04-06 13:29:21 -03:00
|
|
|
if gimp_unstable or not release
|
2024-11-18 15:50:23 -03:00
|
|
|
#python.exe is prefered in unstable versions because of error output
|
|
|
|
python_config.set('PYTHON_EXE', 'python.exe')
|
|
|
|
else
|
|
|
|
#pythonw.exe is prefered in stable releases because it works silently
|
|
|
|
python_config.set('PYTHON_EXE', 'pythonw.exe')
|
|
|
|
endif
|
2024-04-24 18:42:26 +02:00
|
|
|
|
2024-08-09 01:01:58 +02:00
|
|
|
configure_file(input : 'pygimp.interp.in',
|
|
|
|
output: 'pygimp.interp',
|
|
|
|
configuration: python_config,
|
|
|
|
install: true,
|
|
|
|
install_dir: gimpplugindir / 'interpreters')
|
2017-11-01 14:27:13 +01:00
|
|
|
endif
|