Compare commits

...

188 commits

Author SHA1 Message Date
luming zh
1f749e3781 Update Chinese (China) translation 2026-04-08 23:28:25 +00:00
Alx Sa
beb0d85224 plug-ins: Fix unused variable warning in file-xpm
In file-xpm, use_x_api is only used when
GDK_WINDOWING_X11 is defined. However, it was
included as a general variable so it threw an unused variable
warning when compiled on other systems.
This patch moves the variable declaration inside the first
#ifdef GDK_WINDOWING_X11 block of the parse_colors ()
function.
2026-04-08 20:52:35 +00:00
Martin
f61c326e65 Update Slovenian translation 2026-04-08 20:38:16 +00:00
Anders Jonsson
e58505f872 Update Swedish translation 2026-04-08 20:17:57 +00:00
Anders Jonsson
70cab79f3a Update Swedish translation 2026-04-08 20:05:08 +00:00
Jehan
62a8a8de8d Issue #16169: salvage XCF files with empty (markup "") tag.
We introduced a bug in GIMP 3.2.2 where some text layers with NULL
markup (i.e. defined as bare text) would store an empty markup inside
the XCF. As a consequence, this empty markup string would override the
text.

This bug got fixed with my previous commit. Unfortunately the XCF files
would still be available in the wild and they would still lose their
content upon editing the text layer, if we were to only fix the XCF
saving. This additional commit will add some special-casing to handle
this edge case, which would simply delete the empty markup upon
encountering it. This makes our XCF loading robust to faulty XCF files.
2026-04-08 21:20:32 +02:00
Jehan
aa7c2a55d6 Issue #16169: do not serialize empty string value.
Reverting a part of commit fa097df9 which should not have been merged,
and in fact which was not useful anymore for fixing the original issue.

This fixes part of #16169, which is that because of this change, we were
creating broken XCF containing both a text and a markup variant for
text-only text layers. Typically it was storing:

> (text "I love GIMP")
> (markup "")

Now we don't create such broken XCF anymore, but I'll want to strengthen
reading code too, so that we can salvage such XCF files, already
existing in the wild.
2026-04-08 21:20:32 +02:00
Yuri Chornoivan
edc7a14127 Update Ukrainian translation 2026-04-08 18:13:03 +00:00
Alx Sa
86740b51e8 plug-ins: Add Windows WIA scanner plug-in
We dropped 32bit Windows support in
GIMP 3.2.2, which also removed the
32bit-only TWAIN scanner plug-in.

This patch adds a new plug-in that uses
the 64bit compatible WIA API for scanning.
It should restore the support for scanning on
Windows.
2026-04-08 17:20:06 +00:00
Martin
a377367145 Update Slovenian translation 2026-04-08 13:28:52 +00:00
Bruno Lopes
c88dad5036 gitlab-ci, build/linux: Bump flatpak distribution to GNOME/CITemplates@b8e6f8f5
There is no explanation about why we are now not generating static deltas, but
let's trust GNOME guys expertise.
2026-04-08 10:14:17 -03:00
Bruno Lopes
4d6ee89a62 build/linux: Fix eval of flatpak_ci_initiative.yml
At least on my tests on macOS (zsh), it was broken.
2026-04-08 10:14:17 -03:00
Bruno Lopes
397e97dcf9 gitlab-ci, build/linux: Set commit of flatpak_ci_initiative.yml on dist script
Let's avoid surprises on the .sh too.
2026-04-08 10:14:17 -03:00
Gabriele Barbero
691785113a plug-ins: validate fcTL frame dimensions...
...against IHDR bounds in APNG loader

The pixel buffer is allocated using base image dimensions from the IHDR
chunk, but row write offsets were computed using the per-frame dimensions
from the fcTL chunk with no bounds check. A crafted APNG file with
fcTL.width > IHDR.width or fcTL.height > IHDR.height would cause
out-of-bounds writes into the heap on every row after row 0.

Reject fcTL frames whose dimensions or offsets extend beyond the base
image dimensions before proceeding with decoding.
2026-04-08 11:47:05 +02:00
Jehan
6c04ce939f NEWS: update. 2026-04-08 11:29:26 +02:00
Bruno Lopes
a66d203d1b Revert "meson: Bump python3_minver to 3.10"
This reverts commit c77e0b7faa.

Let's ensure retrocompatibility
2026-04-08 06:05:04 -03:00
Jehan
7ea9f7873b desktop: prepare GIMP 3.2.4 metadata. 2026-04-08 10:38:33 +02:00
Jehan
5a046df819 gimp-data: bump (fixing RC text shown on git builds). 2026-04-07 21:54:55 +02:00
Jehan
862bc8d2c1 NEWS: update. 2026-04-07 21:22:00 +02:00
Jehan
dababa26d6 app, pdb: (gimp-quit) PDB procedure is also deprecated.
Even the fact we have a libgimp gimp_quit() function which was not
calling the PDB proc of the same name (and indeed doing something
differently) was weird and confusing.

Anyway we should not allow random plug-ins to basically kill GIMP
without any way to do anything about it, and probably lose all your
unsaved work. This is just wrong IMO.
We'll see if anyone wants to disagree, since anyway this won't be
removed until GIMP 4.
2026-04-07 20:13:31 +02:00
Jehan
309f137ae0 libgimp: gimp_quit() is now deprecated. 2026-04-07 20:08:48 +02:00
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
Bruno Lopes
37c11d1748 build: List some missing packages for parity with INSTALL file 2026-04-02 13:18:15 -03:00
Alx Sa
55256210f8 plug-ins: Fix algorithm check for PAA import
Resolves #16151
The original implementation mixed up the variable that
needed to be used for boundary checks - it should be
"estimated_size" and not "flags". This patch fixes the issue
to prevent a buffer overflow.
2026-04-02 14:02:28 +00:00
Bruno Lopes
3e21884883 INSTALL: Remove webkit from optional dependencies list
It is already listed on the unmaintained dependencies
2026-04-02 11:00:51 -03:00
Bruno Lopes
987dc52160 INSTALL: Fix alignment of optional dependencies table 2026-04-02 10:59:45 -03:00
Bruno Lopes
2637492ef1 INSTALL: Mention requirement of GObject Introspection for Gexiv2 2026-04-02 10:53:21 -03:00
Jehan
4f69cd039c app: get rid of some unused internal API.
I noticed this yesterday, especially through gimp_image_get_active_array()
and gimp_image_get_visible_array() which are looping through
MAX_CHANNELS, hence assuming the passed components arrays are of
sufficient size. I could have just added some comment to document that
we must be careful when calling this, but this is currently completely
unused code. So I prefer to just clean it out.

If we need something like this in the future, we can just do it better.
2026-04-02 11:45:25 +02:00
Alx Sa
bfec7079f0 plug-ins: Prevent attack via APNG transparent chunk
Resolves #16150
Per Bronson Yen, it's possible to create a transparent chunk
that's larger than 256 index values. In that case, the trans[]
array will overflow since we initialize it to 256 indexes.
This patch adds a check to make sure the iterator used for the
transparency for loop does not exceed the array size even if
the chunk size does.
2026-04-02 05:34:45 +00:00
Ekaterine Papava
7c604fc722 Update Georgian translation 2026-04-02 03:48:40 +00:00
Bruno Lopes
27bb2a8721 meson: Do not enable OpenMP on clang-cl
Closes: #16145
2026-04-01 21:40:41 -03:00
Bruno Lopes
2832b15f0a gitlab-ci: Ensure recent meson on MSVC builds 2026-04-01 21:40:41 -03:00
Gabriele Barbero
8af15d525a tools: fix font size jump when using shortcuts
Previously, when using shortcuts to increase or decrease the font size of
the selected text, the size would jump to 0. This behavior occurred because,
if the text did not yet have a font tag, the initial font size was evaluated as 0.

This commit ensures that the text tool's default font size is used when
no font tag is present. This prevents the font size from jumping to 0 the
first time the shortcuts are used.
2026-04-02 00:24:26 +02:00
Bruno Lopes
d63687aefd gitlab-ci: Fix typo on issue-bot needs: 2026-04-01 18:50:03 -03:00
Bruno Lopes
e7bca20795 gitlab-ci: Run issue-bot when scheduled Clang build check fails 2026-04-01 18:35:34 -03:00
Sabri Ünal
48ecc40599 Update Turkish translation 2026-04-01 21:27:12 +00:00
Sabri Ünal
e79c142d1c Update Turkish translation 2026-04-01 21:19:38 +00:00
Jan Papež
26322f0f43 Update Czech translation 2026-04-01 20:13:33 +00:00
Jehan
b402e7d73b Revert "meson: Set -Wno-vla-cxx-extension"
This reverts commit 6f655967dc.

This should not be needed anymore.
2026-04-01 18:52:45 +02:00
Jehan
2c8d91c3cc app: further remove a variable length array.
Fixes when compiling:

> error: variable length array ‘mask_row_buf’ is used

With this and previous commit, we can now compile with C++ flags
-Werror=vla and get no build failures.
2026-04-01 18:52:45 +02:00
Jehan
9257af7570 app: do not use variable length arrays.
Fixing in the gimp-macos-inhouse: [arm64] job:

> ../app/core/gimpbrush-transform.cc:869:17: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]

Also adding some asserts in some places where we rely on the
MAX_CHANNELS constant so that we will quickly detect if this variable
needs to be further bumped in the future (especially as we will add
CMYK+ support as backend format).
2026-04-01 18:52:45 +02:00
Bruno Lopes
08121e09bd build/linux: Update poppler module to 26.04 2026-04-01 11:37:33 -03:00
Bruno Lopes
1dd77b6fdf plug-ins: No need to clang-specific pragma
This partially reverts 94f77bd2
2026-04-01 09:47:56 -03:00
Bruno Lopes
2e7ab376bf gitlab-ci: Fix MSYS_ROOT leaking to MSVC builds 2026-04-01 09:25:48 -03:00
Bruno Lopes
bf9e206c39 build/windows: Fail on warnings on Clang-CL builds for gimp sake 2026-04-01 08:44:37 -03:00
Bruno Lopes
9df9cf7ed1 libgimp: Fix last MSVC warning 2026-04-01 08:43:00 -03:00
Bruno Lopes
ca7da0080a libgimpwidgets: Use gdk_pixbuf_get_pixels on older gdk_pixbuf
Since our minimum version is 2.30.8.

This solves a warning from Clang-CL.
2026-04-01 08:42:48 -03:00
Bruno Lopes
eaa472158c plug-ins: Silence deprecation warning about rsvg_handle_set_size_callback 2026-04-01 08:04:56 -03:00
Bruno Lopes
d025b02823 plug-ins: Use localtime_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:38:12 -03:00
Bruno Lopes
fe95ec6ecf libgimpconfig: Use strcat_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:16:40 -03:00
Bruno Lopes
f4969c2f80 plug-ins: Use fopen_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-04-01 07:16:32 -03:00
Bruno Lopes
f14f9516e2 plug-ins: Fix some problematic Windows functions
The macro should be enough but
on these source files it does not work.
2026-03-31 21:44:51 -03:00
Bruno Lopes
dae02feed3 plug-ins: Use Glib date-time functions 2026-03-31 21:44:51 -03:00
Bruno Lopes
4643f7898f plug-ins: More casting fixes 2026-03-31 21:44:51 -03:00
Bruno Lopes
3807b2f311 app, plug-ins: More sscanf_s on Windows 2026-03-31 21:44:51 -03:00
Bruno Lopes
8aeb5d6f53 app, libgimpwidgets: More strcpy_s on Windows 2026-03-31 21:44:51 -03:00
Alx Sa
a749329ab6 tools: Turn off floating selection outline when moving
When moving a floating layer or selection, we draw a solid
border around the object. However, we also let the "marching
ants" selection continue (if the user has it enabled). This slows
down performance when moving, especially on large selections.

This patch incorporates logic from the Selection tools into the
Edit Selection tool (which the Move Tool uses for translation).
It stores the user's "Show Selection" setting, sets it to FALSE
while moving the layer or selection, then restores it to its
prior value when the cursor is released.

This logic also extends to using Ctrl + Alt to drag a floating
selection out of a layer that already has a selection.
2026-03-31 23:46:05 +00:00
Bruno Lopes
e97e3d0e35 plug-ins: Forgot a macro 2026-03-31 18:58:47 -03:00
Bruno Lopes
55cf88f2c8 build/macos: Fail on warnings on Apple Clang builds for gimp sake 2026-03-31 18:58:47 -03:00
Bruno Lopes
6f655967dc meson: Set -Wno-vla-cxx-extension
As briefly discussed with @ok and @cmyk.student on IRC,
it seems reasonable, specially considering it is C++.
2026-03-31 18:58:42 -03:00
Bruno Lopes
d5d0527955 gitlab-ci: Make branches-check interruptible 2026-03-31 16:30:56 -03:00
Alx Sa
127510cd81 core: Use MAX_CHANNELS for Histogram limit
gimphistogram.c used its own custom MAX_N_COMPONENTS
define for the max value of its "n-components" property.
Since this value is the same as MAX_CHANNELS, it would be
good to use the global constant so the histogram limit automatically
updates when we added a new format with a larger number of components
such as CMYKA.
2026-03-31 19:28:05 +00:00
Bruno Lopes
657dceb3ed app: Use g_strerror 2026-03-31 16:27:25 -03:00
Bruno Lopes
d254c5684c app, libgimp*, plug-ins: Use strtok_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 16:27:25 -03:00
Bruno Lopes
b5ca37f192 app: Properly fix unused eek_handled
Proper fix after 189598c3
2026-03-31 16:27:25 -03:00
Bruno Lopes
7ce3ed457e app, libgimp*, modules: More type <> casting fixes 2026-03-31 16:27:25 -03:00
Jehan
3668ee5562 NEWS: update. 2026-03-31 19:16:35 +02:00
Bruno Lopes
ed3611efa6 app, libgimp*, plug-ins: Use strncpy_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 13:31:33 -03:00
Bruno Lopes
fe185577e2 libgimp: Use new datetime functions to fix CRT_INSECURE_DEPRECATE warnings 2026-03-31 13:31:33 -03:00
Bruno Lopes
3c71c42c31 app, app-tools, libgimp: Use freopen_s on Windows to fix CRT_INSECURE_DEPRECATE 2026-03-31 13:31:33 -03:00
Bruno Lopes
b9ec00c334 libgimpbase, libgimpconfig: Fix some castings 2026-03-31 13:31:33 -03:00
Bruno Lopes
84c7274c70 plug-ins: Use fscanf_s on Windows to fix CRT_INSECURE_DEPRECATE warnings 2026-03-31 13:31:33 -03:00
Ondřej Míchal
6aaefa73c2 libgimp: Sanitize path separators in menu paths
Technically not problematic but when inspecting using Plugin Browser,
the resulting hierarchy is confusing because it sometimes shows actions
to be inside "empty" directories if there are doubled path separators or
trailing ones. Let's not depend on the user to do this correctly when we
can do it for them.
2026-03-31 18:02:44 +03:00
Gabriele Barbero
2d83568bb9 tools: prioritize proxy bindings over IM context in text tool
Try proxy bindings before the IM context. On macOS and Windows,
the IM context consumes Alt+key events (Option produces special
characters on macOS; Alt triggers alt-codes on Windows), so
bindings such as Alt+Plus/Minus (size) and Alt+arrows
(baseline/kerning) would never be reached otherwise.
2026-03-31 15:31:25 +02:00
Bruno Lopes
189598c330 Revert "app: Add macro to fix unused eek_handled variable"
This reverts commit 499e18f84e.
2026-03-31 07:34:49 -03:00
Bruno Lopes
499e18f84e app: Add macro to fix unused eek_handled variable 2026-03-30 22:52:45 -03:00
Bruno Lopes
1c59ad3f17 libgimpwidgets: Comment unused remove_input_window_class function 2026-03-30 22:48:35 -03:00
Bruno Lopes
a146c4ae56 plug-ins: Do not redefine math macros on MSVC 2026-03-30 22:32:01 -03:00
Bruno Lopes
77682518b9 app, plug-ins: Use strcpy_s on Windows to fix CRT_INSECURE_DEPRECATE warnings 2026-03-30 22:32:01 -03:00
Bruno Lopes
2066844166 app, lib*, plug-ins: Use sscanf_s on Windows to fix CRT_INSECURE_DEPRECATE warns 2026-03-30 22:31:57 -03:00
Bruno Lopes
6f33a6a896 modules: Comment unused gimp_input_device_store_remove 2026-03-30 21:37:04 -03:00
Bruno Lopes
8b9ee6d2a8 app, tools: Use cross-platform g_getenv, not getenv
It uses the safe URCT function under the hood.
2026-03-30 21:36:54 -03:00
Bruno Lopes
854caadbc3 build/windows: Update MSVC patch after md generation commit 2026-03-30 17:50:52 -03:00
Bruno Lopes
2a341b815c app: Change some booleans on propgui-types to unsigned integers
This fixes an Apple Clang warning about implicit truncation
from 'int' to a one-bit wide bit-field
2026-03-30 16:09:13 -03:00
Bruno Lopes
c19ed5ca98 plug-ins: Cast g_string_append_c argument to gchar on file-tiff
Silences an Apple Clang warning
2026-03-30 16:09:13 -03:00
Bruno Lopes
811c0c8546 app: Use posix_spawn on macOS
Fixes a Apple Clang warning.
vfork is considered deprecated and unsafe on such platform
2026-03-30 16:09:13 -03:00
Bruno Lopes
ae0a6b028e libgimpwidgets: Remove apparently bogus variable 2026-03-30 16:09:13 -03:00
Kolbjørn Stuestøl
82f4ffefa9 Update Norwegian Nynorsk translation 2026-03-30 18:54:10 +00:00
Yuri Chornoivan
3b7a92fc5d Update Ukrainian translation 2026-03-30 18:51:39 +00:00
Kolbjørn Stuestøl
e9a608a0f5 Update Norwegian Nynorsk translation 2026-03-30 18:51:16 +00:00
Kolbjørn Stuestøl
774c3988bb Update Norwegian Nynorsk translation 2026-03-30 18:46:04 +00:00
Kolbjørn Stuestøl
d6fa046f4f Update Norwegian Nynorsk translation 2026-03-30 18:38:51 +00:00
Kolbjørn Stuestøl
1116615856 Update Norwegian Nynorsk translation 2026-03-30 18:37:36 +00:00
Bruno Lopes
ae339e180e libgimp: Support GLib 2.87.3 platform-specific introspection 2026-03-30 12:31:37 -03:00
Jehan
0148fcbac1 docs, tools: generate Mardown versions of the man pages directly…
… from the main repository.

