Commit graph

57469 commits

Author SHA1 Message Date
Jehan
941bfcf918 plug-ins: remove gimp_quit() calls from the Script-Fu server.
And exit gracefully with error messages to display when any of the
critical errors which may occur does (e.g. network errors when creating
a socket).
2026-04-07 19:25:35 +02:00
Jehan
cf6871763c plug-ins: remove all gimp_quit() calls from PSD export code.
Now instead of just unexpectedly ending the plug-in process, let's
gracefully return with a GIMP_PDB_EXECUTION_ERROR and proper error
message, when any of the stream-writing function fails.
2026-04-07 18:22:43 +02:00
Jehan
73440b1627 plug-ins: get rid of various gimp_quit().
I am going to deprecate this function. We should stop just killing
plug-ins randomly when things are bugged. Instead we should still try
and return cleanly (with an error status and message).
2026-04-07 18:22:43 +02:00
Jehan
b9277e094a app: allow pango_context not existing.
This fixes a CRITICAL on exit when calling GIMP with --no-fonts:

> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2026-04-07 18:22:43 +02:00
Flynn Peck
00e9ad2f77 Update Cornish translation 2026-04-07 09:20:20 +00:00
Bruno Lopes
cc849cf189 build/macos: Update background path for local .dmg creation (not used) 2026-04-06 21:49:00 -03:00
Bruno Lopes
43a7d725bf tools: Support alternative iso_639-3 domain
This is one of the official filenames listed on iso-codes meson.build and
it is needed to work with iso-codes from vcpkg which uses that domain.
https://salsa.debian.org/iso-codes-team/iso-codes/-/blob/main/meson.build?ref_type=heads

The reason it was working with MSYS2 until now is that somehow
meson from MSYS2 manually copy the symlinks as files.
2026-04-06 21:33:33 -03:00
Bruno Lopes
608c4cca73 build/windows: iso-codes is now available on vcpkg
See: https://github.com/microsoft/vcpkg/pull/50955
2026-04-06 21:33:23 -03:00
Bruno Lopes
449889295f gitlab-ci: Add cppcheck to issue-bot needs: 2026-04-06 20:19:53 -03:00
Bruno Lopes
8c0fc54b80 gitlab-ci: Only add issue-bot to 'test_pipeline' pipelines
It is really useful on pipelines used only for testing:
- GIMP_CI_MESON_CLANG
- GIMP_CI_MESON_MSVC
- GIMP_CI_MESON_APPLECLANG
- GIMP_CI_RASTER_ICONS
- GIMP_CI_CPPCHECK

This fixes issue-bot wrongly in the middle of nightly packages,
which was not my intention, since these pipelines are flaky
and all are run with CI_COMMIT_TAG before the releases (with
exception of the flatpak, which is checked by the packager when
syncing the manifest, so issue-bot is also useless there)
2026-04-06 20:15:44 -03:00
Bruno Lopes
2a3480cc1b build: Anotate some dependencies limitations for packaging 2026-04-06 19:50:16 -03:00
Bruno Lopes
6316479440 build/linux: Update openexr and libwmf modules
Synced from 8ee51ad2f1
2026-04-06 15:45:33 -03:00
Jehan
68fab913c6 libgimpbase: add and improve some docs.
This is a fixup for commit a85e5286fd.
While neither gimp_env_init() and gimp_env_exit() are supposed to be
part of the public API (therefore these docs won't be part of the
gi-docgen docs either), it's better to properly document this with
explicit text.
2026-04-06 17:56:32 +02:00
Jehan
abd22d0059 NEWS: update. 2026-04-06 17:54:39 +02:00
Jehan
30ced82bf4 Revert "INSTALL: Fix alignment of optional dependencies table"
This mostly reverts commit 987dc52160
(with some conflicts fixed as the file got further touched).

This table was already properly aligned as what matters is the generated
INSTALL file, which is what will end up in our source tarballs. This
file is also published on the developer website. The reverted commit was
completely breaking the formatting. 😅
2026-04-06 17:47:04 +02:00
Jehan
1fa1f2384b gimp-data: update to latest (improved image scripts error messages). 2026-04-06 16:49:39 +02:00
Jehan
a85e5286fd Issue #14681: Permission denied opening image - /tmp/gimp/3.0/ cannot be shared.
Let's create the folder returned by gimp_temp_directory() ourselves, the
first time this function is called, using a randomized name. This will
ensure that we won't conflict with another user running GIMP on the same
machine if using the base /tmp/ (which is usually the case on Linux).

