Commit graph

31 commits

Author SHA1 Message Date
Bruno Lopes
2ce3c604e2
build, plug-ins: Generate *associations.list automatically at build-time
This is way easier to maintain and creates a bigger list of
associations by following the libraries that GIMP links
(but does not work with more complex code like file-gegl).

Also helps with
https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/issues/3
2025-05-30 19:23:41 -03:00
Bruno Lopes
c9f77c7228
build/windows: Alternative approach to Inno reading of config*.h
Closes: #14101

Partially reverts: f69dd75a17
2025-05-27 15:34:13 -03:00
Alx Sa
befacfd0d4 python: Add export support for Krita .kpl palette
Resolves #13889
Adds support for exporting palettes in
Krita's .kpl format (zipped .xml data).
Colors are currently saved as 32-bit
floating point RGB values.
Future work includes supporting other
color spaces like CMYK, other precisions,
and including color profiles for colors.
2025-05-25 15:50:12 +00:00
Bruno Lopes
00ab5e3a19
.gitlab: Move cp-plug-in-subfolder.py to build/meson
It is not a CI-specific file.
2025-04-18 13:36:31 -03:00
Bruno Lopes
87cfc65ab6 Issue #13367: use correct python*.exe on insider MSIX from stable series 2025-04-06 20:19:31 +00:00
Bruno
de3cf104e3
build, plug-ins: Bundle and distribute correct python*.exe
According to Jernej and my searches pythonw.exe should be used for stable
releases and python.exe for unstable as commented in the changed files.
2024-11-19 09:30:57 -03:00
Jehan
7f9b8e8dbf plug-ins: fix typo and install rules for test-dialog. 2024-09-05 22:44:10 +02:00
lloyd konneker
634f3d674f build: plugins: ensure test plugins not installed in stable version
Menu Filters>Development>Demos not appear in a stable version,
and not appear in unstable version unless buildtype==debug.
2024-08-10 14:58:58 +00:00
Jehan
93cc81281c Issue #11317: make Python plug-ins mandatory.
Unlike the other bindings (Lua, JS, Vala) where we only have a demo
plug-in, we actually have a bunch of interesting and useful Python
plug-ins.

Furthermore, we are running several Python scripts through GIMP during
our build (to generate a few images), so pygobject becomes a build
dependency anyway, even if it may not be a run dependency with
-Dpython=disabled.

This all becomes a bit confusing and in fact handling this case (of not
installing Python plug-ins) seems like an annoyance while we lose good
core plug-ins. So let's just make Python plug-ins mandatory. It's not
like Python is very controversial these days, and AFAWK, it is available
on every platform out there.
2024-08-09 01:01:58 +02:00
Jacob Boerema
3478e1c00f plug-ins: add file-plug-in testing framework
Copied over from the original separate work in:
https://gitlab.gnome.org/Wormnest/gimp-file-plugin-tests
After that further improved and changed and added more file format
tests.

Added meson.build files to integrate it in our build, but we do not
install it for releases.
2024-04-26 12:28:47 -04:00
Jehan
3fbf34dabc meson: fails to compile with -Dpython=disabled flag.
We compile GObject-Introspection anyway (except for cross-builds, where
anyway we don't rely on local Python scripts), so even if not installing
the Python plug-ins, still use them locally.
2024-04-24 19:48:59 +02:00
Bruno Lopes
d5f41b296b build/windows, data, extensions, plug-ins: Fix Build omissions
- Fix "no icons" errors generating loaders.cache with .cmd (CI-Cross).
  ! This is a sub-optimal fix, but it's better than a useless build.

- Fix "no interpreter" errors generating .interp with Meson (CI-Native)
  and generating .interp and copying .typelib with .cmd (Local-Native).
  ! This is a sub-optimal fix to Local-Native, but plug-ins will work.

- Fix "no iso" error copying iso_639.xml with Meson (Local-Native).
2024-01-02 10:49:31 +00:00
Jehan
a964b80ad7 plug-ins: the Python test plug-in should be installed for unstable branch and…
… non-release builds.
2023-07-14 16:45:39 +02:00
Jehan
9e9fe1435a 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:46:46 +02:00
lloyd konneker
d720375e97 2.99 libgimp: add GimpResource, GimpBrush, GimpPropWidgetBrush
So procedures can declare args and GimpProcedureDialog show chooser
widgets

Fix so is no error dialog on id_is_valid for resources

Palette.pdb changes and testing

Memory mgt changes

Gradient pdb

Font and Pattern tests

Test  brush, palette

Cleanup, remove generator

Rebase, edit docs, install test-dialog.py

Whitespace, and fix failed distcheck

Fix some clang-format, fix fail distcheck

Fix distcheck

Cleanup from review Jehan
2023-01-14 12:58:05 +00:00
Jehan
ca230cb770 meson: fix warnings of deprecated features.
Now that we bumped our meson requirement, meson is complaining about
several features now deprecated even in the minimum required meson
version:

s/meson.source_root/meson.project_source_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.

s/meson.build_root/meson.project_build_root/ to fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.

Fixing using path() on xdg_email and python ExternalProgram variables:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead

s/get_pkgconfig_variable *(\([^)]*\))/get_variable(pkgconfig: \1)/ to
fix:

> WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': dependency.get_pkgconfig_variable. use dependency.get_variable(pkgconfig : ...) instead
2022-08-31 01:29:37 +02:00
Jehan
623ce4a9e3 plug-ins: move benchmark-foreground-extract to gimp-data-extras.
We did port it to the new API but we are doubting it is useful at all.
It might have been, historically, when foreground extract algorithm was
first introduced, but probably not anymore, even more as the algorithm
is now implemented mostly on GEGL side anyway. So if any benchmark were
to be done, it should probably be added as GEGL tests.

Also as we are planning to update even more the API lately, it feels
really like a waste of time to also fix this plug-in while we currently
believe it to be useless.

Still we move it to the gimp-data-extras repository for being able to
easily bring it back in case we missed some use.
2021-04-19 18:10:54 +02:00
Jehan
0f7c6285ca plug-ins: move py-slice.py to gimp-data-extras.
Per polls on Twitter, Reddit, Patreon and Tipeee, most people were
willing to drop this plug-in as not being relevant anymore (247 for
dropping and 63 for keeping it, so nearly 80% out of 310 participants).

So let's move it to gimp-data-extras allowing it to still have a
possible life, and who knows, maybe to even evolve.

See also corresponding commit beffc6b to gimp-data-extras repository.
2020-12-15 01:46:46 +01:00
Jehan
2271b5bbdb Issue #4368: remove 2 more outdated Python plug-ins.
shadow_bevel.py and sphere.py are unfinished and have been in the
"Unstable" only builds for years. This is probably not worth porting
them. Let's just delete them.

I have actually move these (as well clothify and whirlpinch removed
yesterday) to the gimp-data-extras repository so if anyone wants to
revive them, and port them to GIMP 3, they can start off from there.
2020-09-21 17:14:51 +02:00
Jehan
e154cd220d plug-ins: delete Python whirlpinch and clothify without porting them.
Following Elad Shahar advice (cf. #4368), let's delete whirlpinch.py and
clothify.py.

The rational is that whirlpinch.py does the same thing as the existing
"plug-in-whirl-pinch" which is itself a compat plug-in to
"gegl:whirl-pinch" operation. Also the Python file has an explicit
command saying it is exactly the same algorithm, yet with no preview and
slower. Finally it was not even installed on stable build. It doesn't
look like there is any reason to keep it (it was probably a demo/test
Python plug-in).

As for clothify.py, a quick look at the short code shows it is exactly
the same algorithm as clothify.scm, with the same arguments and
installed on the same `Filters > Artistic` menu (except that the Python
version is not installed on stable builds).
So let's just keep the script-fu version as it has been the used version
until now, and there is no deprecation going on in one side or another.
So let's keep what already works.
2020-09-21 01:44:51 +02:00
Elad Shahar
12b4d9b097 Port histogram-export plugin to python 3 2020-09-21 00:38:29 +02:00
Elad Shahar
33085b5182 plug-ins: Port python-eval.py plugin to python 3.
To test that this works, run gimp in batch mode:

% gimp2.99 -i -b -

And then type: (python-fu-eval "print (2)") .
2020-09-21 00:30:41 +02:00
Elad Shahar
a07576b219 Port benchmark-foreground-extract.py to python 3.
Note by reviewer (Jehan): merging this port as it was in GIMP 2.10
anyway, but is this even still needed code? This plug-in is not even
available on stable release, it looks like for-development only
benchmark, and I'm not sure if it's relevant anymore, especially in our
GEGL-fueled new world.

Please anyone who knows a bit more on the history of this plug-in and
the evolution of our gimp_drawable_foreground_extract() algorithm, feel
free to weigh in and tell us what this was for exactly and if it's still
relevant.
2020-09-21 00:13:35 +02:00
Elad Shahar
cc2f064d8d plug-ins: Port palette-sort to Python 3
This is a basic port without any UI.
Invoking the plugin will just sort the entire palette based on
default parameters.
The original plugin had several broken options, which I tried to fix.
2020-09-20 23:58:02 +02:00
Félix Piédallu
e78fbccea7 Fix pygimp.interp generation, add /usr/bin/python3 alias 2020-07-28 17:17:18 +02:00
Jehan
4fa7d078d0 plug-ins: install Python plug-ins in rwxr-xr-x.
Without the write permission for the owner, the `make install-plug-ins`
special target fails on Python plug-ins. And anyway I don't see a reason
why not give write permission to the owner (like all other plug-ins are
installed).
2019-12-25 11:51:56 +01:00
Jehan
2e40b8d674 meson, autototools: install colorxhtml ported in previous commit. 2019-12-14 13:19:44 +01:00
Jehan
e54467a8fa plug-ins: (meson) install Python plug-ins with execution permission.
Otherwise GIMP will skip them!
2019-11-26 20:24:28 +01:00
Jehan
7777c5fa0c plug-ins: port gradients-save-as-css to Python 3 + new API. 2019-09-15 10:20:11 +02:00
Jehan
5495689180 plug-ins: fix Python plug-ins installation.
They were installed under $libdir/gimp/2.99/ instead of
$libdir/gimp/2.99/plug-ins/.
2019-09-14 22:39:39 +02:00
Félix Piédallu
65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00