The new script is basically a copy of tools/man_to_md.py from the
gimp-web repository, with a few improvements.

This is meant to improve our release procedure, with much more
automatization and less manual steps.
2026-03-30 11:34:25 +02:00
Марко Костић
79d37e234b Update Serbian translation 2026-03-30 07:08:01 +00:00
Bruno Lopes
74efec2b76 app: Fix mixed declaration and code of infoCount 2026-03-29 21:07:00 -03:00
Bruno Lopes
e6eeaba58e app: Explicity cast third argument of gimp_enum_radio_box_add to gint
To fix a Apple Clang warning.

gint is what the function on app/widgets/gimpwidgets-utils.h expects.
2026-03-29 21:07:00 -03:00
Bruno Lopes
6300b7377f app: Fix mix of declaration and code on *request and *session 2026-03-29 21:07:00 -03:00
Bruno Lopes
9b533c5099 libgimpwidgets: Use NSWindowStyleMaskBorderless and NSEventTypeMouseEntered 2026-03-29 21:07:00 -03:00
Bruno Lopes
9e664f140d app: Do not set max_n_props array length with const as per Apple Clang warning 2026-03-29 21:07:00 -03:00
Bruno Lopes
94f77bd256 plug-ins: Silence 'register' storage class specifier warning on Clang too 2026-03-29 21:07:00 -03:00
luming zh
1cc5458558 Update Chinese (China) translation 2026-03-29 23:28:51 +00:00
Bruno Lopes
a71ecd0dda app: Import all Foundation headers needed for NSLocale
The previous NSLocale.h include was limited and not enough,
causing warnings from Apple Clang. Let's fix that.
2026-03-29 18:56:51 -03:00
Bruno Lopes
8c0ce0cd64 plug-ins: Fix many type conversions on file-psd
As per Apple Clang warnings.
2026-03-29 18:31:52 -03:00
Bruno Lopes
c69549aff5 app, libgimpwidgets: Fix some declarations mixed with code 2026-03-29 17:19:42 -03:00
Bruno Lopes
af1dac3c51 app, plug-ins: Comment unused stuff on macOS
This fixes Apple Clang warnings about:

- idx
- count_large
- count_nan
- n
- iteration
- original_id
- real_pos
2026-03-29 17:19:42 -03:00
Bruno Lopes
f4f1baf5ef app, libgimp, libgimpbase, libgimpwidgets, plug-ins: Add macro to unused code
This fixes Apple Clang warnings about:

- xdiff
- ydiff
- gimp_ui_get_foreign_window
- locale_parser_parse
- use_app_menu
- gimp_unique_dbus*
- transient_set
- gimp_get_foreign_window
- support
2026-03-29 17:19:42 -03:00
Baurzhan Muftakhidinov
f99fbdca8a Update Kazakh translation 2026-03-29 17:17:39 +00:00
Baurzhan Muftakhidinov
0bbddc6cda Update Kazakh translation 2026-03-29 17:17:16 +00:00
Baurzhan Muftakhidinov
f629be96a1 Update Kazakh translation 2026-03-29 17:16:53 +00:00
Martin
ee9447bf06 Update Slovenian translation 2026-03-29 17:06:11 +00:00
Bruno Lopes
2bdc93281c build, libgimpwidgets, meson: Add ScreenCaptureKit support
Inspired by https://github.com/neutralinojs/neutralinojs/pull/1477/changes
which was found by Alex.

This makes possible to build GIMP on macOS 12+ targets, which is
useful for local builds. We, however, will keep targeting macOS 11.
2026-03-29 11:55:36 -03:00
Bruno Lopes
4f1c6a2a8b build/macos: Improve gexiv 0.16 patch for Homebrew builds
This makes building less noisy while we don't support the new API.
2026-03-29 10:42:44 -03:00
Alx Sa
8eae22306a widgets: Block signals when changing visible filters
eec9d512 did not block calls to
gimp_drawable_filters_editor_visible_all_toggled () when
updating the "All Visible" toggle button in
gimp_drawable_filters_editor_set_sensitive (). This resulted
in unexpected visibility changes in some combinations of
filters being turned on and off.
This patch adds the blocking calls around the call to
gtk_toggle_button_set_active () to keep this consistent.
2026-03-29 12:36:39 +00:00
Bruno Lopes
1d4f942239 meson: Assorted fixes 2026-03-29 07:47:52 -03:00
Bruno Lopes
e2549ef383 meson: Move pango checks to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
3a4ceb0b3a meson: Unify scattered macOS-specific code 2026-03-29 07:47:52 -03:00
Bruno Lopes
66d5e9c9f9 meson: Move gimpdir and project_subdir to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
497ffd8eff meson: Move exec_ver to relevant section 2026-03-29 07:47:52 -03:00
Bruno Lopes
ec22a2f058 build/macos: Fallback to SDK version on Assets.car generation
This is needed when MACOSX_DEPLOYMENT_TARGET is not set.
2026-03-29 07:47:32 -03:00
Bruno Lopes
f8a5b2ebb9 gitlab-ci: Do not pull MacPorts cache on Homebrew builds 2026-03-28 22:16:16 -03:00
Anders Jonsson
69c32c89eb app, etc: fix presets typo in blurb 2026-03-29 01:03:59 +01:00
Bruno Lopes
477c751562 gitlab-ci: Fail on warnings on GNU Clang builds for gimp sake
Closes: #8033
2026-03-28 19:51:25 -03:00
Bruno Lopes
e64058d23b app: Silence variable is not needed and will not be emitted warnings 2026-03-28 19:51:25 -03:00
Bruno Lopes
2381ec5c7c app: Convert history_duration to gdouble for unambiguous division 2026-03-28 19:51:25 -03:00
Bruno Lopes
3835167be6 app: Convert some vars to guint so make bitwise operation unambiguous
Silences a GNU Clang warning.
2026-03-28 19:51:25 -03:00
Bruno Lopes
0530069052 app: Convert color_type to signed int so make the check meaningful
This fixes a GNU Clang warning:

warning: result of comparison of unsigned enum expression >= 0 is always true
2026-03-28 19:51:25 -03:00
Bruno Lopes
0834c7c954 app, plug-ins: Use GINT_TO_POINTER / GPOINTER_TO_INT for portability
Doing traditional explicit conversion (casting) causes warnings.
See: https://docs.gtk.org/glib/conversion-macros.html
2026-03-28 19:51:25 -03:00
Bruno Lopes
41c9d8ce9c plug-ins: Initialize raw_len32 2026-03-28 19:51:25 -03:00
Bruno Lopes
c8c420aa18 app, plug-ins: Comment pixel, total, flags and count unused variables 2026-03-28 19:51:25 -03:00
Jehan
0cb6d9cf7b Post-release version bump to GIMP 3.2.3. 2026-03-28 20:46:29 +01:00
Jehan
c6e8b5f7ec build: set Snapcrash to nightly build. 2026-03-28 20:45:05 +01:00
Bruno Lopes
81f7b3ad6e build/windows: No need to download .NET for PowerShell
It is already bundled on the .zip we download.

Reapplied after 6e5c6b83
2026-03-28 11:21:56 -03:00
Bruno Lopes
6e5c6b83f0 Revert "build/windows: No need to download .NET for PowerShell"
This reverts commit 963c896313.

Ouch, here we go again with git flaky LF/CRLF line ending handling.
2026-03-28 11:17:13 -03:00
Bruno Lopes
963c896313 build/windows: No need to download .NET for PowerShell
It is already bundled on the .zip we download.
2026-03-28 11:09:54 -03:00
Bruno Lopes
eb119759ca build/macos: maxflow is now available on MacPorts
See: 70daadd5fb
2026-03-28 09:55:34 -03:00
Bruno Lopes
456de6761e meson: Fix typo on have_lua_lgi check
Closes #16120
2026-03-28 09:00:42 -03:00
Bruno Lopes
476407cd1b build/windows: Different .NET versions should be installed on same DOTNET_ROOT 2026-03-28 07:57:14 -03:00
230 changed files with 70743 additions and 68470 deletions

View file

@ -161,25 +161,25 @@ deps-debian-nonreloc:
# Install deps
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates \\" >> Dockerfile
## 'ca-certificates' and 'git' are NOT gimp deps, they are installed only to our Docker image work
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates git \\" >> Dockerfile
## Build-time only dependencies
- echo "${TOOLCHAIN:-build-essential}
appstream
bison
desktop-file-utils
flex
gettext
gi-docgen
git
gobject-introspection
libgtk-3-bin
locales
meson
valac
xsltproc \\" >> Dockerfile
## Runtime dependencies
- echo "at-spi2-core
ffmpeg
gettext
gjs
glib-networking
graphviz
@ -214,14 +214,13 @@ deps-debian-nonreloc:
libqoi-dev
librsvg2-dev
libsuitesparse-dev
libtiff-dev
$UMFPACK
libtiff-dev
libunwind-dev
libwebp-dev
libwmf-dev
libxmu-dev
libxpm-dev
locales
mypaint-brushes
poppler-data
python3
@ -286,7 +285,7 @@ gimp-debian-nonreloc:
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS
$MESON_OPTIONS $WARN_AS_ERROR_ON_CI
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
@ -546,6 +545,7 @@ gimp-snap:
STORE_OPTION: '-Dms-store=true'
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
variables:
MSYS_ROOT: ""
VCPKG_ROOT: "$CI_PROJECT_DIR/vcpkg"
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: "-msvc"
@ -567,7 +567,7 @@ gimp-snap:
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
- $GIMP_PREFIX = "$PWD\_install-$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())"
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install meson }
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install --upgrade meson }
- if ("$VARIANT" -eq '-msvc') { $VSINSTALLDIR = $(vswhere -products * -latest -property installationPath); Import-Module "$VSINSTALLDIR\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"; Enter-VsDevShell -VsInstallPath "$VSINSTALLDIR" -SkipAutomaticLocation -DevCmdArguments "-arch=$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())" }
#40min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
timeout: 240m
@ -576,13 +576,13 @@ gimp-snap:
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
## Build-time vars
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
## Runtime vars
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_HOST_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
## MSVC-specific vars
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\glib;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gdk-pixbuf;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gettext\bin;$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxml2;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxslt;$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\plugins\glib-networking" }
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$((Get-ChildItem "$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\tools" -Recurse -Filter *.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DirectoryName -Unique) -join ';');$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\glib-networking"; $env:LIBHEIF_PLUGIN_PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_HOST_TRIPLET\plugins\libheif" }
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
deps-win:
@ -670,7 +670,7 @@ deps-macos-inhouse:
extends: .macos-inhouse
stage: dependencies
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
@ -695,7 +695,7 @@ gimp-macos-inhouse:
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
@ -794,6 +794,7 @@ branches-check:
extends: .default
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
interruptible: true
stage: analysis
variables:
GIT_DEPTH: "0"
@ -820,6 +821,33 @@ cppcheck:
- report/
expire_in: 8 days
issue-bot:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_MESON_CLANG != null || $GIMP_CI_MESON_MSVC != null || $GIMP_CI_MESON_APPLECLANG != null)
when: on_failure
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && ($GIMP_CI_RASTER_ICONS != null || $GIMP_CI_CPPCHECK != null)
when: on_failure
needs:
- job: gimp-debian-nonreloc
optional: true
- job: gimp-win
optional: true
- job: gimp-macos-inhouse
optional: true
- job: cppcheck
optional: true
stage: analysis
image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
variables:
ISSUE_BOT_API_TOKEN: $WILBER_BOT
script:
- LATEST_API_TOKEN=20270330
- printf "(INFO) Token expire date is $(date -d "$LATEST_API_TOKEN" +"%x")\n"
- if [ "$(date +%Y%m%d)" -ge "$LATEST_API_TOKEN" ]; then
printf '\033[31m(ERROR)\033[0m API token for bot expired. Please ask the maintainer to issue a new one then save its value on WILBER_BOT protected var.\n';
exit 1;
fi
- /issue-bot
## Ready-to-distribute ##
@ -920,7 +948,8 @@ include:
project: GNOME/citemplates
file: flatpak/flatpak_ci_initiative.yml
#flatpak_ci_initiative.yml is extremely pervasive. See: https://gitlab.gnome.org/GNOME/citemplates/-/issues/35
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
#keep 'ref:' synced with submission section of build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
ref: b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb
dist-flatpak-weekly:
extends:

View file

@ -212,7 +212,7 @@ help in that regard:
15. GObject Introspection requires the following dependencies to be
built and installed with introspection as well: babl, cairo,
GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
GdkPixbuf, GEGL, GIO, GLib, GObject, GTK and Gexiv2.
16. Windows builds can now generate backtrace logs upon a crash.
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
@ -311,7 +311,6 @@ help in that regard:
openexr @OPENEXR_REQUIRED_VERSION@ OpenEXR
OpenJPEG @OPENJPEG_REQUIRED_VERSION@ JPEG 2000
qoi - QOI
webkit @WEBKITGTK_REQUIRED_VERSION@ Help browser & webpage
vala - Vala plug-ins
24. Summary of optional runtime dependencies:

63
NEWS
View file

@ -6,6 +6,69 @@
This is the stable branch of GIMP.
Overview of Changes from GIMP 3.2.2 to GIMP 3.2.4
=================================================
Core:
- The "edit-fill-*" actions will now behave accordingly on specific
cases. E.g. it will skip layers which can't be filled (content-lock
layers and link layers) and it will fill the expected way
non-rasterized text and vector layers.
- Images opened through command lines are not considered stray images
anymore on exit when run without a GUI (scripts, etc.).
- We improved the support of the process temporary folder, so that we
can avoid clashes when several users run GIMP on a same computer.
Furthermore the temporary folder is now deleted at startup (unless
it is not empty, which it should be).
Tool
- Text tool:
* When editing text, prioritize our global actions when a
shortcut matches, before sending the hit keys to the IME (Input
Method Engine). Otherwise some IME may consume our keys and block
custom shortcuts (e.g. Alt+key events are often used to trigger
special characters on macOS or Windows and may block core
actions).
* Prevent font size jumping to 0 when using shortcuts on selected
text.
- Selection tools: when moving a floating layer or selection,
temporarily disable the marching ants outline. Among other reasons,
it improves performance.
Plug-Ins:
- Fixes bugs to: APNG import, PAA import.
- Improved PDF export.
- file-compressor: improved error messaging.
API:
- libgimp/PDB:
* libgimp/PDB functions gimp_context_set_line_width_unit() and
gimp_vector_layer_set_stroke_width_unit() now accept pixel as input unit.
* Improved error handling in gimp_temp_file().
* New function: gimp_resources_loaded()
- libgimp:
* A function gimp_env_exit() was added, but same as gimp_env_init(),
it is not declared in public headers and should never be used by
plug-ins. It is considered private.
* gimp_quit() function is deprecated.
- PDB:
* (gimp-quit) procedure (without libgimp wrapper) is deprecated.
Build:
- Many build warnings are being cleaned out.
- New jobs are being set up with -Werror progressively as we weed out
existing build warnings.
- The issue bot will now run and create reports when specific jobs
fail.
- New rules to generate Markdown versions of our man pages for the
website.
Overview of Changes from GIMP 3.2.0 to GIMP 3.2.2
=================================================

View file

@ -65,8 +65,19 @@ main (int argc,
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0 && ! g_getenv ("TERM") && ! g_getenv ("SHELL"))
{
/* 'r' is needed to prevent interleaving and '+' to support colors */
#ifndef _UCRT
freopen ("CONOUT$", "r+", stdout);
freopen ("CONOUT$", "r+", stderr);
#else
FILE* fileOut;
FILE* fileErr;
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
if (errOut != 0 || errErr != 0)
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
#endif
_flushall ();
{

View file

@ -37,11 +37,15 @@
#include "core/gimplayer.h"
#include "core/gimplayer-new.h"
#include "core/gimplayermask.h"
#include "core/gimplinklayer.h"
#include "core/gimplist.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
#include "path/gimppath-import.h"
#include "path/gimpvectorlayer.h"
#include "text/gimptextlayer.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimphelp-ids.h"
@ -586,7 +590,60 @@ edit_fill_cmd_callback (GimpAction *action,
gimp_fill_options_get_undo_desc (options));
for (iter = drawables; iter; iter = iter->next)
gimp_drawable_edit_fill (iter->data, options, NULL);
{
/* Skip layers that can't be filled, like pixel-locked layers */
if (gimp_item_is_content_locked (GIMP_ITEM (iter->data), NULL) ||
gimp_item_is_link_layer (GIMP_ITEM (iter->data)))
continue;
if (gimp_item_is_text_layer (iter->data) ||
gimp_item_is_vector_layer (iter->data))
{
GimpPattern *pattern = NULL;
GeglColor *color = NULL;
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
else if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_BG_COLOR)
color = gimp_context_get_background (GIMP_CONTEXT (options));
else
pattern = gimp_context_get_pattern (GIMP_CONTEXT (options));
if (color)
{
if (gimp_item_is_vector_layer (iter->data))
{
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data),
NULL,
"fill-style",
GIMP_CUSTOM_STYLE_SOLID_COLOR,
"fill-color",
color, NULL);
gimp_vector_layer_refresh (iter->data);
}
else
{
gimp_text_layer_set (iter->data, NULL, "color", color,
NULL);
}
}
else if (pattern &&
gimp_item_is_vector_layer (iter->data))
{
gimp_vector_layer_set (GIMP_VECTOR_LAYER (iter->data), NULL,
"fill-style",
GIMP_CUSTOM_STYLE_PATTERN,
"fill-pattern",
pattern,
NULL);
gimp_vector_layer_refresh (iter->data);
}
}
else
{
gimp_drawable_edit_fill (iter->data, options, NULL);
}
}
gimp_image_undo_group_end (image);
gimp_image_flush (image);

View file