Furthermore, since we create the temp folder at this level, we will also
delete it when quitting (but only if it's empty, as it should). Also I
use a single-level folder above the generic temporary directory, this
way, it's easier to track and we don't have to delete 2 levels of
directories anymore.

When the environment variable GIMP3_TEMPDIR is set though, we do not
create the folder, nor do we try and delete it.
2026-04-06 16:29:40 +02:00
Jehan
7dc8fefbfd app, libgimp, pdb, plug-ins: new gimp_resources_loaded() function.
And use the function in script-fu. While we want wrong resource names to
trigger WARNINGs in Script-Fu scripts and plug-ins (because these can be
considered as a bug), we don't want it to happen when the resource is
not loaded on purpose (mostly it means that we run GIMP with --no-data
or --no-fonts). This was happening in our own builds when running GIMP
through the in-build-gimp.py script and that was always very annoying.

Now in such a case, we will only output an INFO message on stderr (it's
still a good idea to warn about this, because if we imagined someone was
running a script non-interactively, which called one of these
procedures, they may have relied on the default value of some arguments.
Therefore they'd want to know about such a behavior change).
2026-04-06 16:29:40 +02:00
Jehan
9cab16c193 tools: fix defcheck.
We don't have excluded symbols in GIMP codebase.
2026-04-06 16:29:40 +02:00
Jehan
f00bf531ae app: do not warn for stray images from command lines.
The INFO message "a stray image seems to have been left around by a
plug-in" was annoying when GIMP is run non-interactively, and when it
was about images open from command lines. Typically this message would
be visible on our CI when the various gimp-data scripts would fail. This
could only confuse script developers.

The fact is that while a plug-in (or batch script) should definitely
clean after itself by deleting images it created (unless it gave it a
display, in which case ownership is moved to the GUI), it is absolutely
expected that images opened through the command line would still exist
at exit.
2026-04-06 16:29:40 +02:00
Denis Rangelov2
1332a755eb Update Russian translation 2026-04-06 11:52:44 +00:00
Jehan
04ae810258 tools: add newline to debug strings.
Unlike print(), sys.std*.write() does not add a newline, which makes for
hard-to-visually-parse debug lines, all clumped up together.
2026-04-04 23:05:26 +02:00
Jehan
1107d0f7af app, pdb, plug-ins: improve error feedback for gimp_temp_file().
It is not a fix yet for #14681 but would provide nicer and earlier error
when a call to gimp_temp_file() fails, which may happen in some cases.
E.g. if the temp directory doesn't exist and we fail to create it.

As a test, if I delete /tmp/gimp/3.2/ and give root ownership to
/tmp/gimp/, now the error when opening our gimp-splash.xcf.xz is:

GIMP-Error: Opening '/path/to/gimp/gimp-data/images/gimp-splash.xcf.xz' failed: Error creating directory /tmp/gimp/3.2: Permission denied
2026-04-04 23:05:26 +02:00
Bruno Lopes
088b1f2426 gitlab-ci: Fix typo 2026-04-04 17:08:03 -03:00
Bruno Lopes
13e5fb2231 gitlab-ci: Small organization of build-time and runtime deps 2026-04-04 17:02:07 -03:00
Jehan
fd9484a8b8 plug-ins: better error message for file-compressor for specific issues.
This is a further improvement, for the specific case which appeared on
issue #16160. Basically here for the specific case when we have
permission issues, or other similar issues where we fail to either load
the input image, or export to the temporary file, we would get more
explicit error messages. And this would also show in the stderr output
of the in-build-gimp.py script.

In particular, when reproducing #16160 permission issue, the build logs
now contain this error:

GIMP-Error: Opening '/path/to/gimp/gimp-data/images/gimp-splash.xcf.xz' failed: Error creating temporary file '/tmp/gimp/3.2/gimp-temp-1719540.xcf': Permission denied

This should better help diagnose similar issues in the future.
2026-04-04 17:21:45 +02:00
Jehan
864abd6be0 app: print error message when failing to open from command line…
… even when we have no display.

gimp_message() supports a NULL handler object and we get proper
GIMP-Error message printed on stderr, e.g. when GIMP is run from the
build system.
We want as much info as possible when debugging our build scripts.
This is part of fixes to improve situations such as seen in #16160.
2026-04-04 17:21:45 +02:00
João Pedro Pitarelo
c1a228ea48 Update Brazilian Portuguese translation 2026-04-04 13:37:33 +00:00
Alx Sa
d88cd4cb7a plug-ins: Improve color detection in file-pdf-export
Resolves #14583
If the user chooses to vectorize PDF layers with single colors,
get_layer_color () is run to use histograms to determine if they
are indeed a single color. gimp_drawable_histogram () is used to
get the RGB values as averages. This function returns values in the
0...255 range for 8-bit images and 0.0...1.0 range for all the
other precisions.

However, we did not properly normalize the values, resulting in
blown-out white layers when exporting 8-bit images. This patch
checks if the image is 8-bit and divides all values by 255.0f in
that case.

It also checks if the image is in linear precision or not, as
gegl_color_set_rgba () assumes the color values are linear. If not,
gegl_color_set_pixel () is used instead. Finally, the color mode
checks are made a bit more robust in preparation for future color
modes like CMYK.
2026-04-04 12:38:36 +00:00
Kristjan ESPERANTO
b41deb138d Update Esperanto translation 2026-04-03 22:18:46 +00:00
v4vansh
620850715e Core: Fix stale thumbnails after mode conversion 2026-04-03 16:17:47 +00:00
Bruno Lopes
60d8c4cbbe build/windows: Update MSVC patch since we now have more packages 2026-04-03 11:48:00 -03:00
Bruno Lopes
40ccc60d14 gitlab-ci: Make vcpkg specific variables more neutral
Now, with x64-windows-release, we don't have the debug binaries, so
we can search recursively for executables on tools/ to add on PATH.
2026-04-03 11:09:54 -03:00
Bruno Lopes
9aef11022a plug-ins: Use _fileno on Windows 2026-04-03 11:09:54 -03:00
Bruno Lopes
f788cdac9d build/windows: Build more packages now that we use x64-windows-release
Also list gettext and python3 which were already installed.
2026-04-03 11:09:34 -03:00
Bruno Lopes
e1abd061a9 gitlab-ci, build/windows: Use VCPKG_DEFAULT_HOST_TRIPLET
We were using VCPKG_DEFAULT_TRIPLET, which makes impossible to
use x64-windows-release triplet since vcpkg starts to crosscompile
(even on the same arch). Let's fix this by using the right env var.
2026-04-03 08:33:23 -03:00
Bruno Lopes
9926795610 plug-ins: Include <memory> when on MSVC 2026-04-03 08:29:52 -03:00
Bruno Lopes
06aa66428d plug-ins: Add HAVE_SYS_TIME_H check on file-heif
This fixes a build error on MSVC
2026-04-03 08:12:08 -03:00
Alx Sa
13e2823a03 pdb: Allow pixels as unit in PDB calls
In GIMP 2.10, the PDB call
gimp-context-set-line-width-unit allowed
for Pixels to be set as a unit. In 3.0, we
changed GimpUnit to be a proper object
and gave it options to allow pixels or not.
The default setting is 'no pixels allowed',
which caused the unchanged
gimp-context-set-line-width-unit parameter
to no longer accept pixels as a unit.
This patch adds `allow_pixel => 1` to the
PDB set-up for setting units to fix this
oversight.
2026-04-03 10:58:10 +00:00
Alx Sa
65e06ab42b actions: Better protect layers from Fill menu
Resolves #16019
The Edit -> Fill with... options did not respect if
layers could not be filled (such as linked layers or
multiple selected layers with some layers being
pixel locked). This patch adds checks instead of
unconditionally filling those layers.
It also adds the text & vector specific fills from 916cf84e
to keep this action consistent.
2026-04-03 03:38:58 +00:00
Bruno Lopes
ee06c790c3 build: Make generic CWD error message more consistent 2026-04-02 23:23:09 -03:00
Bruno Lopes
9cfccfb968 build/macos: Fix macOS CWD error message
It should direct to gimp-web-devel
2026-04-02 23:19:04 -03:00
Bruno Lopes
a9e1f665dd build: Make gimp build scripts work on tarballs too 2026-04-02 23:12:49 -03:00
Bruno Lopes
febeb89c55 build: Add check for 'git' on Windows and macOS deps scripts
Since git is actually not a dependency, we need to do some checks.

See: https://gitlab.gnome.org/Infrastructure/gimp-web-devel/-/issues/54
2026-04-02 22:24:22 -03:00
Bruno Lopes
65f4c6c47f build/windows: List some already installed vcpkg deps 2026-04-02 16:13:45 -03:00
Bruno Lopes
e88053628a build/windows: Remove binutils from all-deps-uni
It was there just because on crossroads era we needed it for bundling
(since crossroads does not support installing package groups like toolchain).
2026-04-02 15:39:08 -03:00
Bruno Lopes
c034549574 build/windows: Remove virtual headers-git from all-deps-uni
It is already provided by toolchain group package.
2026-04-02 15:35:19 -03:00
Bruno Lopes
d5b087d656 build/macos: Complete a bit homebrew dependencies list
This adds aalib, gi-docgen, libheif, libmng and vala.

The homebrew list was originally minified since all-deps-uni was
ported from the treatment of vcpkg on build/windows all-deps-uni.
But since on homebrew we don't build anything, let's install them.

This also adds to the list deps already installed recursively.
2026-04-02 14:50:10 -03:00
Bruno Lopes
ff3c56ba1f build/macos: Add perl to all-deps-uni list 2026-04-02 14:50:10 -03:00
Bruno Lopes
c77e0b7faa meson: Bump python3_minver to 3.10
Pygobject requires 3.9 which already reached EOL.
Pycairo requires 3.10 which is lower than on Bookworm.
2026-04-02 14:34:11 -03:00