@ -76,7 +76,7 @@ gradient_editor_left_color_type_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, &left, NULL);
if (gradient &&
color_type >= 0 &&
(gint) color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_left_color_type (gradient, left))
{
@ -197,7 +197,7 @@ gradient_editor_right_color_type_cmd_callback (GimpAction *action,
gimp_gradient_editor_get_selection (editor, &gradient, NULL, &right);
if (gradient &&
color_type >= 0 &&
(gint) color_type >= 0 &&
color_type !=
gimp_gradient_segment_get_right_color_type (gradient, right))
{

View file

@ -321,15 +321,15 @@ app_run (const gchar *full_prog_name,
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, TRUE);
g_clear_object (&app);
gimp_gegl_exit (gimp);
errors_exit ();
while (g_main_context_pending (NULL))
g_main_context_iteration (NULL, TRUE);
g_object_unref (gimp);
gimp_debug_instances ();

View file

@ -82,7 +82,7 @@ _("Context-dependent mouse pointers are helpful. They are enabled by " \
#define DEFAULT_TOOL_PRESET_BLURB \
"Specify a default tool preset. The tool preset is searched for in the " \
"specified tool prests path."
"specified tool presets path."
#define CUSTOM_TITLE_BAR_BLURB \
_("Merge menu and title bar (client-side decoration)")

View file

@ -30,7 +30,7 @@
/* former base/ defines */
#define MAX_CHANNELS 4
#define MAX_CHANNELS 5
#define RED 0
#define GREEN 1

View file

@ -38,6 +38,10 @@
#include <io.h>
#endif
#ifdef __APPLE__
#include <spawn.h>
#endif
#include "core-types.h"
#include "gimp-spawn.h"
@ -167,7 +171,7 @@ gimp_spawn_async (gchar **argv,
g_return_val_if_fail (argv != NULL, FALSE);
g_return_val_if_fail (argv[0] != NULL, FALSE);
#ifdef HAVE_VFORK
#if defined(HAVE_VFORK) && !defined(__APPLE__)
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_CHILD_INHERITS_STDIN))
@ -232,7 +236,36 @@ gimp_spawn_async (gchar **argv,
return TRUE;
}
}
#endif /* HAVE_VFORK */
#elif defined(__APPLE__)
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_CHILD_INHERITS_STDIN))
{
pid_t pid;
int status;
extern char **environ;
char **child_env = envp ? envp : environ;
/* posix_spawn combines fork and exec */
status = posix_spawn (&pid, argv[0], NULL, NULL, argv, child_env);
if (status != 0)
{
g_set_error (error,
G_SPAWN_ERROR,
exec_err_to_g_error (status),
_("Failed to execute child process “%s” (%s)"),
argv[0],
g_strerror (status));
return FALSE;
}
if (child_pid) *child_pid = pid;
return TRUE;
}
#endif
return g_spawn_async (NULL, argv, envp, flags, NULL, NULL, child_pid, error);
}

View file

@ -165,17 +165,17 @@ gimp_get_default_language (const gchar *category)
#ifdef G_OS_WIN32
p = getenv ("LC_ALL");
p = (gchar *) g_getenv ("LC_ALL");
if (p != NULL)
lang = g_strdup (p);
else
{
p = getenv ("LANG");
p = (gchar *) g_getenv ("LANG");
if (p != NULL)
lang = g_strdup (p);
else
{
p = getenv (category);
p = (gchar *) g_getenv (category);
if (p != NULL)
lang = g_strdup (p);
else
@ -428,7 +428,11 @@ unescape_gstring (GString *string)
{
gchar buf[8];
char_str (l, buf);
#ifndef _UCRT
strcpy (to, buf);
#else
strcpy_s (to, 8, buf);
#endif
to += strlen (buf) - 1;
from = end;
}

View file

@ -28,6 +28,8 @@
#include "core-types.h"
#include "gimpcoreapp.h"
#include "config/gimprc.h"
#include "gegl/gimp-babl.h"
@ -1273,8 +1275,9 @@ gimp_image_opened (Gimp *gimp,
}
GFile *
gimp_get_temp_file (Gimp *gimp,
const gchar *extension)
gimp_get_temp_file (Gimp *gimp,
const gchar *extension,
GError **error)
{
static gint id = 0;
static gint pid;
@ -1293,13 +1296,24 @@ gimp_get_temp_file (Gimp *gimp,
basename = g_strdup_printf ("gimp-temp-%d%d", pid, id++);
dir = gimp_file_new_for_config_path (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
NULL);
error);
if (dir == NULL)
{
g_free (basename);
return NULL;
}
if (! g_file_query_exists (dir, NULL))
{
/* Try to make the temp directory if it doesn't exist.
* Ignore any error.
*/
g_file_make_directory_with_parents (dir, NULL, NULL);
if (! g_file_make_directory_with_parents (dir, NULL, error))
{
g_free (basename);
g_object_unref (dir);
return NULL;
}
}
file = g_file_get_child (dir, basename);
g_free (basename);
@ -1356,9 +1370,20 @@ gimp_exit_idle_cleanup_stray_images (Gimp *gimp)
{
GimpImage *image = image_iter->data;
/* TODO: localize after string freeze. */
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"",
gimp_image_get_display_name (image));
/* Plug-in developers are expected to free the images they
* created, unless they add a display (while in GUI mode), in
* which case the user gets ownership of the image and it will be
* freed as any other image by the GUI.
* On the other hand, images created from command lines are very
* likely to still exist when the software exits, if it was closed
* by the --quit argument, or run without an interface. This is
* normal use case.
*/
if (! gimp_image_get_from_command_line (image) ||
(! gimp->no_interface && ! gimp_core_app_get_quit (GIMP_CORE_APP (gimp->app))))
/* TODO: localize after string freeze. */
g_printerr ("INFO: a stray image seems to have been left around by a plug-in: \"%s\"\n",
gimp_image_get_display_name (image));
g_object_unref (image);
}

View file

@ -256,7 +256,8 @@ void gimp_image_opened (Gimp *gimp,
GFile *file);
GFile * gimp_get_temp_file (Gimp *gimp,
const gchar *extension);
const gchar *extension,
GError **error);
GimpDataFactory *
gimp_get_data_factory (Gimp *gimp,

View file

@ -237,7 +237,7 @@ gimp_backtrace_exception_handler (PEXCEPTION_POINTERS info)
if (info->ExceptionRecord != NULL &&
info->ExceptionRecord->ExceptionCode == EXCEPTION_SET_THREAD_NAME &&
info->ExceptionRecord->NumberParameters *
info->ExceptionRecord->NumberParameters *
sizeof (ULONG_PTR) == sizeof (THREADNAME_INFO))
{
THREADNAME_INFO name_info;
@ -644,7 +644,11 @@ utf8_copy_sized (char *dest,
if (size == 0)
return;
#ifndef _UCRT
strncpy (dest, src, size);
#else
strncpy_s (dest, sizeof (dest), src, size);
#endif
if (dest[size - 1] != 0)
{

View file

@ -841,6 +841,9 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
if (rw <= 0 || rh <= 0)
return;
/* Making sure we have enough elements for acc array. */
g_return_if_fail (components <= MAX_CHANNELS);
sums = g_new (Sums, width * height * components);
gegl_parallel_distribute_range (
@ -866,7 +869,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gint weighted_sum;
gint leading_sum;
gint leading_weighted_sum;
} acc[components];
} acc[MAX_CHANNELS];
memset (acc, 0, sizeof (acc));
@ -946,7 +949,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gfloat weighted_sum;
gint leading_sum;
gint trailing_sum;
} acc[components];
} acc[MAX_CHANNELS];
memset (acc, 0, sizeof (acc));

View file

@ -142,8 +142,6 @@ static void gimp_channel_convert_type (GimpDrawable *drawable,
gboolean push_undo,
GimpProgress *progress);
static void gimp_channel_invalidate_boundary (GimpDrawable *drawable);
static void gimp_channel_get_active_components (GimpDrawable *drawable,
gboolean *active);
static void gimp_channel_set_buffer (GimpDrawable *drawable,
gboolean push_undo,
@ -274,7 +272,6 @@ gimp_channel_class_init (GimpChannelClass *klass)
drawable_class->convert_type = gimp_channel_convert_type;
drawable_class->invalidate_boundary = gimp_channel_invalidate_boundary;
drawable_class->get_active_components = gimp_channel_get_active_components;
drawable_class->set_buffer = gimp_channel_set_buffer;
klass->boundary = gimp_channel_real_boundary;
@ -943,15 +940,6 @@ gimp_channel_invalidate_boundary (GimpDrawable *drawable)
channel->bounds_known = FALSE;
}
static void
gimp_channel_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
/* Make sure that the alpha channel is not valid. */
active[GRAY] = TRUE;
active[ALPHA_G] = FALSE;
}
static void
gimp_channel_set_buffer (GimpDrawable *drawable,
gboolean push_undo,

View file

@ -323,7 +323,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
klass->estimate_memsize = gimp_drawable_real_estimate_memsize;
klass->update_all = gimp_drawable_real_update_all;
klass->invalidate_boundary = NULL;
klass->get_active_components = NULL;
klass->get_active_mask = gimp_drawable_real_get_active_mask;
klass->supports_alpha = gimp_drawable_real_supports_alpha;
klass->convert_type = gimp_drawable_real_convert_type;
@ -1364,21 +1363,6 @@ gimp_drawable_invalidate_boundary (GimpDrawable *drawable)
drawable_class->invalidate_boundary (drawable);
}
void
gimp_drawable_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
GimpDrawableClass *drawable_class;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (active != NULL);
drawable_class = GIMP_DRAWABLE_GET_CLASS (drawable);
if (drawable_class->get_active_components)
drawable_class->get_active_components (drawable, active);
}
GimpComponentMask
gimp_drawable_get_active_mask (GimpDrawable *drawable)
{

View file

@ -60,8 +60,6 @@ struct _GimpDrawableClass
gint height);
void (* update_all) (GimpDrawable *drawable);
void (* invalidate_boundary) (GimpDrawable *drawable);
void (* get_active_components) (GimpDrawable *drawable,
gboolean *active);
GimpComponentMask (* get_active_mask) (GimpDrawable *drawable);
gboolean (* supports_alpha) (GimpDrawable *drawable);
void (* convert_type) (GimpDrawable *drawable,
@ -135,8 +133,6 @@ void gimp_drawable_update_all (GimpDrawable *drawa
void gimp_drawable_filters_changed (GimpDrawable *drawable);
void gimp_drawable_invalidate_boundary (GimpDrawable *drawable);
void gimp_drawable_get_active_components (GimpDrawable *drawable,
gboolean *active);
GimpComponentMask gimp_drawable_get_active_mask (GimpDrawable *drawable);
gboolean gimp_drawable_supports_alpha (GimpDrawable *drawable);

View file

@ -135,6 +135,7 @@ gimp_gradient_load (GimpContext *context,
gint right_color_type;
gdouble left_rgba[4];
gdouble right_rgba[4];
gint n_matched;
seg = gimp_gradient_segment_new ();
@ -175,9 +176,16 @@ gimp_gradient_load (GimpContext *context,
gegl_color_set_pixel (seg->left_color, babl_format ("R'G'B'A double"), left_rgba);
gegl_color_set_pixel (seg->right_color, babl_format ("R'G'B'A double"), right_rgba);
switch (sscanf (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type))
#ifndef _UCRT
n_matched = sscanf (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type);
#else
n_matched = sscanf_s (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type);
#endif
switch (n_matched)
{
case 4:
seg->left_color_type = (GimpGradientColor) left_color_type;

View file

@ -44,7 +44,6 @@
#include "gimpwaitable.h"
#define MAX_N_COMPONENTS 4
#define N_DERIVED_CHANNELS 2
#define PIXELS_PER_THREAD \
@ -146,7 +145,7 @@ gimp_histogram_class_init (GimpHistogramClass *klass)
g_object_class_install_property (object_class, PROP_N_COMPONENTS,
g_param_spec_int ("n-components", NULL, NULL,
0, MAX_N_COMPONENTS, 0,
0, MAX_CHANNELS, 0,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_N_BINS,

View file

@ -993,19 +993,18 @@ gimp_image_convert_profile_colormap (GimpImage *image,
GimpProgress *progress)
{
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
GimpColorTransformFlags flags = 0;
/*GimpColorTransformFlags flags = 0;*/
GimpPalette *palette;
const Babl *space;
const Babl *format;
/* TODO: current implementation ignores the black point compensation
* choice because babl doesn't have BCP support yet.
* Previous code was using gimp_color_transform_new() which used
* LittleCMS directly instead.
* This should be fixed.
if (bpc)
/* TODO: current implementation ignores the black point compensation
* choice because babl doesn't have BCP support yet.
* Previous code was using gimp_color_transform_new() which used
* LittleCMS directly instead.
* This should be fixed.
*/
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION; */
palette = gimp_image_get_colormap_palette (image);
space = gimp_image_get_layer_space (image);

View file

@ -148,6 +148,8 @@ struct _GimpImagePrivate
/* Signal emission accumulator */
GimpImageFlushAccumulator flush_accum;
gboolean from_command_line;
};
#define GIMP_IMAGE_GET_PRIVATE(image) (((GimpImage *) (image))->priv)

View file

@ -909,6 +909,8 @@ gimp_image_init (GimpImage *image)
private->flush_accum.mask_changed = FALSE;
private->flush_accum.floating_selection_changed = FALSE;
private->flush_accum.preview_invalidated = FALSE;
private->from_command_line = FALSE;
}
static void
@ -1388,6 +1390,8 @@ static void
gimp_image_real_mode_changed (GimpImage *image)
{
gimp_projectable_structure_changed (GIMP_PROJECTABLE (image));
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
}
static void
@ -3694,22 +3698,6 @@ gimp_image_get_component_active (GimpImage *image,
return FALSE;
}
void
gimp_image_get_active_array (GimpImage *image,
gboolean *components)
{
GimpImagePrivate *private;
gint i;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (components != NULL);
private = GIMP_IMAGE_GET_PRIVATE (image);
for (i = 0; i < MAX_CHANNELS; i++)
components[i] = private->active[i];
}
GimpComponentMask
gimp_image_get_active_mask (GimpImage *image)
{
@ -3794,22 +3782,6 @@ gimp_image_get_component_visible (GimpImage *image,
return FALSE;
}
void
gimp_image_get_visible_array (GimpImage *image,
gboolean *components)
{
GimpImagePrivate *private;
gint i;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (components != NULL);
private = GIMP_IMAGE_GET_PRIVATE (image);
for (i = 0; i < MAX_CHANNELS; i++)
components[i] = private->visible[i];
}
GimpComponentMask
gimp_image_get_visible_mask (GimpImage *image)
{
@ -6438,3 +6410,28 @@ gimp_image_get_converting (GimpImage *image)
return private->converting;
}
void
gimp_image_set_from_command_line (GimpImage *image,
gboolean from_command_line)
{
GimpImagePrivate *private;
g_return_if_fail (GIMP_IS_IMAGE (image));
private = GIMP_IMAGE_GET_PRIVATE (image);
private->from_command_line = from_command_line;
}
gboolean
gimp_image_get_from_command_line (GimpImage *image)
{
GimpImagePrivate *private;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
private = GIMP_IMAGE_GET_PRIVATE (image);
return private->from_command_line;
}

View file

@ -237,8 +237,6 @@ void gimp_image_set_component_active (GimpImage *image,
gboolean active);
gboolean gimp_image_get_component_active (GimpImage *image,
GimpChannelType type);
void gimp_image_get_active_array (GimpImage *image,
gboolean *components);
GimpComponentMask gimp_image_get_active_mask (GimpImage *image);
void gimp_image_set_component_visible (GimpImage *image,
@ -246,8 +244,6 @@ void gimp_image_set_component_visible (GimpImage *image,
gboolean visible);
gboolean gimp_image_get_component_visible (GimpImage *image,
GimpChannelType type);
void gimp_image_get_visible_array (GimpImage *image,
gboolean *components);
GimpComponentMask gimp_image_get_visible_mask (GimpImage *image);
@ -512,3 +508,7 @@ void gimp_image_invalidate_previews (GimpImage *image);
void gimp_image_set_converting (GimpImage *image,
gboolean converting);
gboolean gimp_image_get_converting (GimpImage *image);
void gimp_image_set_from_command_line (GimpImage *image,
gboolean from_command_line);
gboolean gimp_image_get_from_command_line (GimpImage *image);

View file

@ -194,8 +194,6 @@ static void gimp_layer_convert_type (GimpDrawable *drawable,
gboolean push_undo,
GimpProgress *progress);
static void gimp_layer_invalidate_boundary (GimpDrawable *drawable);
static void gimp_layer_get_active_components (GimpDrawable *drawable,
gboolean *active);
static GimpComponentMask
gimp_layer_get_active_mask (GimpDrawable *drawable);
static void gimp_layer_set_buffer (GimpDrawable *drawable,
@ -448,7 +446,6 @@ gimp_layer_class_init (GimpLayerClass *klass)
drawable_class->supports_alpha = gimp_layer_supports_alpha;
drawable_class->convert_type = gimp_layer_convert_type;
drawable_class->invalidate_boundary = gimp_layer_invalidate_boundary;
drawable_class->get_active_components = gimp_layer_get_active_components;
drawable_class->get_active_mask = gimp_layer_get_active_mask;
drawable_class->set_buffer = gimp_layer_set_buffer;
drawable_class->get_bounding_box = gimp_layer_get_bounding_box;
@ -1511,22 +1508,6 @@ gimp_layer_invalidate_boundary (GimpDrawable *drawable)
floating_sel_invalidate (layer);
}
static void
gimp_layer_get_active_components (GimpDrawable *drawable,
gboolean *active)
{
GimpLayer *layer = GIMP_LAYER (drawable);
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
const Babl *format = gimp_drawable_get_format (drawable);
/* first copy the image active channels */
gimp_image_get_active_array (image, active);
if (gimp_drawable_has_alpha (drawable) &&
gimp_layer_is_alpha_locked (layer, NULL))
active[babl_format_get_n_components (format) - 1] = FALSE;
}
static GimpComponentMask
gimp_layer_get_active_mask (GimpDrawable *drawable)
{

View file

@ -198,8 +198,15 @@ gimp_palette_load (GimpContext *context,
{
GeglColor *color = gegl_color_new ("black");
guint8 rgb[3] = { 0 };
#ifdef _UCRT
gchar *context = NULL;
#endif
#ifndef _UCRT
tok = strtok (str, " \t");
#else
tok = strtok_s (str, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -216,7 +223,12 @@ gimp_palette_load (GimpContext *context,
gimp_file_get_utf8_name (file), linenum);
}
#ifndef _UCRT
tok = strtok (NULL, " \t");
#else
tok = strtok_s (NULL, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -233,7 +245,11 @@ gimp_palette_load (GimpContext *context,
gimp_file_get_utf8_name (file), linenum);
}
#ifndef _UCRT
tok = strtok (NULL, " \t");
#else
tok = strtok_s (NULL, " \t", &context);
#endif
if (tok)
{
if (atoi (tok) < 0 || atoi (tok) > 255)
@ -251,7 +267,11 @@ gimp_palette_load (GimpContext *context,
}
/* optional name */
#ifndef _UCRT
tok = strtok (NULL, "\n");
#else
tok = strtok_s (NULL, "\n", &context);
#endif
/* Historical .gpl format is sRGB. */
gegl_color_set_pixel (color, babl_format ("R'G'B' u8"), rgb);
@ -1881,7 +1901,7 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
if (! strcmp (lower_att_name, "material"))
{
GList *cols;
gint original_id = 0;
/*gint original_id = 0;*/
for (cols = gimp_palette_get_colors (sbz_data->palette);
cols;
@ -1897,7 +1917,7 @@ swatchbooker_load_start_element (GMarkupParseContext *context,
sbz_data->sorted_position++;
break;
}
original_id++;
/*original_id++;*/
}
g_free (lower_att_name);

View file

@ -72,7 +72,7 @@ gimp_pickable_auto_shrink (GimpPickable *pickable,
GeglBuffer *buffer;
GeglRectangle rect;
ColorsEqualFunc colors_equal_func;
guchar bgcolor[MAX_CHANNELS] = { 0, 0, 0, 0 };
guchar bgcolor[MAX_CHANNELS] = { 0 };
guchar *buf = NULL;
gint x1, y1, x2, y2;
gint width, height;

View file

@ -48,6 +48,9 @@ extern "C"
(/* each thread costs as much as */ 64.0 * 64.0 /* pixels */)
static gfloat *mask_row_buf = NULL;
static gsize mask_row_buf_size = 0;
typedef struct
{
gint x;
@ -148,6 +151,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
format = choose_format (src_buffer, select_criterion,
&n_components, &has_alpha);
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
gegl_buffer_sample (src_buffer, x, y, NULL, start_col, format,
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
@ -186,6 +192,9 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
}
g_clear_object (&src_buffer);
g_clear_pointer (&mask_row_buf, g_free);
mask_row_buf_size = 0;
return mask_buffer;
}
@ -228,6 +237,8 @@ gimp_pickable_contiguous_region_by_color (GimpPickable *pickable,
format = choose_format (src_buffer, select_criterion,
&n_components, &has_alpha);
g_return_val_if_fail (n_components <= MAX_CHANNELS, NULL);
gegl_color_get_pixel (color, format, start_col);
if (has_alpha)
@ -689,6 +700,9 @@ gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
if (free_src_buffer)
g_object_unref (src_buffer);
g_clear_pointer (&mask_row_buf, g_free);
mask_row_buf_size = 0;
return mask_buffer;
}
@ -985,10 +999,19 @@ find_contiguous_segment (const gfloat *col,
gfloat *row)
{
gfloat *s;
gfloat mask_row_buf[src_extent->width];
gfloat *mask_row = mask_row_buf - src_extent->x;
gfloat *mask_row;
gfloat diff;
if (mask_row_buf == NULL ||
(gsize) src_extent->width > mask_row_buf_size)
{
mask_row_buf_size = src_extent->width;
mask_row_buf = (gfloat *) g_realloc_n ((gpointer) mask_row_buf,
mask_row_buf_size,
sizeof (gfloat));
}
mask_row = mask_row_buf - src_extent->x;
#ifdef FETCH_ROW
gegl_buffer_get (src_buffer, GEGL_RECTANGLE (0, initial_y, width, 1), 1.0,
src_format,

View file

@ -2005,7 +2005,7 @@ gimp_display_shell_rotate_gesture_maybe_get_state (GtkGestureRotate *gesture,
* last_event happens to not have it. Thus we store the last valid state
* and only update it if we get a valid state from last_event.
*/
guint state = 0;
GdkModifierType state = 0;
const GdkEvent *last_event;
last_event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);

View file

@ -371,7 +371,9 @@ gimp_image_window_constructed (GObject *object)
GimpGuiConfig *config;
GimpDeviceManager *device_manager;
gboolean use_gtk_menubar = TRUE;
#ifndef GDK_WINDOWING_QUARTZ
gboolean use_app_menu = TRUE;
#endif
G_OBJECT_CLASS (parent_class)->constructed (object);
@ -1144,7 +1146,11 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
maximized = TRUE;
if (width)
#ifndef _UCRT
sscanf (aux->value, "%d", width);
#else
sscanf_s (aux->value, "%d", width);
#endif
/* compat handling for right docks */
if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS))

View file

@ -1944,7 +1944,13 @@ gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
sizeof (statusbar->cursor_format_str),
"%%s%%.%df%%s%%.%df%%s",
w_digits, h_digits);
#ifndef _UCRT
strcpy (statusbar->cursor_format_str_f, statusbar->cursor_format_str);
#else
strcpy_s (statusbar->cursor_format_str_f,
sizeof (statusbar->cursor_format_str_f),
statusbar->cursor_format_str);
#endif
g_snprintf (statusbar->length_format_str,
sizeof (statusbar->length_format_str),
"%%s%%.%df%%s", MAX (w_digits, h_digits));

View file

@ -293,7 +293,9 @@ gimp_eek (const gchar *reason,
gboolean use_handler)
{
GimpCoreConfig *config = the_errors_gimp->config;
#if !defined(G_OS_WIN32) || !defined(GIMP_CONSOLE_COMPILATION)
gboolean eek_handled = FALSE;
#endif
GimpDebugPolicy debug_policy;
GList *iter;
gint num_idx;

View file

@ -690,11 +690,12 @@ file_open_from_command_line (Gimp *gimp,
{
success = TRUE;
gimp_image_set_from_command_line (image, TRUE);
g_object_set_data_full (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
}
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL && display)
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
{
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed: %s"),

View file

@ -258,13 +258,13 @@ file_remote_get_temp_file (Gimp *gimp,
const gchar *ext = strchr (basename, '.');
if (ext && strlen (ext))
temp_file = gimp_get_temp_file (gimp, ext + 1);
temp_file = gimp_get_temp_file (gimp, ext + 1, NULL);
g_free (basename);
}
if (! temp_file)
temp_file = gimp_get_temp_file (gimp, "xxx");
temp_file = gimp_get_temp_file (gimp, "xxx", NULL);
return temp_file;
}

View file

@ -604,15 +604,17 @@ void
gimp_update_check (GimpCoreConfig *config)
{
#ifdef PLATFORM_OSX
const gchar *gimp_versions;
const gchar *gimp_versions;
NSMutableURLRequest *request;
NSURLSession *session;
gimp_versions = gimp_get_version_url ();
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:@(gimp_versions)]];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
/* completionHandler is called on a background thread */
[[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *reply;

View file

@ -33,7 +33,7 @@
#include <winnls.h>
#endif
#ifdef PLATFORM_OSX
#include <Foundation/NSLocale.h>
#import <Foundation/Foundation.h>
#endif
#include "language.h"

View file

@ -570,12 +570,15 @@ main (int argc,
#endif
gint retval;
gint i;
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
gint newargc;
#endif
gimp_attach_console_window ();
#if defined(ENABLE_RELOCATABLE_RESOURCES) && defined(__APPLE__)
/* remove MacOS session identifier from the command line args */
gint newargc = 0;
newargc = 0;
for (gint i = 0; i < argc; i++)
{
if (!g_str_has_prefix (argv[i], "-psn_"))
@ -906,6 +909,8 @@ main (int argc,
pdb_compat_mode,
backtrace_file);
gimp_env_exit (FALSE);
g_free (backtrace_file);
g_clear_object (&system_gimprc_file);
@ -959,8 +964,19 @@ gimp_attach_console_window (void)
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0)
{
/* 'r' is needed to prevent interleaving and '+' to support colors */
#ifndef _UCRT
freopen ("CONOUT$", "r+", stdout);
freopen ("CONOUT$", "r+", stderr);
#else
FILE* fileOut;
FILE* fileErr;
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
if (errOut != 0 || errErr != 0)
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
#endif
_flushall ();
{

View file

@ -587,8 +587,13 @@ gimp_curves_config_load_cruft (GimpCurvesConfig *config,
return FALSE;
}
#ifndef _UCRT
if (sscanf (x_str, "%d", &index[i][j]) != 1 ||
sscanf (y_str, "%d", &value[i][j]) != 1)
#else
if (sscanf_s (x_str, "%d", &index[i][j]) != 1 ||
sscanf_s (y_str, "%d", &value[i][j]) != 1)
#endif
{
g_set_error_literal (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,

View file

@ -904,12 +904,21 @@ gimp_levels_config_load_cruft (GimpLevelsConfig *config,
return FALSE;
}
#ifndef _UCRT
fields = sscanf (line, "%d %d %d %d %31s",
&low_input[i],
&high_input[i],
&low_output[i],
&high_output[i],
float_buf);
#else
fields = sscanf_s (line, "%d %d %d %d %31s",
&low_input[i],
&high_input[i],
&low_output[i],
&high_output[i],
float_buf, (unsigned) sizeof (float_buf));
#endif
g_free (line);

View file

@ -591,7 +591,7 @@ struct PaintBuf : Base
}
};
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> dispatch_paint_buf;
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> G_GNUC_UNUSED dispatch_paint_buf;
/* PaintMask, dispatch_paint_mask():
@ -691,7 +691,7 @@ struct DispatchStipple
else
visitor (identity<Stipple<Algorithm, FALSE>> ());
}
} static dispatch_stipple;
} static G_GNUC_UNUSED dispatch_stipple;
/* CompMask, dispatch_comp_mask(), has_comp_mask(), comp_mask_data():
@ -734,7 +734,7 @@ struct CompMask : Base
};
};
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> dispatch_comp_mask;
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> G_GNUC_UNUSED dispatch_comp_mask;
template <class Base>
static constexpr gboolean
@ -815,7 +815,7 @@ static BasicDispatch<
TempCompMask,
ALGORITHM_TEMP_COMP_MASK,
decltype (dispatch_comp_mask)
> dispatch_temp_comp_mask;
> G_GNUC_UNUSED dispatch_temp_comp_mask;
/* CompBuffer, dispatch_comp_buffer(), has_comp_buffer(), comp_buffer_data():
@ -858,7 +858,7 @@ struct CompBuffer : Base
};
};
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> dispatch_comp_buffer;
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> G_GNUC_UNUSED dispatch_comp_buffer;
template <class Base>
static constexpr gboolean
@ -939,7 +939,7 @@ static BasicDispatch<
TempCompBuffer,
ALGORITHM_TEMP_COMP_BUFFER,
decltype (dispatch_comp_buffer)
> dispatch_temp_comp_buffer;
> G_GNUC_UNUSED dispatch_temp_comp_buffer;
/* CanvasBufferIterator, DispatchCanvasBufferIterator:

View file

@ -1287,10 +1287,10 @@ static const gchar *expand_props[] =
"expand-mask-fill-type",
};
static const gint max_n_props = (G_N_ELEMENTS (brush_props) +
G_N_ELEMENTS (dynamics_props) +
G_N_ELEMENTS (gradient_props) +
G_N_ELEMENTS (expand_props));
#define max_n_props (G_N_ELEMENTS (brush_props) + \
G_N_ELEMENTS (dynamics_props) + \
G_N_ELEMENTS (gradient_props) + \
G_N_ELEMENTS (expand_props))
gboolean
gimp_paint_options_is_prop (const gchar *prop_name,
@ -1377,3 +1377,5 @@ gimp_paint_options_copy_props (GimpPaintOptions *src,
g_value_unset (&values[n_props]);
}
}
#undef max_n_props

View file

@ -1220,22 +1220,41 @@ parse_svg_viewbox (const gchar *value,
gchar *tok;
gchar *str = g_strdup (value);
gboolean success = FALSE;
#ifdef _UCRT
gchar *context = NULL;
#endif
x = y = w = h = 0;
#ifndef _UCRT
tok = strtok (str, ", \t");
#else
tok = strtok_s (str, ", \t", &context);
#endif
if (tok)
{
x = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok)
{
y = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok != NULL)
{
w = g_ascii_strtod (tok, NULL);
#ifndef _UCRT
tok = strtok (NULL, ", \t");
#else
tok = strtok_s (NULL, ", \t", &context);
#endif
if (tok)
{
h = g_ascii_strtod (tok, NULL);

View file

@ -3735,7 +3735,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_unit ("line-width-unit",
"line width unit",
"The line width setting unit",
FALSE,
TRUE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -219,7 +219,8 @@ temp_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_get_temp_file (gimp, extension);
file = gimp_get_temp_file (gimp, extension, error);
success = (file != NULL);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
@ -291,12 +292,18 @@ register_gimp_procs (GimpPDB *pdb)
"gimp-quit");
gimp_procedure_set_static_help (procedure,
"Causes GIMP to exit gracefully.",
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.",
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.\n"
"\n"
"This procedure is deprecated without any replacement. Scripts and plug-ins should not request the main process to exit. If you wish to run GIMP non-interactively so that it exits immediately when the batch script ends, call the executable with option `--quit`.\n"
"\n"
"Deprecated: There is no replacement for this procedure.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996");
gimp_procedure_set_deprecated (procedure,
"NONE");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("force",
"force",

View file

@ -30,7 +30,7 @@
#include "internal-procs.h"
/* 785 procedures registered total */
/* 786 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)

View file

@ -48,6 +48,38 @@
#include "gimp-intl.h"
static GimpValueArray *
resources_loaded_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
const gchar *type_name;
gboolean loaded = FALSE;
type_name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
if (g_type_from_name (type_name) == GIMP_TYPE_FONT)
loaded = ! gimp->no_fonts;
else
loaded = ! gimp->no_data;
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_boolean (gimp_value_array_index (return_vals, 1), loaded);
return return_vals;
}
static GimpValueArray *
resource_get_by_name_invoker (GimpProcedure *procedure,
Gimp *gimp,
@ -510,6 +542,37 @@ register_resource_procs (GimpPDB *pdb)
{
GimpProcedure *procedure;
/*
* gimp-resources-loaded
*/
procedure = gimp_procedure_new (resources_loaded_invoker, TRUE);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-resources-loaded");
gimp_procedure_set_static_help (procedure,
"Returns whether resource of a given type were loaded.",
"Returns whether resources of a given type were loaded.\n"
"In particular, it would return FALSE if GIMP was started with `--no-data` or `--no-fonts` for fonts.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2026");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("type-name",
"type name",
"The name of the resource type e.g. GimpFont",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("loaded",
"loaded",
"Whether resources of @type_name were loaded",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-resource-get-by-name
*/

View file

@ -1851,7 +1851,7 @@ register_vector_layer_procs (GimpPDB *pdb)
gimp_param_spec_unit ("unit",
"unit",
"The stroke width unit.",
FALSE,
TRUE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -588,7 +588,11 @@ file_convert_string (const gchar *instr,
}
*tmpptr = '\0';
#ifndef _UCRT
sscanf ((gchar *) tmp, "%o", &k);
#else
sscanf_s ((gchar *) tmp, "%o", &k);
#endif
*(uout++) = k;
break;
@ -626,7 +630,12 @@ file_check_single_magic (const gchar *offset,
gchar num_operator;
/* Check offset */
#ifndef _UCRT
if (sscanf (offset, "%ld", &offs) != 1)
#else
if (sscanf_s (offset, "%ld", &offs) != 1)
#endif
return FILE_MATCH_NONE;
/* Check type of test */
@ -667,11 +676,23 @@ file_check_single_magic (const gchar *offset,
if (g_ascii_isdigit (num_operator_ptr[1]))
{
if (num_operator_ptr[1] != '0') /* decimal */
#ifndef _UCRT
sscanf (num_operator_ptr+1, "%lu", &num_operator_val);
#else
sscanf_s (num_operator_ptr+1, "%lu", &num_operator_val);
#endif
else if (num_operator_ptr[2] == 'x') /* hexadecimal */
#ifndef _UCRT
sscanf (num_operator_ptr+3, "%lx", &num_operator_val);
#else
sscanf_s (num_operator_ptr+3, "%lx", &num_operator_val);
#endif
else /* octal */
#ifndef _UCRT
sscanf (num_operator_ptr+2, "%lo", &num_operator_val);
#else
sscanf_s (num_operator_ptr+2, "%lo", &num_operator_val);
#endif
num_operator = *num_operator_ptr;
}

View file

@ -1117,17 +1117,28 @@ extensions_parse (gchar *extensions)
{
gchar *extension;
gchar *next_token;
#ifdef _UCRT
gchar *context = NULL;
#endif
/* work on a copy */
extensions = g_strdup (extensions);
next_token = extensions;
#ifndef _UCRT
extension = strtok (next_token, " \t,");
#else
extension = strtok_s (next_token, " \t,", &context);
#endif
while (extension)
{
list = g_slist_prepend (list, g_strdup (extension));
#ifndef _UCRT
extension = strtok (NULL, " \t,");
#else
extension = strtok_s (NULL, " \t,", &context);
#endif
}
g_free (extensions);

View file

@ -43,12 +43,12 @@ typedef struct
gdouble min; /* minimal allowable slider value */
gdouble max; /* maximal allowable slider value */
gboolean visible : 1; /* slider is visible */
gboolean selectable : 1; /* slider is selectable */
gboolean movable : 1; /* slider movable */
gboolean removable : 1; /* slider is removable */
guint visible : 1; /* slider is visible */
guint selectable : 1; /* slider is selectable */
guint movable : 1; /* slider movable */
guint removable : 1; /* slider is removable */
gboolean autohide : 1; /* whether to autohide the slider */
guint autohide : 1; /* whether to autohide the slider */
GimpHandleType type; /* slider handle type */
gdouble size; /* slider handle size, as a fraction of *
* the default size */

View file

@ -217,7 +217,7 @@ gimp_font_factory_finalize (GObject *object)
g_slist_free_full (GET_PRIVATE (font_factory)->fonts_renaming_config, (GDestroyNotify) g_free);
g_free (GET_PRIVATE (font_factory)->sysconf);
g_free (GET_PRIVATE (font_factory)->conf);
g_object_unref (GET_PRIVATE (font_factory)->pango_context);
g_clear_object (&GET_PRIVATE (font_factory)->pango_context);
FcConfigDestroy (FcConfigGetCurrent ());
G_OBJECT_CLASS (parent_class)->finalize (object);
@ -867,7 +867,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
fd = g_open ((gchar *) file, O_RDONLY, 0);
if (fd == -1)
{
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, strerror (errno));
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, g_strerror (errno));
n_ignored++;
continue;
}

View file

@ -89,6 +89,22 @@ gimp_text_from_parasite (const GimpParasite *parasite,
gboolean has_markup = g_str_has_prefix (parasite_data, "(markup ");
GimpParasite *new_parasite = NULL;
GString *new_data;
gboolean edited_data = FALSE;
if (! has_markup && strstr (parasite_data, "(markup \"\")") != NULL)
{
/* A bug in GIMP 3.2.2 may have created files with both a text
* and an empty markup. Get rid of the markup which is invalid
* anyway, so that it doesn't override the bare text.
* See #16169.
*/
new_data = g_string_new (parasite_data);
g_string_replace (new_data, "(markup \"\")", "", 1);
parasite_data = g_string_free (new_data, FALSE);
parasite_data_size = strlen (parasite_data) + 1;
edited_data = TRUE;
}
*before_xcf_v19 = (strstr (parasite_data, "(font \"GimpFont\"") == NULL);
/* This is for backward compatibility with older xcf files.
@ -177,6 +193,14 @@ gimp_text_from_parasite (const GimpParasite *parasite,
g_string_free (new_data, TRUE);
}
else if (edited_data)
{
new_parasite = gimp_parasite_new (gimp_parasite_get_name (parasite),
gimp_parasite_get_flags (parasite),
parasite_data_size,
parasite_data);
parasite = new_parasite;
}
if (error == NULL || *error == NULL)
gimp_config_deserialize_parasite (GIMP_CONFIG (text),
@ -185,6 +209,8 @@ gimp_text_from_parasite (const GimpParasite *parasite,
error);
gimp_parasite_free (new_parasite);
if (edited_data)
g_free (parasite_data);
}
else
{

View file

@ -106,11 +106,19 @@ gimp_text_font_name_from_xlfd (const gchar *xlfd)
switch (*fields[i])
{
case 'i':
#ifndef _UCRT
strcpy (buffers[i], "italic");
#else
strcpy_s (buffers[i], sizeof (buffers[i]), "italic");
#endif
i++;
break;
case 'o':
#ifndef _UCRT
strcpy (buffers[i], "oblique");
#else
strcpy_s (buffers[i], sizeof (buffers[i]), "oblique");
#endif
i++;
break;
case 'r':

View file

@ -112,6 +112,8 @@ struct _GimpEditSelectionTool
gdouble last_motion_x; /* Previous coords sent to _motion */
gdouble last_motion_y;
gboolean saved_show_selection;
};
struct _GimpEditSelectionToolClass
@ -177,7 +179,8 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_select)
{
GimpTool *tool = GIMP_TOOL (edit_select);
edit_select->first_move = TRUE;
edit_select->first_move = TRUE;
edit_select->saved_show_selection = FALSE;
gimp_tool_control_set_active_modifiers (tool->control,
GIMP_TOOL_ACTIVE_MODIFIERS_SEPARATE);
@ -228,6 +231,9 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
shell = gimp_display_get_shell (display);
image = gimp_display_get_image (display);
edit_select->saved_show_selection =
gimp_display_shell_get_show_selection (shell);
/* Make a check to see if it should be a floating selection translation */
if ((edit_mode == GIMP_TRANSLATE_MODE_MASK_TO_LAYER ||
edit_mode == GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER) &&
@ -244,6 +250,11 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
edit_mode = GIMP_TRANSLATE_MODE_FLOATING_SEL;
}
/* Turn off "marching ants" when moving selections or floating layers
* for better performance. */
if (edit_mode == GIMP_TRANSLATE_MODE_FLOATING_SEL)
gimp_display_shell_set_show_selection (shell, FALSE);
edit_select->edit_mode = edit_mode;
gimp_edit_selection_tool_start_undo_group (edit_select, image);
@ -460,6 +471,9 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
shell->equidistance_side_vertical = GIMP_ARRANGE_HFILL;
shell->snapped_side_horizontal = GIMP_ARRANGE_HFILL;
shell->snapped_side_vertical = GIMP_ARRANGE_HFILL;
gimp_display_shell_set_show_selection (shell,
edit_select->saved_show_selection);
}
static void

View file

@ -612,6 +612,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
{
GimpTool *tool;
GimpSelectionOptions *options;
GimpDisplayShell *shell;
GError *error = NULL;
g_return_val_if_fail (GIMP_IS_SELECTION_TOOL (sel_tool), FALSE);
@ -620,6 +621,7 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
tool = GIMP_TOOL (sel_tool);
options = GIMP_SELECTION_TOOL_GET_OPTIONS (sel_tool);
shell = gimp_display_get_shell (display);
g_return_val_if_fail (gimp_tool_control_is_active (tool->control) == FALSE,
FALSE);
@ -658,6 +660,9 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
gimp_edit_selection_tool_start (tool, display, coords,
edit_mode, FALSE);
/* Turn off selection for performance if moved as floating selection */
gimp_display_shell_set_show_selection (shell, FALSE);
return TRUE;
}

View file

@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
@ -538,14 +539,6 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
}
}
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
return TRUE;
}
gimp_text_tool_convert_gdkkeyevent (text_tool, kevent);
gimp_text_tool_ensure_proxy (text_tool);
@ -558,6 +551,14 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
return TRUE;
}
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
return TRUE;
}
gtk_text_buffer_get_iter_at_mark (buffer, &cursor,
gtk_text_buffer_get_insert (buffer));
gtk_text_buffer_get_iter_at_mark (buffer, &selection,
@ -1357,6 +1358,13 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter start;
GtkTextIter end;
gdouble default_size;
gdouble x_res, y_res;
gimp_image_get_resolution (text_tool->image, &x_res, &y_res);
default_size = gimp_units_to_points (text_tool->text->font_size,
text_tool->text->unit, y_res);
if (! gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
{
@ -1365,7 +1373,7 @@ gimp_text_tool_change_size (GimpTextTool *text_tool,
gtk_text_iter_order (&start, &end);
gimp_text_buffer_change_size (text_tool->buffer, &start, &end,
amount * PANGO_SCALE);
amount * PANGO_SCALE, default_size * PANGO_SCALE);
}
static void

View file

@ -32,12 +32,12 @@
#include "unique.h"
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
static gboolean gimp_unique_dbus_open (const gchar **filenames,
gboolean as_new);
static gboolean gimp_unique_dbus_batch_run (const gchar *batch_interpreter,
const gchar **batch_commands);
#else
#elif defined(G_OS_WIN32)
static gboolean gimp_unique_win32_open (const gchar **filenames,
gboolean as_new);
#endif
@ -147,7 +147,7 @@ gimp_unique_win32_open (const gchar **filenames,
return FALSE;
}
#else
#elif !defined(PLATFORM_OSX)
static gboolean
gimp_unique_dbus_open (const gchar **filenames,

View file

@ -369,7 +369,7 @@ gimp_colormap_editor_color_update (GimpColorDialog *dialog,
{
push_undo = TRUE;
if (state & gimp_get_toggle_behavior_mask ())
if ((guint)state & (guint)gimp_get_toggle_behavior_mask ())
gimp_context_set_background (image_editor->context, color);
else
gimp_context_set_foreground (image_editor->context, color);

View file

@ -163,7 +163,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
target_list = gtk_drag_dest_get_target_list (GTK_WIDGET (tree_view->view));
target_atom = gtk_drag_dest_find_target (GTK_WIDGET (tree_view->view),
context, target_list);
if (! gtk_target_list_find (target_list, target_atom, &src_type))
if (! gtk_target_list_find (target_list, target_atom, (guint *) &src_type))
goto drop_impossible;
switch (src_type)

View file

@ -1229,7 +1229,7 @@ gimp_dashboard_init (GimpDashboard *dashboard)
gimp_meter_set_history_resolution (GIMP_METER (meter),
interval / 1000.0);
gimp_meter_set_history_duration (GIMP_METER (meter),
priv->history_duration / 1000.0);
(gdouble) priv->history_duration / 1000.0);
gtk_box_pack_start (GTK_BOX (vbox2), meter, FALSE, FALSE, 0);
gtk_widget_show (meter);
@ -2418,6 +2418,11 @@ static void
gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
Variable variable)
{
#ifdef TASK_VM_INFO_REV0_COUNT
task_vm_info_data_t info;
mach_msg_type_number_t infoCount;
#endif
GimpDashboardPrivate *priv = dashboard->priv;
VariableData *variable_data = &priv->variables[variable];
@ -2433,8 +2438,7 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
variable_data->available = TRUE;
variable_data->value.size = info.resident_size;
#else
task_vm_info_data_t info;
mach_msg_type_number_t infoCount = TASK_VM_INFO_COUNT;
infoCount = TASK_VM_INFO_COUNT;
if( task_info(mach_task_self (), TASK_VM_INFO,
(task_info_t)&info, &infoCount ) != KERN_SUCCESS )
@ -2585,7 +2589,11 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
buffer[size] = '\0';
#ifndef _UCRT
if (sscanf (buffer, "%*u %llu %llu", &resident, &shared) != 2)
#else
if (sscanf_s (buffer, "%*u %llu %llu", &resident, &shared) != 2)
#endif
return;
variable_data->available = TRUE;
@ -4970,7 +4978,7 @@ gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
if (group_data->meter)
{
gimp_meter_set_history_duration (group_data->meter,
history_duration / 1000.0);
(gdouble) history_duration / 1000.0);
}
}

View file

@ -795,7 +795,11 @@ gimp_device_info_pad_action_map_foreach (GimpPadActions *pad_actions,
label = g_strdup (gimp_action_get_label (action));
accel_pos = g_utf8_strchr (label, -1, '_');
if (accel_pos)
#ifndef _UCRT
strcpy (accel_pos, accel_pos + 1);
#else
strcpy_s (accel_pos, strlen (accel_pos), accel_pos + 1);
#endif
gtk_pad_controller_set_action (controller,
/* Action type enums are binary compatible */

View file

@ -454,8 +454,15 @@ gimp_drawable_filters_editor_set_sensitive (GimpDrawableTreeView *view)
is_editable = (index >= first_editable &&
index <= last_editable);
g_signal_handlers_block_by_func (editor->visible_button,
gimp_drawable_filters_editor_visible_all_toggled,
view);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->visible_button),
has_visible_filters);
g_signal_handlers_unblock_by_func (editor->visible_button,
gimp_drawable_filters_editor_visible_all_toggled,
view);
gtk_widget_set_sensitive (editor->visible_button,
TRUE);
gtk_widget_set_sensitive (editor->edit_button,

View file

@ -504,9 +504,17 @@ gimp_file_proc_view_pattern_from_extension (const gchar *extension,
pattern = g_new (gchar, 6 + 4 * len);
if (is_meta)
#ifndef _UCRT
strcpy (pattern, "*.*.");
#else
strcpy_s (pattern, 6 + 4 * len, "*.*.");
#endif
else
#ifndef _UCRT
strcpy (pattern, "*.");
#else
strcpy_s (pattern, 6 + 4 * len, "*.");
#endif
for (i = 0, p = pattern + 2; i < len; i++, p+= 4)
{

View file

@ -190,8 +190,8 @@ gimp_fill_editor_constructed (GObject *object)
"pattern-view-size");
gimp_enum_radio_box_add (GTK_BOX (box), pattern_box,
(editor->use_custom_style ?
GIMP_CUSTOM_STYLE_PATTERN :
GIMP_FILL_STYLE_PATTERN),
(gint) GIMP_CUSTOM_STYLE_PATTERN :
(gint) GIMP_FILL_STYLE_PATTERN),
FALSE);
}

View file

@ -593,7 +593,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
GtkWidget *separator;
gboolean found = FALSE;
gint count = position;
gint real_pos = 0;
/*gint real_pos = 0;*/
separator = g_hash_table_lookup (menu->priv->sections, model);
g_return_if_fail (separator != NULL);
@ -601,7 +601,7 @@ gimp_menu_section_items_changed (GMenuModel *model,
children = gtk_container_get_children (GTK_CONTAINER (menu));
for (iter = children; iter; iter = iter->next)
{
real_pos++;
/*real_pos++;*/
if (! found)
{

View file

@ -599,7 +599,7 @@ gimp_modifiers_editor_notify_accelerator (GtkWidget *widget,
GdkModifierType old_modifiers;
GdkModifierType modifiers;
old_modifiers = (GdkModifierType) g_object_get_data (G_OBJECT (widget), "shortcut-modifiers");
old_modifiers = (GdkModifierType) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "shortcut-modifiers"));
shortcut = g_object_get_data (G_OBJECT (widget), "shortcut-button");
combo = g_object_get_data (G_OBJECT (widget), "shortcut-action");

View file

@ -588,8 +588,13 @@ gimp_selection_data_get_image (GtkSelectionData *selection,
gint pid;
gint ID;
#ifndef _UCRT
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#endif
{
return gimp_image_get_by_id (gimp, ID);
}
@ -639,8 +644,13 @@ gimp_selection_data_get_component (GtkSelectionData *selection,
gint ID;
gint ch;
#ifndef _UCRT
if (sscanf (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i:%i", &pid, &ID, &ch) == 3 &&
pid == gimp_get_pid ())
#endif
{
GimpImage *image = gimp_image_get_by_id (gimp, ID);
@ -688,8 +698,13 @@ gimp_selection_data_get_item (GtkSelectionData *selection,
gint pid;
gint ID;
#ifndef _UCRT
if (sscanf (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#else
if (sscanf_s (str, "%i:%i", &pid, &ID) == 2 &&
pid == gimp_get_pid ())
#endif
{
return gimp_item_get_by_id (gimp, ID);
}
@ -961,8 +976,13 @@ gimp_selection_data_get_object (GtkSelectionData *selection,
gpointer object_addr;
gint name_offset = 0;
#ifndef _UCRT
if (sscanf (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
pid == gimp_get_pid () && name_offset > 0)
#else
if (sscanf_s (str, "%i:%p:%n", &pid, &object_addr, &name_offset) >= 2 &&
pid == gimp_get_pid () && name_offset > 0)
#endif
{
const gchar *name = str + name_offset;

View file

@ -442,7 +442,8 @@ void
gimp_text_buffer_change_size (GimpTextBuffer *buffer,
const GtkTextIter *start,
const GtkTextIter *end,
gint count)
gint count,
gint default_size)
{
GtkTextIter iter;
GtkTextIter span_start;
@ -479,16 +480,19 @@ gimp_text_buffer_change_size (GimpTextBuffer *buffer,
if (iter_size != span_size ||
gtk_text_iter_compare (&iter, end) >= 0)
{
gint base_size = (span_size == 0) ? default_size : span_size;
gint new_size = base_size + count;
if (span_size != 0)
{
gtk_text_buffer_remove_tag (GTK_TEXT_BUFFER (buffer), span_tag,
&span_start, &span_end);
}
if ((span_size + count) > 0)
if (new_size > 0)
{
span_tag = gimp_text_buffer_get_size_tag (buffer,
span_size + count);
new_size);
gtk_text_buffer_apply_tag (GTK_TEXT_BUFFER (buffer), span_tag,
&span_start, &span_end);
@ -1376,7 +1380,11 @@ gimp_text_buffer_name_to_tag (GimpTextBuffer *buffer,
guint r, g, b;
guchar rgb[3];
#ifndef _UCRT
sscanf (value, "#%02x%02x%02x", &r, &g, &b);
#else
sscanf_s (value, "#%02x%02x%02x", &r, &g, &b);
#endif
rgb[0] = r;
rgb[1] = g;
rgb[2] = b;

View file

@ -91,7 +91,8 @@ void gimp_text_buffer_set_size (GimpTextBuffer *buff
void gimp_text_buffer_change_size (GimpTextBuffer *buffer,
const GtkTextIter *start,
const GtkTextIter *end,
gint amount);
gint amount,
gint default_size);
GtkTextTag * gimp_text_buffer_get_iter_baseline (GimpTextBuffer *buffer,
const GtkTextIter *iter,

View file

@ -923,7 +923,7 @@ gimp_window_set_hint (GtkWindow *window,
/* similar to what we have in libgimp/gimpui.c */
/* TODO: Restore when we use it on Windows */
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
static GdkWindow *
gimp_get_foreign_window (gpointer window)
{
@ -2595,7 +2595,7 @@ gimp_window_set_transient_cb (GtkWidget *window,
GdkEventAny *event G_GNUC_UNUSED,
GBytes *handle)
{
#ifndef G_OS_WIN32
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
gboolean transient_set = FALSE;
#endif

View file

@ -4939,7 +4939,7 @@ xcf_load_tile_rle (XcfInfo *info,
{
guchar *data = tile_data + i;
gint size = tile_rect->width * tile_rect->height;
gint count = 0;
/*gint count = 0;*/
guchar val;
gint length;
gint j;
@ -4968,7 +4968,7 @@ xcf_load_tile_rle (XcfInfo *info,
xcfdata += 2;
}
count += length;
/*count += length;*/
size -= length;
if (size < 0)
@ -5002,7 +5002,7 @@ xcf_load_tile_rle (XcfInfo *info,
xcfdata += 2;
}
count += length;
/*count += length;*/
size -= length;
if (size < 0)

View file

@ -332,7 +332,11 @@ xcf_save_image (XcfInfo *info,
}
else
{
#ifndef _UCRT
strcpy (version_tag, "gimp xcf file");
#else
strcpy_s (version_tag, sizeof (version_tag), "gimp xcf file");
#endif
}
xcf_write_int8_check_error (info, (guint8 *) version_tag, 14, ;);
@ -1861,7 +1865,7 @@ xcf_save_prop (XcfInfo *info,
g_return_val_if_reached (FALSE);
xcf_write_int32_check_error (info, &item_type, 1, va_end (args));
if (! gimp_item_list_is_pattern (set, &method))
if (! gimp_item_list_is_pattern (set, (GimpSelectMethod *) &method))
method = G_MAXUINT32;
xcf_write_int32_check_error (info, &method, 1, va_end (args));

View file

@ -19,7 +19,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/appimage/3_dist-gimp-goappimage.sh' ] && [ $(basename "$PWD") != 'appimage' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'appimage' ]; then
cd ../../..

View file

@ -14,7 +14,7 @@ elif [ $(basename "$PWD") = 'flatpak' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init
git submodule update --init || true #true is for this script work on tarballs too
fi

View file

@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh' ] && [ $(basename "$PWD") != 'flatpak' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/linux/\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'flatpak' ]; then
cd ../../..
@ -95,8 +95,8 @@ fi
# We take the commands from 'flatpak_ci_initiative.yml'
if [ "$GITLAB_CI" ] && [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
printf "\e[0Ksection_start:`date +%s`:${FLATPAK}_submission[collapsed=true]\r\e[0KPublishing $ARCH repo to GNOME nightly\n"
curl https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml --output flatpak_ci_initiative.yml
eval "$(sed -n -e '/flatpak build-update-repo/,/purge/ { s/ - //; p }' flatpak_ci_initiative.yml)"
curl https://gitlab.gnome.org/GNOME/citemplates/-/raw/b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb/flatpak/flatpak_ci_initiative.yml --output flatpak_ci_initiative.yml
eval "$(sed -n '/BUILD_ID=/,/purge/ { s/^ - //; p; }' flatpak_ci_initiative.yml)"
printf "\e[0Ksection_end:`date +%s`:${FLATPAK}_submission\r\e[0K\n"
fi
done

View file

@ -135,8 +135,8 @@
"sources": [
{
"type": "archive",
"url": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.4.8.tar.gz",
"sha256": "0dd8d50e7f04219f3f925702564e994f9acdc6133ba537ec75eb6208119bec33",
"url": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.4.9.tar.gz",
"sha256": "328c6fcd794b2538d71c65b401264e6745cf65cbc18f404e55ec3c0230d2373c",
"x-checker-data": {
"type": "anitya",
"project-id": 13289,
@ -242,8 +242,8 @@
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-26.03.0.tar.xz",
"sha256": "8b3c5e2a9f2ab4c3ec5029f28af1b433c6b71f0d1e7b3997aa561cf1c0ca4ebe",
"url": "https://poppler.freedesktop.org/poppler-26.04.0.tar.xz",
"sha256": "b0955163114af96bc0106f68cb24daf973a629462453d8b82775f81b0d4e0693",
"x-checker-data": {
"type": "anitya",
"project-id": 3686,
@ -317,8 +317,8 @@
"sources": [
{
"type": "archive",
"url": "https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.14.tar.gz",
"sha512": "5f2068e89eb3998acd40a7d7272f2bba7d8366b1bf647ba10a4415cca2229ae5d8175140e49ea232c7e16887c64e9129df9f0effd045bf96887f2eada4e10992",
"url": "https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.15.tar.gz",
"sha512": "e95ab312ac06add60f278b9fa8cebb20bd8bd53b98f7159fe1ebc206cbcad1a186ef2ce4dd6c3c271dcad037e9b685493cda1267d4ebf9638906584eedb4f960",
"x-checker-data": {
"type": "anitya",
"project-id": 230209,

View file

@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/snap/1_build-deps-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'snap' ]; then
cd ../../..

View file

@ -8,13 +8,13 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/snap/2_build-gimp-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'snap' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init
git submodule update --init || true #true is for this script work on tarballs too
fi

View file

@ -8,7 +8,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/linux/snap/3_dist-gimp-snapcraft.sh' ] && [ $(basename "$PWD") != 'snap' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'snap' ]; then
cd ../../..

View file

@ -1,6 +1,6 @@
name: gimp
name: gimp-experimental
adopt-info: gimp
grade: stable #see parts:babl_or_gegl:override-pull
grade: devel #see parts:babl_or_gegl:override-pull
base: core24
compression: lzo
confinement: strict
@ -182,7 +182,7 @@ parts:
- -Dgi-docgen=disabled
- -Dcheck-update=no
- -Denable-default-bin=enabled
- -Dbuild-id=org.gimp.GIMP.snapcraft.latest
- -Dbuild-id=org.gimp.GIMP.snapcraft.experimental
build-packages:
- bison
- flex

View file

@ -8,12 +8,14 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/macos/1_build-deps-macports.sh' ] && [ $(basename "$PWD") != 'macos' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir/\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/macos/\n'
exit 1
elif [ $(basename "$PWD") = 'macos' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
which git >/dev/null 2>&1 || { printf '\033[31m(ERROR)\033[0m: git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git\n'; exit 1; }
GIT_DEPTH='1'
PARENT_DIR='/..'
@ -28,8 +30,7 @@ if [ -z "$OPT_PREFIX" ]; then
exit 1
fi
fi
#FIXME: remove `echo "$CI_JOB_NAME" | grep -q 'gimp'` after ScreenCaptureKit support
if { [ "$OPT_PREFIX" != '/opt/local' ] && [ "$OPT_PREFIX" != '/opt/homebrew' ] } || echo "$CI_JOB_NAME" | grep -q 'gimp'; then
if [ "$OPT_PREFIX" != '/opt/local' ] && [ "$OPT_PREFIX" != '/opt/homebrew' ]; then
export MACOSX_DEPLOYMENT_TARGET=$(awk '/LSMinimumSystemVersion/{found=1} found && /<string>/{gsub(/.*<string>|<\/string>.*/, ""); print; exit}' build/macos/Info.plist)
echo "macosx_deployment_target ${MACOSX_DEPLOYMENT_TARGET}" | tee -a ${OPT_PREFIX}/etc/macports/macports.conf >/dev/null 2>&1 || true
sed -i .bak "s/^#build_arch.*/build_arch $(uname -m)/" "${OPT_PREFIX}/etc/macports/macports.conf" >/dev/null 2>&1 || true
@ -46,7 +47,7 @@ if [ -f "$OPT_PREFIX/bin/port" ]; then
if echo "$CI_JOB_NAME" | grep -q 'deps' && { [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] || [ "$first_cache" ] }; then
eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port sync -Nv
fi
eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port install -N $(grep -v '^#' build/macos/all-deps-uni.txt | sed 's/|homebrew:[^ ]*//g' | tr -d '\' | xargs)
eval $( [ "$OPT_PREFIX" = /opt/local ] && echo sudo ) port install -N $(grep -v '^#' build/macos/all-deps-uni.txt | sed 's/#.*//' | sed 's/|homebrew:[^ ]*//g' | tr -d '\\' | xargs)
if echo "$CI_JOB_NAME" | grep -q 'deps' && { [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] || [ "$first_cache" ] }; then
mkdir -p macports-cached-$(uname -m) && cp -fa $OPT_PREFIX/var/macports/* macports-cached-$(uname -m) || true
fi

View file

@ -8,13 +8,13 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/macos/2_build-gimp-macports.sh' ] && [ $(basename "$PWD") != 'macos' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir/\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/macos/\n'
exit 1
elif [ $(basename "$PWD") = 'macos' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init
git submodule update --init || true #true is for this script work on tarballs too
NON_RELOCATABLE_OPTION='-Drelocatable-bundle=no'
fi
@ -38,7 +38,7 @@ eval "$(sed -n -e 's/- //' -e '/macos_environ\[/,/macos_environ/p' .gitlab-ci.ym
# Build GIMP only
printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
if [ ! -f "_build-$(uname -m)/build.ninja" ]; then
meson setup _build-$(uname -m) -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION \
meson setup _build-$(uname -m) -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI \
$PKGCONF_RELOCATABLE_OPTION $DMG_OPTION \
-Dbuild-id=org.gimp.GIMP_official \
-Dc_args="-I${OPT_PREFIX}/include" -Dcpp_args="-I${OPT_PREFIX}/include" -Dc_link_args="-L${OPT_PREFIX}/lib" -Dcpp_link_args="-L${OPT_PREFIX}/lib"

View file

@ -152,7 +152,7 @@ GIMP_DISTRIB.mkdir(parents=True, exist_ok=True)
shutil.copy2(Path(f"{GIMP_SOURCE}/build/macos/Info.plist"), GIMP_DISTRIB)
### FIXME: Icon (generate Assets.car for Liquid Glass: https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/2159)
(GIMP_DISTRIB / "Resources").mkdir(parents=True, exist_ok=True)
subprocess.run(["xcrun","actool",str(Path(f"{os.getenv('MESON_BUILD_ROOT')}/gimp-data/images/logo/AppIcon.icon")),"--output-format","human-readable-text","--compile",f"{GIMP_DISTRIB / 'Resources'}","--include-all-app-icons","--enable-on-demand-resources","NO","--enable-icon-stack-fallback-generation","NO","--development-region","en","--target-device","mac","--platform","macosx","--minimum-deployment-target",os.getenv('MACOSX_DEPLOYMENT_TARGET')], check=True)
subprocess.run(["xcrun","actool",str(Path(f"{os.getenv('MESON_BUILD_ROOT')}/gimp-data/images/logo/AppIcon.icon")),"--output-format","human-readable-text","--compile",f"{GIMP_DISTRIB / 'Resources'}","--include-all-app-icons","--enable-on-demand-resources","NO","--enable-icon-stack-fallback-generation","NO","--development-region","en","--target-device","mac","--platform","macosx","--minimum-deployment-target",os.getenv('MACOSX_DEPLOYMENT_TARGET', ".".join(platform.mac_ver()[0].split(".")[:2]))], check=True)
shutil.copy2(Path(f"{os.getenv('MESON_BUILD_ROOT')}/gimp-data/images/logo/gimp.icns"), GIMP_DISTRIB / "Resources/AppIcon.icns")
shutil.copy2(Path(f"{os.getenv('MESON_BUILD_ROOT')}/build/macos/fileicon-xcf.icns"), GIMP_DISTRIB / "Resources/fileicon-xcf.icns")
shutil.copy2(Path(f"{os.getenv('MESON_BUILD_ROOT')}/build/macos/fileicon.icns"), GIMP_DISTRIB / "Resources/fileicon.icns")

View file

@ -2,49 +2,57 @@
# KEEP THIS FILE ORDERING SIMILAR to build/windows/all-deps-uni.txt
# BUILD-TIME ONLY DEPS
gettext \
gi-docgen \
gettext|homebrew:gettext \
gi-docgen|homebrew:gi-docgen \
gobject-introspection +quartz -x11|homebrew:gobject-introspection \
libxslt|homebrew:libxslt \
meson|homebrew:meson \
perl5 #homebrew uses perl from macOS \
pkgconfig|homebrew:pkgconf \
vala -valadoc \
vala -valadoc|homebrew:vala \
# RUNTIME DEPS
aalib -x11 \
aalib -x11|homebrew:aalib \
appstream -x11|homebrew:appstream \
atk \
atk|homebrew:at-spi2-core \
bzip2 #homebrew uses libbz2 from macOS \
cairo +quartz -x11|homebrew:cairo \
#cfitsio not built by Apple Clang
fontconfig|homebrew:fontconfig \
freetype|homebrew:freetype \
gdk-pixbuf2 +quartz -x11|homebrew:gdk-pixbuf \
gexiv2|homebrew:gexiv2 \
ghostscript -x11|homebrew:ghostscript \
glib2 +quartz -x11|homebrew:glib \
glib-networking|homebrew:glib-networking \
graphviz -x11|homebrew:graphviz \
gtk3 +quartz -x11|homebrew:gtk+3 \ adwaita-icon-theme +quartz -x11|homebrew:adwaita-icon-theme \ shared-mime-info|homebrew:shared-mime-info \
harfbuzz +quartz -x11|homebrew:harfbuzz \
iso-codes|homebrew:iso-codes \
json-glib|homebrew:json-glib \
lcms2|homebrew:lcms2 \
libarchive|homebrew:libarchive \
libheif \
libheif|homebrew:libheif \
libjpeg-turbo|homebrew:libjpeg-turbo \
libjxl \
libmng \
libmypaint \
libjxl|homebrew:jpeg-xl \
libmng|homebrew:libmng \
libmypaint|homebrew:libmypaint \
libpng|homebrew:libpng \
librsvg|homebrew:librsvg \
tiff \
webp \
tiff|homebrew:libtiff \
webp|homebrew:webp \
libwmf -x11|homebrew:libwmf \
#maxflow not available yet
maxflow #homebrew rejected maxflow https://github.com/Homebrew/homebrew-core/pull/276186 \
mypaint-brushes|homebrew:mypaint-brushes \
openexr \
openjpeg \
pango +thai +quartz -x11 \
openexr|homebrew:openexr \
openjpeg|homebrew:openjpeg \
pango +thai +quartz -x11|homebrew:pango \
poppler +pinentry -pinentry_mac|homebrew:poppler \
poppler-data \
python313|homebrew:python \ py313-certifi|homebrew:certifi
py313-gobject3|homebrew:pygobject3 \
qoi \
qoi #homebrew rejected qoi https://github.com/Homebrew/homebrew-core/pull/276182 \
#suitesparse not built by Apple Clang
#xpm depends on x11
xz|homebrew:xz
zlib #homebrew uses libz from macOS

View file

@ -17,7 +17,7 @@ case $(readlink /proc/$$/exe) in
esac
set -e
if [ "$0" != 'build/macos/dmg/3_dist-gimp-apple.sh' ] && [ $(basename "$PWD") != 'dmg' ]; then
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp source dir\n'
exit 1
elif [ $(basename "$PWD") = 'dmg' ]; then
cd ../../..
@ -215,7 +215,7 @@ rm -fr ds-py3-venv
# open
# -- background
# set bounds of container window to {1, 1, 641, 512}
# set background picture of icon view options of container window to POSIX file "$DMG_MOUNT/.background/gimp-dmg.png"
# set background picture of icon view options of container window to POSIX file "$DMG_MOUNT/.background.png"
# set toolbar visible of container window to false
# set pathbar visible of container window to false
# set statusbar visible of container window to false

View file

@ -1,18 +1,56 @@
From 2dd50107f6a700527741eb2373a8ba26975a961c Mon Sep 17 00:00:00 2001
From fd8af534aa3af90aa9e6f3674fa780ffc48f7299 Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Fri, 26 Dec 2025 19:54:22 -0300
Date: Thu, 2 Apr 2026 14:19:49 -0300
Subject: [PATCH] build/macos: Do not require gexiv2-0.14 on homebrew
---
libgimp/meson.build | 2 +-
meson.build | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
app/core/meson.build | 5 ++++-
app/dialogs/meson.build | 5 ++++-
libgimp/meson.build | 4 ++--
libgimpbase/meson.build | 1 +
meson.build | 6 ++----
plug-ins/common/meson.build | 2 ++
plug-ins/file-tiff/meson.build | 1 +
plug-ins/metadata/meson.build | 2 ++
8 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/app/core/meson.build b/app/core/meson.build
index 656d36a9c2..375eafd877 100644
--- a/app/core/meson.build
+++ b/app/core/meson.build
@@ -274,7 +274,10 @@ libappcore_sources = [
libappcore = static_library('appcore',
libappcore_sources,
include_directories: [ rootInclude, rootAppInclude, ],
- c_args: '-DG_LOG_DOMAIN="Gimp-Core"',
+ c_args: [
+ '-DG_LOG_DOMAIN="Gimp-Core"',
+ '-Wno-deprecated-declarations',
+ ],
dependencies: [
cairo,
gegl,
diff --git a/app/dialogs/meson.build b/app/dialogs/meson.build
index 672cd934eb..dc919b8bf0 100644
--- a/app/dialogs/meson.build
+++ b/app/dialogs/meson.build
@@ -74,7 +74,10 @@ libappdialogs_sources += [
libappdialogs = static_library('appdialogs',
libappdialogs_sources,
include_directories: [ rootInclude, rootAppInclude, ],
- c_args: '-DG_LOG_DOMAIN="Gimp-Dialogs"',
+ c_args: [
+ '-DG_LOG_DOMAIN="Gimp-Dialogs"',
+ '-Wno-deprecated-declarations',
+ ],
dependencies: [
appstream,
gegl,
diff --git a/libgimp/meson.build b/libgimp/meson.build
index c12e60c2cd..738564c2b9 100644
index eb1166c728..36af7e9e62 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -387,7 +387,7 @@ libgimp_deps_table = [
@@ -399,7 +399,7 @@ libgimp_deps_table = [
{ 'gir': 'cairo-1.0', 'vapi': 'cairo-1.0', },
{ 'gir': 'GdkPixbuf-2.0', 'vapi': 'gdk-pixbuf-2.0', },
{ 'gir': 'Gegl-0.4', 'vapi': 'gegl-0.4', },
@ -21,11 +59,32 @@ index c12e60c2cd..738564c2b9 100644
{ 'gir': 'Gio-2.0', 'vapi': 'gio-2.0', },
{ 'gir': gio_specific_gir, 'vapi': gio_specific_vapi, },
{ 'gir': 'GLib-2.0', 'vapi': 'glib-2.0', },
@@ -425,7 +425,7 @@ libgimp = library('gimp-'+ gimp_api_version,
sources: [
pdbgen
],
- c_args: [ '-DG_LOG_DOMAIN="LibGimp"', '-DGIMP_COMPILATION', ],
+ c_args: [ '-DG_LOG_DOMAIN="LibGimp"', '-DGIMP_COMPILATION', '-Wno-deprecated-declarations', ],
link_with: [
libgimpbase,
libgimpcolor,
diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build
index 377a806249..c305509856 100644
--- a/libgimpbase/meson.build
+++ b/libgimpbase/meson.build
@@ -125,6 +125,7 @@ libgimpbase = library('gimpbase-' + gimp_api_version,
c_args: [
'-DG_LOG_DOMAIN="LibGimpBase"',
'-DGIMP_BASE_COMPILATION',
+ '-Wno-deprecated-declarations',
],
vs_module_defs: 'gimpbase.def',
install: true,
diff --git a/meson.build b/meson.build
index 97662d62d7..4fcf576cce 100644
index 3e6a324e16..d46d4b0ee5 100644
--- a/meson.build
+++ b/meson.build
@@ -454,9 +454,8 @@ gegl_minver = '0.4.66'
@@ -464,9 +464,8 @@ gegl_minver = '0.4.66'
gegl = dependency('gegl-0.4', version: '>='+gegl_minver)
exiv2_minver = '0.27.4'
exiv2 = dependency('exiv2', version: '>='+exiv2_minver)
@ -34,10 +93,10 @@ index 97662d62d7..4fcf576cce 100644
-gexiv2 = dependency('gexiv2', version: ['>='+gexiv2_minver, '<'+gexiv2_maxver])
+gexiv2_minver = '0.16.0'
+gexiv2 = dependency('gexiv2-0.16', version: '>='+gexiv2_minver)
gio = dependency('gio-2.0')
gio_specific_name = platform_windows ? 'gio-windows-2.0' : 'gio-unix-2.0'
@@ -1686,7 +1685,6 @@ install_conf.set('GDK_PIXBUF_REQUIRED_VERSION', gdk_pixbuf_minver)
@@ -1812,7 +1811,6 @@ install_conf.set('GDK_PIXBUF_REQUIRED_VERSION', gdk_pixbuf_minver)
install_conf.set('GEGL_REQUIRED_VERSION', gegl_minver)
install_conf.set('EXIV2_REQUIRED_VERSION', exiv2_minver)
install_conf.set('GEXIV2_REQUIRED_VERSION', gexiv2_minver)
@ -45,5 +104,58 @@ index 97662d62d7..4fcf576cce 100644
install_conf.set('GLIB_REQUIRED_VERSION', glib_minver)
install_conf.set('GTK_REQUIRED_VERSION', gtk3_minver)
install_conf.set('HARFBUZZ_REQUIRED_VERSION', harfbuzz_minver)
--
diff --git a/plug-ins/common/meson.build b/plug-ins/common/meson.build
index 420e4d1cdd..faf397d64e 100644
--- a/plug-ins/common/meson.build
+++ b/plug-ins/common/meson.build
@@ -92,6 +92,7 @@ endif
if have_heif
common_plugins_list += { 'name': 'file-heif',
'deps': [ libheif, lcms, ],
+ 'cflags': [ '-Wno-deprecated-declarations', ],
}
endif
@@ -105,6 +106,7 @@ if libjxl.found() and libjxl_threads.found()
common_plugins_list += {
'name': 'file-jpegxl',
'deps': [ libjxl, libjxl_threads, ],
+ 'cflags': [ '-Wno-deprecated-declarations', ],
}
endif
diff --git a/plug-ins/file-tiff/meson.build b/plug-ins/file-tiff/meson.build
index 31b9f7df35..740e67e194 100644
--- a/plug-ins/file-tiff/meson.build
+++ b/plug-ins/file-tiff/meson.build
@@ -28,6 +28,7 @@ plugin_exe = executable(plugin_name,
gexiv2,
libtiff,
],
+ c_args: [ '-Wno-deprecated-declarations', ],
win_subsystem: 'windows',
install: true,
install_dir: gimpplugindir / 'plug-ins' / plugin_name)
diff --git a/plug-ins/metadata/meson.build b/plug-ins/metadata/meson.build
index dfa0105276..d06a2ddcfe 100644
--- a/plug-ins/metadata/meson.build
+++ b/plug-ins/metadata/meson.build
@@ -33,6 +33,7 @@ plugin_exe = executable(plugin_name,
libgimpui_dep,
gexiv2,
],
+ c_args: [ '-Wno-deprecated-declarations', ],
win_subsystem: 'windows',
install: true,
install_dir: gimpplugindir / 'plug-ins' / plugin_name)
@@ -81,6 +82,7 @@ plugin_exe = executable(plugin_name,
dependencies: [
gtk3, gegl, gexiv2,
],
+ c_args: [ '-Wno-deprecated-declarations', ],
link_with: [
libgimp,
libgimpbase,
--
2.50.1 (Apple Git-155)

View file

@ -14,6 +14,8 @@ elseif (Test-Path 1_build-deps-msys2.ps1 -Type Leaf)
}
if (-not $GITLAB_CI)
{
if (-not (Get-Command "git" -ErrorAction SilentlyContinue)) { Write-Host '(ERROR): git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git' -ForegroundColor Red; exit 1 }
$GIT_DEPTH = '1'
$PARENT_DIR = '\..'
@ -30,9 +32,9 @@ if (-not $env:VCPKG_ROOT -or (Test-Path "$env:VCPKG_ROOT\vcpkg.exe" -Type Leaf))
exit 1
}
}
if (-not $env:VCPKG_DEFAULT_TRIPLET -and $env:VCPKG_ROOT)
if (-not $env:VCPKG_DEFAULT_HOST_TRIPLET -and $env:VCPKG_ROOT)
{
$env:VCPKG_DEFAULT_TRIPLET = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'arm64-windows' } else { 'x64-windows' }
$env:VCPKG_DEFAULT_HOST_TRIPLET = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'arm64-windows' } else { 'x64-windows-release' }
}
if (-not $env:MSYS_ROOT -and -not (Test-Path "$env:VCPKG_ROOT\vcpkg.exe" -Type Leaf))
@ -62,7 +64,7 @@ if (Test-Path "$env:VCPKG_ROOT\vcpkg.exe" -Type Leaf)
else
{
powershell -Command { $ProgressPreference = 'SilentlyContinue'; $env:PATH="$env:MSYS_ROOT\usr\bin;$env:PATH"; pacman --noconfirm -Suy }; if ("$LASTEXITCODE" -gt '0') { exit 1 }
powershell -Command { $ProgressPreference = 'SilentlyContinue'; $env:PATH="$env:MSYS_ROOT\usr\bin;$env:PATH"; pacman --noconfirm -S --needed (Get-Content build/windows/all-deps-uni.txt | Select-String 'MINGW_' | ForEach-Object { ($_ -split '\|vcpkg:')[0] -replace '\$\{MINGW_PACKAGE_PREFIX\}', $(if ($env:MINGW_PACKAGE_PREFIX) { $env:MINGW_PACKAGE_PREFIX } elseif ($env:MSYSTEM_PREFIX -eq 'clangarm64') { 'mingw-w64-clang-aarch64' } else { 'mingw-w64-clang-x86_64' }) }) }; if ("$LASTEXITCODE" -gt '0') { exit 1 }
powershell -Command { $ProgressPreference = 'SilentlyContinue'; $env:PATH="$env:MSYS_ROOT\usr\bin;$env:PATH"; pacman --noconfirm -S --needed (Get-Content build/windows/all-deps-uni.txt | Where-Object { $_ -match 'MINGW_' -and -not $_.Trim().StartsWith('#') } | ForEach-Object { (($_.Split('#')[0].Trim() -split '\|vcpkg:')[0] -replace '\$\{MINGW_PACKAGE_PREFIX\}', $(if ($env:MINGW_PACKAGE_PREFIX) { $env:MINGW_PACKAGE_PREFIX } elseif ($env:MSYSTEM_PREFIX -eq 'clangarm64') { 'mingw-w64-clang-aarch64' } else { 'mingw-w64-clang-x86_64' })) }) }; if ("$LASTEXITCODE" -gt '0') { exit 1 }
}
Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):deps_install$([char]13)$([char]27)[0K"
@ -125,7 +127,7 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
}
## Configure and/or build
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
{
if ((Test-Path meson.build -Type Leaf) -and -not (Test-Path CMakeLists.txt -Type Leaf))
{
@ -138,7 +140,7 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
}
$clang_opts_meson=@('-Dc_args=-"fansi-escape-codes -gcodeview"', '-Dcpp_args=-"fansi-escape-codes -gcodeview"', '-Dc_link_args="-Wl,--pdb="', '-Dcpp_link_args="-Wl,--pdb="')
}
meson setup _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -Dprefix="$GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
meson setup _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -Dprefix="$GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
-Dbuildtype=debugoptimized $clang_opts_meson `
$(if ($branch -like '-*') { $branch } elseif ($patches -like '-*') { $patches } else { $options });
}
@ -149,13 +151,13 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/tools/meson_install_win_debug.py`)`")"
$clang_opts_cmake=@('-DCMAKE_C_FLAGS="-gcodeview"', '-DCMAKE_CXX_FLAGS="-gcodeview"', '-DCMAKE_EXE_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--pdb="')
}
cmake -G Ninja -B _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" `
cmake -G Ninja -B _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_COLOR_DIAGNOSTICS=ON $clang_opts_cmake `
$(if ($branch -like '-*') { $branch } elseif ($patches -like '-*') { $patches } else { $options });
}
if ("$LASTEXITCODE" -gt '0') { exit 1 }
}
Set-Location _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
Set-Location _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
ninja; if ("$LASTEXITCODE" -gt '0') { exit 1 }
ninja install; if ("$LASTEXITCODE" -gt '0') { exit 1 }
Set-Location ../..

View file

@ -39,15 +39,15 @@ Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -
# Build GIMP
Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):gimp_build[collapsed=true]$([char]13)$([char]27)[0KBuilding GIMP"
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
{
#FIXME: There is no GJS for Windows. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5891
meson setup _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION `
$PKGCONF_RELOCATABLE_OPTION $INSTALLER_OPTION $STORE_OPTION `
meson setup _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION `
$PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI $INSTALLER_OPTION $STORE_OPTION `
-Denable-default-bin=enabled -Dbuild-id='org.gimp.GIMP_official';
if ("$LASTEXITCODE" -gt '0') { exit 1 }
}
Set-Location _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
Set-Location _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
ninja; if ("$LASTEXITCODE" -gt '0') { exit 1 }
Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):gimp_build$([char]13)$([char]27)[0K"

View file

@ -1,9 +1,7 @@
# NATIVE/MINGW DEPS AT BUILD-TIME ONLY
${MINGW_PACKAGE_PREFIX}-binutils
${MINGW_PACKAGE_PREFIX}-gettext-tools
${MINGW_PACKAGE_PREFIX}-gettext-tools|vcpkg:gettext
${MINGW_PACKAGE_PREFIX}-gi-docgen
${MINGW_PACKAGE_PREFIX}-gobject-introspection|vcpkg:gobject-introspection
${MINGW_PACKAGE_PREFIX}-headers-git
${MINGW_PACKAGE_PREFIX}-libxslt|vcpkg:libxslt
${MINGW_PACKAGE_PREFIX}-meson
${MINGW_PACKAGE_PREFIX}-perl
@ -13,44 +11,51 @@ ${MINGW_PACKAGE_PREFIX}-vala
# NATIVE/MINGW DEPS AT RUNTIME
${MINGW_PACKAGE_PREFIX}-aalib
${MINGW_PACKAGE_PREFIX}-appstream
${MINGW_PACKAGE_PREFIX}-atk
${MINGW_PACKAGE_PREFIX}-atk|vcpkg:atk[introspection]
${MINGW_PACKAGE_PREFIX}-bzip2|vcpkg:bzip2
${MINGW_PACKAGE_PREFIX}-cairo|vcpkg:cairo
${MINGW_PACKAGE_PREFIX}-cfitsio
${MINGW_PACKAGE_PREFIX}-cfitsio|vcpkg:cfitsio
${MINGW_PACKAGE_PREFIX}-drmingw
${MINGW_PACKAGE_PREFIX}-fontconfig|vcpkg:fontconfig
${MINGW_PACKAGE_PREFIX}-freetype|vcpkg:freetype
${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2|vcpkg:gdk-pixbuf[introspection,others]
${MINGW_PACKAGE_PREFIX}-gexiv2|vcpkg:gexiv2
${MINGW_PACKAGE_PREFIX}-ghostscript
${MINGW_PACKAGE_PREFIX}-glib2|vcpkg:glib
${MINGW_PACKAGE_PREFIX}-glib-networking|vcpkg:glib-networking
${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime|vcpkg:gobject-introspection
${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime|vcpkg:gobject-introspection[cairo]
${MINGW_PACKAGE_PREFIX}-graphviz
${MINGW_PACKAGE_PREFIX}-gtk3|vcpkg:gtk3
${MINGW_PACKAGE_PREFIX}-iso-codes
${MINGW_PACKAGE_PREFIX}-gtk3|vcpkg:gtk3[introspection]
${MINGW_PACKAGE_PREFIX}-harfbuzz|vcpkg:harfbuzz[introspection]
${MINGW_PACKAGE_PREFIX}-iso-codes|vcpkg:iso-codes
${MINGW_PACKAGE_PREFIX}-json-glib|vcpkg:json-glib
${MINGW_PACKAGE_PREFIX}-lcms2|vcpkg:lcms
${MINGW_PACKAGE_PREFIX}-libarchive|vcpkg:libarchive[bzip2]
${MINGW_PACKAGE_PREFIX}-libheif
${MINGW_PACKAGE_PREFIX}-libheif|vcpkg:libheif[hevc,openjpeg]
${MINGW_PACKAGE_PREFIX}-libilbm
${MINGW_PACKAGE_PREFIX}-libjpeg-turbo|vcpkg:libjpeg-turbo
${MINGW_PACKAGE_PREFIX}-libjxl
${MINGW_PACKAGE_PREFIX}-libjxl|vcpkg:libjxl
${MINGW_PACKAGE_PREFIX}-libmng
${MINGW_PACKAGE_PREFIX}-libmypaint
${MINGW_PACKAGE_PREFIX}-libpng|vcpkg:libpng
${MINGW_PACKAGE_PREFIX}-librsvg|vcpkg:librsvg
${MINGW_PACKAGE_PREFIX}-libtiff
${MINGW_PACKAGE_PREFIX}-libwebp
${MINGW_PACKAGE_PREFIX}-libtiff|vcpkg:tiff
${MINGW_PACKAGE_PREFIX}-libwebp|vcpkg:libwebp
${MINGW_PACKAGE_PREFIX}-libwmf
${MINGW_PACKAGE_PREFIX}-maxflow
${MINGW_PACKAGE_PREFIX}-mypaint-brushes2
${MINGW_PACKAGE_PREFIX}-openexr
${MINGW_PACKAGE_PREFIX}-openjpeg2
${MINGW_PACKAGE_PREFIX}-pango
${MINGW_PACKAGE_PREFIX}-maxflow #vcpkg rejected maxflow https://github.com/microsoft/vcpkg/pull/50950
${MINGW_PACKAGE_PREFIX}-mypaint-brushes2|vcpkg:mypaint-brushes
${MINGW_PACKAGE_PREFIX}-openexr|vcpkg:openexr
${MINGW_PACKAGE_PREFIX}-openjpeg2|vcpkg:openjpeg
${MINGW_PACKAGE_PREFIX}-pango|vcpkg:pango[introspection]
${MINGW_PACKAGE_PREFIX}-poppler|vcpkg:poppler[glib]
${MINGW_PACKAGE_PREFIX}-poppler-data
${MINGW_PACKAGE_PREFIX}-python
${MINGW_PACKAGE_PREFIX}-poppler-data|vcpkg:poppler-data
${MINGW_PACKAGE_PREFIX}-python|vcpkg:python3
${MINGW_PACKAGE_PREFIX}-python-gobject
${MINGW_PACKAGE_PREFIX}-qoi
${MINGW_PACKAGE_PREFIX}-qoi|vcpkg:qoi
#${MI#NGW_PACKAGE_PREFIX}-suitesparse crashes. See #12838
${MINGW_PACKAGE_PREFIX}-xpm-nox
${MINGW_PACKAGE_PREFIX}-xz|vcpkg:liblzma
${MINGW_PACKAGE_PREFIX}-zlib|vcpkg:zlib
# TEMP DEPENDENCIES TO FIX CRITICAL NEEDS
${MINGW_PACKAGE_PREFIX}-cmake

View file

@ -11,7 +11,7 @@ $ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $false #to ensure error catching as in pre-7.4 PS
if (-not (Test-Path build\windows\installer) -and -not (Test-Path 3_dist-gimp-inno.ps1 -Type Leaf) -or $PSScriptRoot -notlike "*build\windows\installer*")
{
Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -ForegroundColor Red
Write-Host '(ERROR): Script called from wrong dir. Please, call this script from the root of gimp source dir' -ForegroundColor Red
exit 1
}
elseif (Test-Path 3_dist-gimp-inno.ps1 -Type Leaf)

View file

@ -1,6 +1,6 @@
From 9193a5e805d17cf990928ed77cfbebcd1a172d1c Mon Sep 17 00:00:00 2001
From 1d1f3fe3ace998031d23d33c2192ee24d7e9766c Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Fri, 27 Mar 2026 20:36:27 -0300
Date: Fri, 3 Apr 2026 11:46:58 -0300
Subject: [PATCH] Disable some things due to lack of packages
---
@ -21,11 +21,9 @@ Subject: [PATCH] Disable some things due to lack of packages
app/tools/meson.build | 2 -
app/widgets/meson.build | 2 -
devel-docs/meson.build | 2 +-
docs/meson.build | 2 +-
etc/meson.build | 2 +-
libgimp/meson.build | 4 +-
meson.build | 49 ++++-------------
21 files changed, 18 insertions(+), 273 deletions(-)
meson.build | 36 +++----------
19 files changed, 13 insertions(+), 261 deletions(-)
diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c
index 9efa957edb..64e7981cfc 100644
@ -510,36 +508,11 @@ index 7dd25ed1ba..234a951148 100644
+if not platform_windows
subdir('reference')
endif
diff --git a/docs/meson.build b/docs/meson.build
index 454c2a9d75..c0332c9b49 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -8,7 +8,7 @@ manconf.set('gimplocaledir', prefix / localedir)
manconf.set('gimpplugindir', prefix / gimpplugindir)
manconf.set('manpage_gimpdir', '$XDG_CONFIG_HOME/' + gimpdir / gimp_app_version)
manconf.set('gimpsysconfdir', prefix / gimpsysconfdir)
-manconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
+manconf.set('mypaint_brushes_dir', 'none')
custom_target('gimprc-' + gimp_app_version + '.5',
output: 'gimprc-' + gimp_app_version + '.5',
diff --git a/etc/meson.build b/etc/meson.build
index 93ec8ce9e2..7b271c746c 100644
--- a/etc/meson.build
+++ b/etc/meson.build
@@ -1,6 +1,6 @@
etcconf = configuration_data()
etcconf.set('GIMP_APP_VERSION', gimp_app_version)
-etcconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
+etcconf.set('mypaint_brushes_dir', 'none')
install_data(
diff --git a/libgimp/meson.build b/libgimp/meson.build
index 8f5d2c4a96..5f763a454a 100644
index eb1166c728..6e1635cf77 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -503,7 +503,9 @@ libgimpui_introspectable_files = [
@@ -514,7 +514,9 @@ libgimpui_introspectable_files = [
libgimpwidgets_introspectable,
]
@ -551,7 +524,7 @@ index 8f5d2c4a96..5f763a454a 100644
gobject_introspection_warning = '\n '.join(['',
'GObject Introspection is disabled while cross-compiling because',
diff --git a/meson.build b/meson.build
index 6b4e8b69a6..82b1424c4f 100644
index 4d378520c5..c2188c3353 100644
--- a/meson.build
+++ b/meson.build
@@ -288,7 +288,7 @@ warning_cflags_common = [
@ -563,28 +536,16 @@ index 6b4e8b69a6..82b1424c4f 100644
'-Winit-self',
'-Wlogical-op',
'-Wmissing-declarations',
@@ -531,17 +531,11 @@ json_glib = dependency('json-glib-1.0', version: '>='+json_glib_min
@@ -533,7 +533,7 @@ json_glib = dependency('json-glib-1.0', version: '>='+json_glib_min
lcms_minver = '2.8'
lcms = dependency('lcms2', version: '>='+lcms_minver)
libmypaint_minver = '1.5.0'
-libmypaint = dependency('libmypaint', version: '>='+libmypaint_minver)
-mypaint_brushes = dependency('mypaint-brushes-2.0')
+libmypaint = dependency('libmypaint', required: false)
+mypaint_brushes = dependency('mypaint-brushes-2.0', required: false)
mypaint_brushes = dependency('mypaint-brushes-2.0')
-if relocatable_bundle
- mypaint_brushes_dir = '${gimp_installation_dir}'\
- /'share'/'mypaint-data'/'2.0'/'brushes'
-else
- mypaint_brushes_dir = mypaint_brushes.get_variable(pkgconfig: 'brushesdir')
-endif
-conf.set_quoted('MYPAINT_BRUSHES_DIR', mypaint_brushes_dir)
+conf.set_quoted('MYPAINT_BRUSHES_DIR', 'none')
pango_minver = '1.50.0'
if platform_osx
@@ -699,7 +693,7 @@ endif
if relocatable_bundle
@@ -698,7 +698,7 @@ endif
# Check for extension support
appstream_minver = '0.16.1'
@ -593,16 +554,7 @@ index 6b4e8b69a6..82b1424c4f 100644
libarchive = dependency('libarchive')
@@ -1074,7 +1068,7 @@ poppler_minver = '0.69.0'
poppler_data_minver = '0.4.9'
poppler = [
dependency('poppler-glib', version: '>='+poppler_minver),
- dependency('poppler-data', version: '>='+poppler_data_minver),
+ dependency('poppler-data', required: false),
]
cairopdf_minver = '1.12.2'
@@ -1208,7 +1202,7 @@ pygobject_found = ''
@@ -1202,7 +1202,7 @@ pygobject_found = ''
pygobject_gexiv2_found = false
foreach py : py_candidates
#Check if PyGobject installation have pycairo (#13105)
@ -611,7 +563,7 @@ index 6b4e8b69a6..82b1424c4f 100644
if python_tmp.found() and python_tmp.language_version().version_compare(python3_minver)
python = python_tmp
#Check if PyGObject installation have minimum version
@@ -1227,9 +1221,7 @@ foreach py : py_candidates
@@ -1221,9 +1221,7 @@ foreach py : py_candidates
'''except (ImportError):''',
''' sys.exit(1)''']),
check: false).returncode() == 0
@ -622,7 +574,7 @@ index 6b4e8b69a6..82b1424c4f 100644
endif
endforeach
@@ -1238,11 +1230,6 @@ if not python.found() or not python.language_version().version_compare(python3_m
@@ -1232,11 +1230,6 @@ if not python.found() or not python.language_version().version_compare(python3_m
endif
message('Found Python @0@'.format(python.language_version()))
@ -634,15 +586,7 @@ index 6b4e8b69a6..82b1424c4f 100644
## Javascript
gjs = find_program('gjs', required: false)
@@ -1341,7 +1328,6 @@ appstreamcli = find_program('appstreamcli', version: '>=0.15.3', required: get_o
# Check for .typelib generation tools
-g_ir_compiler = find_program('g-ir-compiler')
# Check for doc generation tools
@@ -1834,7 +1820,6 @@ install_conf.set('LIBHEIF_REQUIRED_VERSION', libheif_minver)
@@ -1822,7 +1815,6 @@ install_conf.set('LIBHEIF_REQUIRED_VERSION', libheif_minver)
install_conf.set('LIBJXL_REQUIRED_VERSION', jpegxl_minver)
install_conf.set('LIBLZMA_REQUIRED_VERSION', liblzma_minver)
install_conf.set('LIBTIFF_REQUIRED_VERSION', libtiff_minver)
@ -650,7 +594,7 @@ index 6b4e8b69a6..82b1424c4f 100644
install_conf.set('LIBPNG_REQUIRED_VERSION', libpng_minver)
install_conf.set('OPENEXR_REQUIRED_VERSION', openexr_minver)
install_conf.set('OPENJPEG_REQUIRED_VERSION', openjpeg_minver)
@@ -2026,13 +2011,13 @@ if get_option('debug-self-in-build')
@@ -2014,13 +2006,13 @@ if get_option('debug-self-in-build')
endif
gimp_run_env.set('GIMP_PYTHON_WITH_GI', python.full_path())
@ -666,7 +610,7 @@ index 6b4e8b69a6..82b1424c4f 100644
gimp_run_env.set('GIMP_SELF_IN_BUILD', gimp_real_exe.full_path())
menu_paths=meson.global_build_root() / 'menus:' + meson.global_source_root() / 'menus'
@@ -2095,18 +2080,6 @@ if meson.can_run_host_binaries() and have_gobject_introspection
@@ -2083,18 +2075,6 @@ if meson.can_run_host_binaries() and have_gobject_introspection
gimp_run_env.prepend('GIMP_TEMP_UPDATE_RPATH', plugin_exe)
endforeach
endif
@ -685,7 +629,7 @@ index 6b4e8b69a6..82b1424c4f 100644
endif
gimp_exe = find_program('tools'/'in-build-gimp.py')
@@ -2302,7 +2275,7 @@ final_message = [
@@ -2290,7 +2270,7 @@ final_message = [
''' Test appdata @0@'''.format(appstreamcli.found()),
'',
'''Documentation:''',

View file

@ -12,7 +12,7 @@ $ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $false #to ensure error catching as in pre-7.4 PS
if (-not (Test-Path build\windows\store) -and -not (Test-Path 3_dist-gimp-winsdk.ps1 -Type Leaf) -or $PSScriptRoot -notlike "*build\windows\store*")
{
Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -ForegroundColor Red
Write-Host '(ERROR): Script called from wrong dir. Please, call this script from the root of gimp source dir' -ForegroundColor Red
exit 1
}
elseif (Test-Path 3_dist-gimp-winsdk.ps1 -Type Leaf)
@ -52,27 +52,27 @@ $env:PATH = "${win_sdk_path}bin\${win_sdk_version}.0\$cpu_arch;${win_sdk_path}Ap
## msstore-cli (ONLY FOR RELEASES)
if ("$CI_COMMIT_TAG" -eq (git describe --all | Foreach-Object {$_ -replace 'tags/',''}))
{
#.NET runtime required by msstore-cli (and its PowerShell counterpart)
#.NET runtime required by msstore-cli
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$msstore_tag = (Invoke-RestMethod 'https://api.github.com/repos/microsoft/msstore-cli/releases/latest').tag_name
$dotnet_msstore = (Invoke-RestMethod "https://raw.githubusercontent.com/microsoft/msstore-cli/refs/heads/rel/$msstore_tag/MSStore.API/MSStore.API.csproj").Project.PropertyGroup.TargetFramework
$dotnet_msstore = ((Invoke-RestMethod "https://raw.githubusercontent.com/microsoft/msstore-cli/refs/heads/rel/$msstore_tag/MSStore.API/MSStore.API.csproj").Project.PropertyGroup.TargetFramework | Out-String).Trim()
$powershell_tag = (Invoke-RestMethod 'https://api.github.com/repos/PowerShell/PowerShell/releases/latest').tag_name
$dotnet_powershell = (Invoke-RestMethod "https://raw.githubusercontent.com/PowerShell/PowerShell/refs/tags/$powershell_tag/PowerShell.Common.props").Project.PropertyGroup.TargetFramework
foreach ($dotnet in $dotnet_msstore, $dotnet_powershell)
#$dotnet_powershell = ((Invoke-RestMethod "https://raw.githubusercontent.com/PowerShell/PowerShell/refs/tags/$powershell_tag/PowerShell.Common.props").Project.PropertyGroup.TargetFramework | Out-String).Trim()
foreach ($dotnet in $dotnet_msstore)
{
$dotnet_major = ($dotnet | Out-String) -replace "`r`n",'' -replace 'net',''
$dotnet_tag = ((Invoke-RestMethod "https://api.github.com/repos/dotnet/runtime/releases").tag_name | Select-String "$dotnet_major" | Select-Object -First 1).ToString() -replace 'v',''
if (-not (Test-Path "$Env:ProgramFiles\dotnet\shared\Microsoft.NETCore.App\$dotnet_major*\") -and -not (Test-Path "${PARENT_DIR}dotnet-runtime-${dotnet_major}"))
if (-not (Test-Path "$Env:ProgramFiles\dotnet\shared\Microsoft.NETCore.App\$dotnet_major*\"))
{
Write-Output "(INFO): downloading .NET v$dotnet_tag"
Invoke-WebRequest "https://aka.ms/dotnet/$dotnet_major/dotnet-runtime-win-$cpu_arch.zip" -UseBasicParsing -OutFile ${PARENT_DIR}dotnet-runtime-${dotnet_major}.zip
Expand-Archive ${PARENT_DIR}dotnet-runtime-${dotnet_major}.zip ${PARENT_DIR}dotnet-runtime-${dotnet_major} -Force
$env:PATH = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime-${dotnet_major});" + $env:PATH
$env:DOTNET_ROOT = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime-${dotnet_major})"
Expand-Archive ${PARENT_DIR}dotnet-runtime-${dotnet_major}.zip ${PARENT_DIR}dotnet-runtime -Force
$env:PATH = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime);" + $env:PATH
$env:DOTNET_ROOT = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime)"
}
}
#powershell required by msstore-cli. See: https://github.com/microsoft/msstore-cli/issues/70
#powershell (with bundled .NET runtime) required by msstore-cli. See: https://github.com/microsoft/msstore-cli/issues/70
if (-not (Test-Path Registry::'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\pwsh.exe') -and $PSVersionTable.PSVersion.Major -lt 6)
{
Write-Output "(INFO): downloading PowerShell $powershell_tag"

View file

@ -80,6 +80,23 @@
</provides>
<releases>
<release version="3.2.4" date="TODO">
<url type="details">https://www.gimp.org/release/3.2.4/</url>
<description>
<p>
The second bugfix release of the GIMP 3.2 series brings it to quite a stable state again as bugs reports are slowing down.
</p>
<ul>
<li>Bug fixed where GIMP would fail to open some XCF</li>
<li>When moving a floating layer or selection with a selection tool, marching ants are now disabled</li>
<li>Improved Text tool, especially regarding prioritizing global actions</li>
<li>Better temporary folder handling</li>
<li>Fill actions now behave accordingly to the target item type</li>
<li>Various file formats support improved</li>
<li>A new function and a deprecation in the libgimp API for plug-ins</li>
</ul>
</description>
</release>
<release version="3.2.2" date="2026-03-28">
<url type="details">https://www.gimp.org/release/3.2.2/</url>
<description>

View file

@ -10,38 +10,33 @@ manconf.set('manpage_gimpdir', '$XDG_CONFIG_HOME/' + gimpdir / gimp_app_version)
manconf.set('gimpsysconfdir', prefix / gimpsysconfdir)
manconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
custom_target('gimprc-' + gimp_app_version + '.5',
output: 'gimprc-' + gimp_app_version + '.5',
depends: [ gimp_exe_depends ],
command: [ gimp_exe, '--no-interface',
'--dump-gimprc-manpage' ],
capture: true,
build_by_default: true,
env: gimp_run_env,
install: true,
install_dir: get_option('mandir') / 'man5')
gimprc_man = custom_target('gimprc-' + gimp_app_version + '.5',
output: 'gimprc-' + gimp_app_version + '.5',
depends: [ gimp_exe_depends ],
command: [ gimp_exe, '--no-interface',
'--dump-gimprc-manpage' ],
capture: true,
build_by_default: true,
env: gimp_run_env,
install: true,
install_dir: get_option('mandir') / 'man5')
man_files = [
configure_file(
input : 'gimptool.1.in',
output: 'gimptool-' + gimp_app_version + '.1',
configuration: manconf,
)
]
gimptool_man = configure_file(input : 'gimptool.1.in',
output: 'gimptool-' + gimp_app_version + '.1',
configuration: manconf)
man_files = [ gimptool_man ]
if enable_console_bin
man_files += configure_file(
input : 'gimp.1.in',
output: 'gimp-console-' + gimp_app_version + '.1',
configuration: manconf,
)
gimp_console_man = configure_file(input : 'gimp.1.in',
output: 'gimp-console-' + gimp_app_version + '.1',
configuration: manconf)
man_files += [ gimp_console_man ]
endif
man_files += configure_file(
input : 'gimp.1.in',
output: 'gimp-' + gimp_app_version + '.1',
configuration: manconf,
)
gimp_man = configure_file(input : 'gimp.1.in',
output: 'gimp-' + gimp_app_version + '.1',
configuration: manconf)
man_files += [ gimp_man ]
install_man(man_files)
@ -76,3 +71,21 @@ if enable_default_bin and not platform_windows
pointing_to: 'gimp-' + gimp_app_version + '.1',
install_dir: get_option('mandir') + '/man1')
endif
# Optional Markdown versions for the website.
pandoc = find_program('pandoc', required: false)
custom_target('Markdown GIMP man page',
input: [ gimp_man ],
output: 'gimp.md',
command: [ '../tools/man2md.py', '@INPUT@', '@OUTPUT@', prefix ],
build_by_default: false)
custom_target('Markdown gimprc man page',
input: [ gimprc_man ],
output: 'gimprc.md',
command: [ '../tools/man2md.py', '@INPUT@', '@OUTPUT@', prefix ],
build_by_default: false)
custom_target('Markdown gimptool man page',
input: [ gimptool_man ],
output: 'gimptool.md',
command: [ '../tools/man2md.py', '@INPUT@', '@OUTPUT@', prefix ],
build_by_default: false)

View file

@ -187,7 +187,7 @@
# (default-gradient "FG to BG (RGB)")
# Specify a default tool preset. The tool preset is searched for in the
# specified tool prests path. This is a string value.
# specified tool presets path. This is a string value.
#
# (default-tool-preset "Current Options")

@ -1 +1 @@
Subproject commit 3378d2882047f2f93a0165bdaf7e1dd18c3535e1
Subproject commit 3379d4a947c2293a38245449e1d1fab057667565

View file

@ -404,7 +404,7 @@ gimp_fatal_func (const gchar *log_domain,
}
#endif /* ! G_OS_WIN32 */
/* Do not end with gimp_quit().
/* Do not end with _gimp_quit().
* We want the plug-in to continue its normal crash course, otherwise
* we won't get the "Plug-in crashed" error in GIMP.
*/

View file

@ -205,8 +205,19 @@ gimp_main (GType plug_in_type,
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0 && ! g_getenv ("TERM") && ! g_getenv ("SHELL"))
{
/* 'r' is needed to prevent interleaving and '+' to support colors */
#ifndef _UCRT
freopen ("CONOUT$", "r+", stdout);
freopen ("CONOUT$", "r+", stderr);
#else
FILE* fileOut;
FILE* fileErr;
errno_t errOut = freopen_s (&fileOut, "CONOUT$", "r+", stdout);
errno_t errErr = freopen_s (&fileErr, "CONOUT$", "r+", stderr);
if (errOut != 0 || errErr != 0)
g_warning ("Failed to redirect streams to CONOUT$. stdout: %d, stderr: %d", errOut, errErr);
#endif
_flushall ();
}
@ -565,6 +576,7 @@ gimp_main (GType plug_in_type,
_gimp_plug_in_query (PLUG_IN);
gimp_close ();
gimp_env_exit (TRUE);
return EXIT_SUCCESS;
}
@ -577,6 +589,7 @@ gimp_main (GType plug_in_type,
_gimp_plug_in_init (PLUG_IN);
gimp_close ();
gimp_env_exit (TRUE);
return EXIT_SUCCESS;
}
@ -594,6 +607,8 @@ gimp_main (GType plug_in_type,
g_clear_object (&_check_custom_color1);
g_clear_object (&_check_custom_color2);
gimp_env_exit (TRUE);
return EXIT_SUCCESS;
}
@ -637,18 +652,20 @@ gimp_get_pdb (void)
*
* Forcefully causes the GIMP library to exit and close down its
* connection to main gimp application. This function never returns.
*
* It is highly unadvised to use this function since the plug-in will
* not properly return. If you need to return from a plug-in in error,
* gracefully return with [method@Procedure.new_return_values] setting
* [enum@Gimp.PDBStatusType.EXECUTION_ERROR] as a status and with a well
* written [struct@GLib.Error] message to display.
*
* Deprecated: there are no alternatives. Quit your plug-ins cleanly
* instead.
**/
void
gimp_quit (void)
{
gimp_close ();
#if defined G_OS_WIN32 && defined HAVE_EXCHNDL
if (plug_in_backtrace_path)
g_free (plug_in_backtrace_path);
#endif
exit (EXIT_SUCCESS);
_gimp_quit ();
}
/**
@ -1021,6 +1038,29 @@ gimp_get_progname (void)
}
/* Internal functions */
/* _gimp_quit:
*
* Forcefully causes the GIMP library to exit and close down its
* connection to main gimp application. This function never returns.
*
* To be used internally by libgimp only.
*/
void
_gimp_quit (void)
{
gimp_close ();
#if defined G_OS_WIN32 && defined HAVE_EXCHNDL
if (plug_in_backtrace_path)
g_free (plug_in_backtrace_path);
#endif
exit (EXIT_SUCCESS);
}
/* private functions */
static void
@ -1132,7 +1172,7 @@ gimp_plugin_sigfatal_handler (gint sig_num)
break;
}
/* Do not end with gimp_quit().
/* Do not end with _gimp_quit().
* We want the plug-in to continue its normal crash course, otherwise
* we won't get the "Plug-in crashed" error in GIMP.
*/

View file

@ -1059,6 +1059,7 @@ EXPORTS
gimp_resource_rename
gimp_resource_select_new
gimp_resource_select_set
gimp_resources_loaded
gimp_selection_all
gimp_selection_border
gimp_selection_bounds

View file

@ -176,9 +176,7 @@ GimpPlugIn * gimp_get_plug_in (void);
*/
GimpPDB * gimp_get_pdb (void);
/* Forcefully causes the gimp library to exit and
* close down its connection to main gimp application.
*/
GIMP_DEPRECATED
void gimp_quit (void) G_GNUC_NORETURN;
/* Return various constants given by the GIMP core at plug-in config time.
@ -208,6 +206,13 @@ const gchar * gimp_icon_theme_dir (void) G_GNUC_CONST;
const gchar * gimp_get_progname (void) G_GNUC_CONST;
/* Forcefully causes the gimp library to exit and
* close down its connection to main gimp application.
* For internal use only.
*/
G_GNUC_INTERNAL
void _gimp_quit (void) G_GNUC_NORETURN;
G_END_DECLS
#endif /* __GIMP_H__ */

Some files were not shown because too many files have changed in this diff Show more