Compare commits

..

No commits in common. "master" and "GIMP_3_2_2" have entirely different histories.

230 changed files with 68466 additions and 70739 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' 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
## '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
## 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,13 +214,14 @@ deps-debian-nonreloc:
libqoi-dev
librsvg2-dev
libsuitesparse-dev
$UMFPACK
libtiff-dev
$UMFPACK
libunwind-dev
libwebp-dev
libwmf-dev
libxmu-dev
libxpm-dev
locales
mypaint-brushes
poppler-data
python3
@ -285,7 +286,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 $WARN_AS_ERROR_ON_CI
$MESON_OPTIONS
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
@ -545,7 +546,6 @@ 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 --upgrade 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 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_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"
- $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"
## Runtime vars
- $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"
- $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"
## 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_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" }
- 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" }
- 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${VARIANT}
- key: $CI_PROJECT_NAMESPACE-$ARCH
unprotect: true
paths:
- macports-cached-$ARCH
@ -695,7 +695,7 @@ gimp-macos-inhouse:
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
- key: $CI_PROJECT_NAMESPACE-$ARCH
unprotect: true
paths:
- macports-cached-$ARCH
@ -794,7 +794,6 @@ 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"
@ -821,33 +820,6 @@ 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 ##
@ -948,8 +920,7 @@ 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
#keep 'ref:' synced with submission section of build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
ref: b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
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, GTK and Gexiv2.
GdkPixbuf, GEGL, GIO, GLib, GObject and GTK.
16. Windows builds can now generate backtrace logs upon a crash.
The logs will be available in: %APPDATA%\GIMP\@GIMP_APP_VERSION@\CrashLog\
@ -311,6 +311,7 @@ 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,69 +6,6 @@
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,19 +65,8 @@ 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,15 +37,11 @@
#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"
@ -590,60 +586,7 @@ edit_fill_cmd_callback (GimpAction *action,
gimp_fill_options_get_undo_desc (options));
for (iter = drawables; iter; iter = iter->next)
{
/* 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_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 &&
(gint) color_type >= 0 &&
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 &&
(gint) color_type >= 0 &&
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 presets path."
"specified tool prests 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 5
#define MAX_CHANNELS 4
#define RED 0
#define GREEN 1

View file

@ -38,10 +38,6 @@
#include <io.h>
#endif
#ifdef __APPLE__
#include <spawn.h>
#endif
#include "core-types.h"
#include "gimp-spawn.h"
@ -171,7 +167,7 @@ gimp_spawn_async (gchar **argv,
g_return_val_if_fail (argv != NULL, FALSE);
g_return_val_if_fail (argv[0] != NULL, FALSE);
#if defined(HAVE_VFORK) && !defined(__APPLE__)
#ifdef HAVE_VFORK
if (flags == (G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_CHILD_INHERITS_STDIN))
@ -236,36 +232,7 @@ gimp_spawn_async (gchar **argv,
return TRUE;
}
}
#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
#endif /* HAVE_VFORK */
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 = (gchar *) g_getenv ("LC_ALL");
p = getenv ("LC_ALL");
if (p != NULL)
lang = g_strdup (p);
else
{
p = (gchar *) g_getenv ("LANG");
p = getenv ("LANG");
if (p != NULL)
lang = g_strdup (p);
else
{
p = (gchar *) g_getenv (category);
p = getenv (category);
if (p != NULL)
lang = g_strdup (p);
else
@ -428,11 +428,7 @@ 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,8 +28,6 @@
#include "core-types.h"
#include "gimpcoreapp.h"
#include "config/gimprc.h"
#include "gegl/gimp-babl.h"
@ -1275,9 +1273,8 @@ gimp_image_opened (Gimp *gimp,
}
GFile *
gimp_get_temp_file (Gimp *gimp,
const gchar *extension,
GError **error)
gimp_get_temp_file (Gimp *gimp,
const gchar *extension)
{
static gint id = 0;
static gint pid;
@ -1296,24 +1293,13 @@ 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,
error);
if (dir == NULL)
{
g_free (basename);
return NULL;
}
NULL);
if (! g_file_query_exists (dir, NULL))
{
/* Try to make the temp directory if it doesn't exist.
* Ignore any error.
*/
if (! g_file_make_directory_with_parents (dir, NULL, error))
{
g_free (basename);
g_object_unref (dir);
return NULL;
}
g_file_make_directory_with_parents (dir, NULL, NULL);
}
file = g_file_get_child (dir, basename);
g_free (basename);
@ -1370,20 +1356,9 @@ gimp_exit_idle_cleanup_stray_images (Gimp *gimp)
{
GimpImage *image = image_iter->data;
/* 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));
/* 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));
g_object_unref (image);
}

View file

@ -256,8 +256,7 @@ void gimp_image_opened (Gimp *gimp,
GFile *file);
GFile * gimp_get_temp_file (Gimp *gimp,
const gchar *extension,
GError **error);
const gchar *extension);
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,11 +644,7 @@ 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,9 +841,6 @@ 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 (
@ -869,7 +866,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gint weighted_sum;
gint leading_sum;
gint leading_weighted_sum;
} acc[MAX_CHANNELS];
} acc[components];
memset (acc, 0, sizeof (acc));
@ -949,7 +946,7 @@ gimp_brush_transform_blur (GimpTempBuf *buf,
gfloat weighted_sum;
gint leading_sum;
gint trailing_sum;
} acc[MAX_CHANNELS];
} acc[components];
memset (acc, 0, sizeof (acc));

View file

@ -142,6 +142,8 @@ 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,
@ -272,6 +274,7 @@ 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;
@ -940,6 +943,15 @@ 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,6 +323,7 @@ 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;
@ -1363,6 +1364,21 @@ 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,6 +60,8 @@ 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,
@ -133,6 +135,8 @@ 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,7 +135,6 @@ 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 ();
@ -176,16 +175,9 @@ 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);
#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)
switch (sscanf (end, "%d %d %d %d",
&type, &color,
&left_color_type, &right_color_type))
{
case 4:
seg->left_color_type = (GimpGradientColor) left_color_type;

View file

@ -44,6 +44,7 @@
#include "gimpwaitable.h"
#define MAX_N_COMPONENTS 4
#define N_DERIVED_CHANNELS 2
#define PIXELS_PER_THREAD \
@ -145,7 +146,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_CHANNELS, 0,
0, MAX_N_COMPONENTS, 0,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_N_BINS,

View file

@ -993,18 +993,19 @@ 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)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION; */
/* 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;
palette = gimp_image_get_colormap_palette (image);
space = gimp_image_get_layer_space (image);

View file

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

View file

@ -909,8 +909,6 @@ 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
@ -1390,8 +1388,6 @@ 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
@ -3698,6 +3694,22 @@ 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)
{
@ -3782,6 +3794,22 @@ 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)
{
@ -6410,28 +6438,3 @@ 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,6 +237,8 @@ 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,
@ -244,6 +246,8 @@ 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);
@ -508,7 +512,3 @@ 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,6 +194,8 @@ 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,
@ -446,6 +448,7 @@ 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;
@ -1508,6 +1511,22 @@ 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,15 +198,8 @@ 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)
@ -223,12 +216,7 @@ 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)
@ -245,11 +233,7 @@ 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)
@ -267,11 +251,7 @@ 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);
@ -1901,7 +1881,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;
@ -1917,7 +1897,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 };
guchar bgcolor[MAX_CHANNELS] = { 0, 0, 0, 0 };
guchar *buf = NULL;
gint x1, y1, x2, y2;
gint width, height;

View file

@ -48,9 +48,6 @@ 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;
@ -151,9 +148,6 @@ 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);
@ -192,9 +186,6 @@ 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;
}
@ -237,8 +228,6 @@ 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)
@ -700,9 +689,6 @@ 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;
}
@ -999,19 +985,10 @@ find_contiguous_segment (const gfloat *col,
gfloat *row)
{
gfloat *s;
gfloat *mask_row;
gfloat mask_row_buf[src_extent->width];
gfloat *mask_row = mask_row_buf - src_extent->x;
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.
*/
GdkModifierType state = 0;
guint state = 0;
const GdkEvent *last_event;
last_event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);

View file

@ -371,9 +371,7 @@ 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);
@ -1146,11 +1144,7 @@ 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,13 +1944,7 @@ 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,9 +293,7 @@ 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,12 +690,11 @@ 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)
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL && display)
{
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, NULL);
temp_file = gimp_get_temp_file (gimp, ext + 1);
g_free (basename);
}
if (! temp_file)
temp_file = gimp_get_temp_file (gimp, "xxx", NULL);
temp_file = gimp_get_temp_file (gimp, "xxx");
return temp_file;
}

View file

@ -604,17 +604,15 @@ void
gimp_update_check (GimpCoreConfig *config)
{
#ifdef PLATFORM_OSX
const gchar *gimp_versions;
NSMutableURLRequest *request;
NSURLSession *session;
const gchar *gimp_versions;
gimp_versions = gimp_get_version_url ();
request = [[NSMutableURLRequest alloc] init];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:@(gimp_versions)]];
[request setHTTPMethod:@"GET"];
session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSession *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
#import <Foundation/Foundation.h>
#include <Foundation/NSLocale.h>
#endif
#include "language.h"

View file

@ -570,15 +570,12 @@ 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 */
newargc = 0;
gint newargc = 0;
for (gint i = 0; i < argc; i++)
{
if (!g_str_has_prefix (argv[i], "-psn_"))
@ -909,8 +906,6 @@ main (int argc,
pdb_compat_mode,
backtrace_file);
gimp_env_exit (FALSE);
g_free (backtrace_file);
g_clear_object (&system_gimprc_file);
@ -964,19 +959,8 @@ 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,13 +587,8 @@ 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,21 +904,12 @@ 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> G_GNUC_UNUSED dispatch_paint_buf;
static BasicDispatch<PaintBuf, ALGORITHM_PAINT_BUF> dispatch_paint_buf;
/* PaintMask, dispatch_paint_mask():
@ -691,7 +691,7 @@ struct DispatchStipple
else
visitor (identity<Stipple<Algorithm, FALSE>> ());
}
} static G_GNUC_UNUSED dispatch_stipple;
} static 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> G_GNUC_UNUSED dispatch_comp_mask;
static BasicDispatch<CompMask, ALGORITHM_COMP_MASK> dispatch_comp_mask;
template <class Base>
static constexpr gboolean
@ -815,7 +815,7 @@ static BasicDispatch<
TempCompMask,
ALGORITHM_TEMP_COMP_MASK,
decltype (dispatch_comp_mask)
> G_GNUC_UNUSED dispatch_temp_comp_mask;
> 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> G_GNUC_UNUSED dispatch_comp_buffer;
static BasicDispatch<CompBuffer, ALGORITHM_COMP_BUFFER> dispatch_comp_buffer;
template <class Base>
static constexpr gboolean
@ -939,7 +939,7 @@ static BasicDispatch<
TempCompBuffer,
ALGORITHM_TEMP_COMP_BUFFER,
decltype (dispatch_comp_buffer)
> G_GNUC_UNUSED dispatch_temp_comp_buffer;
> dispatch_temp_comp_buffer;
/* CanvasBufferIterator, DispatchCanvasBufferIterator:

View file

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

View file

@ -1220,41 +1220,22 @@ 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",
TRUE,
FALSE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -219,8 +219,7 @@ temp_file_invoker (GimpProcedure *procedure,
if (success)
{
file = gimp_get_temp_file (gimp, extension, error);
success = (file != NULL);
file = gimp_get_temp_file (gimp, extension);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
@ -292,18 +291,12 @@ 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.\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.",
"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.",
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"
/* 786 procedures registered total */
/* 785 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)

View file

@ -48,38 +48,6 @@
#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,
@ -542,37 +510,6 @@ 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.",
TRUE,
FALSE,
FALSE,
gimp_unit_inch (),
GIMP_PARAM_READWRITE));

View file

@ -588,11 +588,7 @@ 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;
@ -630,12 +626,7 @@ 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 */
@ -676,23 +667,11 @@ 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,28 +1117,17 @@ 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 */
guint visible : 1; /* slider is visible */
guint selectable : 1; /* slider is selectable */
guint movable : 1; /* slider movable */
guint removable : 1; /* slider is removable */
gboolean visible : 1; /* slider is visible */
gboolean selectable : 1; /* slider is selectable */
gboolean movable : 1; /* slider movable */
gboolean removable : 1; /* slider is removable */
guint autohide : 1; /* whether to autohide the slider */
gboolean 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_clear_object (&GET_PRIVATE (font_factory)->pango_context);
g_object_unref (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, g_strerror (errno));
g_string_append_printf (ignored_fonts, "- %s (access error: %s)\n", file, strerror (errno));
n_ignored++;
continue;
}

View file

@ -89,22 +89,6 @@ 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.
@ -193,14 +177,6 @@ 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),
@ -209,8 +185,6 @@ gimp_text_from_parasite (const GimpParasite *parasite,
error);
gimp_parasite_free (new_parasite);
if (edited_data)
g_free (parasite_data);
}
else
{

View file

@ -106,19 +106,11 @@ 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,8 +112,6 @@ struct _GimpEditSelectionTool
gdouble last_motion_x; /* Previous coords sent to _motion */
gdouble last_motion_y;
gboolean saved_show_selection;
};
struct _GimpEditSelectionToolClass
@ -179,8 +177,7 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_select)
{
GimpTool *tool = GIMP_TOOL (edit_select);
edit_select->first_move = TRUE;
edit_select->saved_show_selection = FALSE;
edit_select->first_move = TRUE;
gimp_tool_control_set_active_modifiers (tool->control,
GIMP_TOOL_ACTIVE_MODIFIERS_SEPARATE);
@ -231,9 +228,6 @@ 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) &&
@ -250,11 +244,6 @@ 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);
@ -471,9 +460,6 @@ 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,7 +612,6 @@ 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);
@ -621,7 +620,6 @@ 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);
@ -660,9 +658,6 @@ 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,7 +26,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
@ -539,6 +538,14 @@ 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);
@ -551,14 +558,6 @@ 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,
@ -1358,13 +1357,6 @@ 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))
{
@ -1373,7 +1365,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, default_size * PANGO_SCALE);
amount * PANGO_SCALE);
}
static void

View file

@ -32,12 +32,12 @@
#include "unique.h"
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
#ifndef G_OS_WIN32
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);
#elif defined(G_OS_WIN32)
#else
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;
}
#elif !defined(PLATFORM_OSX)
#else
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 ((guint)state & (guint)gimp_get_toggle_behavior_mask ())
if (state & 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, (guint *) &src_type))
if (! gtk_target_list_find (target_list, target_atom, &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),
(gdouble) priv->history_duration / 1000.0);
priv->history_duration / 1000.0);
gtk_box_pack_start (GTK_BOX (vbox2), meter, FALSE, FALSE, 0);
gtk_widget_show (meter);
@ -2418,11 +2418,6 @@ 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];
@ -2438,7 +2433,8 @@ gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
variable_data->available = TRUE;
variable_data->value.size = info.resident_size;
#else
infoCount = TASK_VM_INFO_COUNT;
task_vm_info_data_t info;
mach_msg_type_number_t infoCount = TASK_VM_INFO_COUNT;
if( task_info(mach_task_self (), TASK_VM_INFO,
(task_info_t)&info, &infoCount ) != KERN_SUCCESS )
@ -2589,11 +2585,7 @@ 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;
@ -4978,7 +4970,7 @@ gimp_dashboard_set_history_duration (GimpDashboard *dashboard,
if (group_data->meter)
{
gimp_meter_set_history_duration (group_data->meter,
(gdouble) history_duration / 1000.0);
history_duration / 1000.0);
}
}

View file

@ -795,11 +795,7 @@ 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,15 +454,8 @@ 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,17 +504,9 @@ 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 ?
(gint) GIMP_CUSTOM_STYLE_PATTERN :
(gint) GIMP_FILL_STYLE_PATTERN),
GIMP_CUSTOM_STYLE_PATTERN :
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) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "shortcut-modifiers"));
old_modifiers = (GdkModifierType) 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,13 +588,8 @@ 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);
}
@ -644,13 +639,8 @@ 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);
@ -698,13 +688,8 @@ 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);
}
@ -976,13 +961,8 @@ 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,8 +442,7 @@ void
gimp_text_buffer_change_size (GimpTextBuffer *buffer,
const GtkTextIter *start,
const GtkTextIter *end,
gint count,
gint default_size)
gint count)
{
GtkTextIter iter;
GtkTextIter span_start;
@ -480,19 +479,16 @@ 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 (new_size > 0)
if ((span_size + count) > 0)
{
span_tag = gimp_text_buffer_get_size_tag (buffer,
new_size);
span_size + count);
gtk_text_buffer_apply_tag (GTK_TEXT_BUFFER (buffer), span_tag,
&span_start, &span_end);
@ -1380,11 +1376,7 @@ 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,8 +91,7 @@ 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 default_size);
gint amount);
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 */
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
#ifndef G_OS_WIN32
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)
{
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
#ifndef G_OS_WIN32
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,11 +332,7 @@ 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, ;);
@ -1865,7 +1861,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, (GimpSelectMethod *) &method))
if (! gimp_item_list_is_pattern (set, &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 source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git 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 || true #true is for this script work on tarballs too
git submodule update --init
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, call this script from the root of gimp source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, read: https://developer.gimp.org/core/setup/build/linux/\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/b8e6f8f5a6d2f39b2852d165cc2ab3550ac9e3fb/flatpak/flatpak_ci_initiative.yml --output flatpak_ci_initiative.yml
eval "$(sed -n '/BUILD_ID=/,/purge/ { s/^ - //; p; }' flatpak_ci_initiative.yml)"
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)"
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.9.tar.gz",
"sha256": "328c6fcd794b2538d71c65b401264e6745cf65cbc18f404e55ec3c0230d2373c",
"url": "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.4.8.tar.gz",
"sha256": "0dd8d50e7f04219f3f925702564e994f9acdc6133ba537ec75eb6208119bec33",
"x-checker-data": {
"type": "anitya",
"project-id": 13289,
@ -242,8 +242,8 @@
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-26.04.0.tar.xz",
"sha256": "b0955163114af96bc0106f68cb24daf973a629462453d8b82775f81b0d4e0693",
"url": "https://poppler.freedesktop.org/poppler-26.03.0.tar.xz",
"sha256": "8b3c5e2a9f2ab4c3ec5029f28af1b433c6b71f0d1e7b3997aa561cf1c0ca4ebe",
"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.15.tar.gz",
"sha512": "e95ab312ac06add60f278b9fa8cebb20bd8bd53b98f7159fe1ebc206cbcad1a186ef2ce4dd6c3c271dcad037e9b685493cda1267d4ebf9638906584eedb4f960",
"url": "https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.14.tar.gz",
"sha512": "5f2068e89eb3998acd40a7d7272f2bba7d8366b1bf647ba10a4415cca2229ae5d8175140e49ea232c7e16887c64e9129df9f0effd045bf96887f2eada4e10992",
"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 source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git 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 source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
exit 1
elif [ $(basename "$PWD") = 'snap' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init || true #true is for this script work on tarballs too
git submodule update --init
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 source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n'
exit 1
elif [ $(basename "$PWD") = 'snap' ]; then
cd ../../..

View file

@ -1,6 +1,6 @@
name: gimp-experimental
name: gimp
adopt-info: gimp
grade: devel #see parts:babl_or_gegl:override-pull
grade: stable #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.experimental
- -Dbuild-id=org.gimp.GIMP.snapcraft.latest
build-packages:
- bison
- flex

View file

@ -8,14 +8,12 @@ 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, read: https://developer.gimp.org/core/setup/build/macos/\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir/\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='/..'
@ -30,7 +28,8 @@ if [ -z "$OPT_PREFIX" ]; then
exit 1
fi
fi
if [ "$OPT_PREFIX" != '/opt/local' ] && [ "$OPT_PREFIX" != '/opt/homebrew' ]; then
#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
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
@ -47,7 +46,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/#.*//' | 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/|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, read: https://developer.gimp.org/core/setup/build/macos/\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir/\n'
exit 1
elif [ $(basename "$PWD") = 'macos' ]; then
cd ../../..
fi
if [ -z "$GITLAB_CI" ]; then
git submodule update --init || true #true is for this script work on tarballs too
git submodule update --init
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 $WARN_AS_ERROR_ON_CI \
meson setup _build-$(uname -m) -Dprefix="$GIMP_PREFIX" $NON_RELOCATABLE_OPTION \
$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', ".".join(platform.mac_ver()[0].split(".")[:2]))], 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')], 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,57 +2,49 @@
# KEEP THIS FILE ORDERING SIMILAR to build/windows/all-deps-uni.txt
# BUILD-TIME ONLY DEPS
gettext|homebrew:gettext \
gi-docgen|homebrew:gi-docgen \
gettext \
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|homebrew:vala \
vala -valadoc \
# RUNTIME DEPS
aalib -x11|homebrew:aalib \
aalib -x11 \
appstream -x11|homebrew:appstream \
atk|homebrew:at-spi2-core \
bzip2 #homebrew uses libbz2 from macOS \
atk \
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|homebrew:libheif \
libheif \
libjpeg-turbo|homebrew:libjpeg-turbo \
libjxl|homebrew:jpeg-xl \
libmng|homebrew:libmng \
libmypaint|homebrew:libmypaint \
libjxl \
libmng \
libmypaint \
libpng|homebrew:libpng \
librsvg|homebrew:librsvg \
tiff|homebrew:libtiff \
webp|homebrew:webp \
tiff \
webp \
libwmf -x11|homebrew:libwmf \
maxflow #homebrew rejected maxflow https://github.com/Homebrew/homebrew-core/pull/276186 \
#maxflow not available yet
mypaint-brushes|homebrew:mypaint-brushes \
openexr|homebrew:openexr \
openjpeg|homebrew:openjpeg \
pango +thai +quartz -x11|homebrew:pango \
openexr \
openjpeg \
pango +thai +quartz -x11 \
poppler +pinentry -pinentry_mac|homebrew:poppler \
poppler-data \
python313|homebrew:python \ py313-certifi|homebrew:certifi
py313-gobject3|homebrew:pygobject3 \
qoi #homebrew rejected qoi https://github.com/Homebrew/homebrew-core/pull/276182 \
qoi \
#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 source dir\n'
printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git 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.png"
# set background picture of icon view options of container window to POSIX file "$DMG_MOUNT/.background/gimp-dmg.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,56 +1,18 @@
From fd8af534aa3af90aa9e6f3674fa780ffc48f7299 Mon Sep 17 00:00:00 2001
From 2dd50107f6a700527741eb2373a8ba26975a961c Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Thu, 2 Apr 2026 14:19:49 -0300
Date: Fri, 26 Dec 2025 19:54:22 -0300
Subject: [PATCH] build/macos: Do not require gexiv2-0.14 on homebrew
---
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(-)
libgimp/meson.build | 2 +-
meson.build | 6 ++----
2 files changed, 3 insertions(+), 5 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 eb1166c728..36af7e9e62 100644
index c12e60c2cd..738564c2b9 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -399,7 +399,7 @@ libgimp_deps_table = [
@@ -387,7 +387,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', },
@ -59,32 +21,11 @@ index eb1166c728..36af7e9e62 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 3e6a324e16..d46d4b0ee5 100644
index 97662d62d7..4fcf576cce 100644
--- a/meson.build
+++ b/meson.build
@@ -464,9 +464,8 @@ gegl_minver = '0.4.66'
@@ -454,9 +454,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)
@ -93,10 +34,10 @@ index 3e6a324e16..d46d4b0ee5 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'
@@ -1812,7 +1811,6 @@ install_conf.set('GDK_PIXBUF_REQUIRED_VERSION', gdk_pixbuf_minver)
@@ -1686,7 +1685,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)
@ -104,58 +45,5 @@ index 3e6a324e16..d46d4b0ee5 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,8 +14,6 @@ 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 = '\..'
@ -32,9 +30,9 @@ if (-not $env:VCPKG_ROOT -or (Test-Path "$env:VCPKG_ROOT\vcpkg.exe" -Type Leaf))
exit 1
}
}
if (-not $env:VCPKG_DEFAULT_HOST_TRIPLET -and $env:VCPKG_ROOT)
if (-not $env:VCPKG_DEFAULT_TRIPLET -and $env:VCPKG_ROOT)
{
$env:VCPKG_DEFAULT_HOST_TRIPLET = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'arm64-windows' } else { 'x64-windows-release' }
$env:VCPKG_DEFAULT_TRIPLET = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'arm64-windows' } else { 'x64-windows' }
}
if (-not $env:MSYS_ROOT -and -not (Test-Path "$env:VCPKG_ROOT\vcpkg.exe" -Type Leaf))
@ -64,7 +62,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 | 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 }
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 }
}
Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):deps_install$([char]13)$([char]27)[0K"
@ -127,7 +125,7 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt
}
## Configure and/or build
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_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))
{
@ -140,7 +138,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_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -Dprefix="$GIMP_PREFIX" $PKGCONF_RELOCATABLE_OPTION `
meson setup _build-$(@($env:VCPKG_DEFAULT_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 });
}
@ -151,13 +149,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_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" `
cmake -G Ninja -B _build-$(@($env:VCPKG_DEFAULT_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_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
Set-Location _build-$(@($env:VCPKG_DEFAULT_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_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)\build.ninja -Type Leaf))
if (-not (Test-Path _build-$(@($env:VCPKG_DEFAULT_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_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 `
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 `
-Denable-default-bin=enabled -Dbuild-id='org.gimp.GIMP_official';
if ("$LASTEXITCODE" -gt '0') { exit 1 }
}
Set-Location _build-$(@($env:VCPKG_DEFAULT_HOST_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1)
Set-Location _build-$(@($env:VCPKG_DEFAULT_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,7 +1,9 @@
# NATIVE/MINGW DEPS AT BUILD-TIME ONLY
${MINGW_PACKAGE_PREFIX}-gettext-tools|vcpkg:gettext
${MINGW_PACKAGE_PREFIX}-binutils
${MINGW_PACKAGE_PREFIX}-gettext-tools
${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
@ -11,51 +13,44 @@ ${MINGW_PACKAGE_PREFIX}-vala
# NATIVE/MINGW DEPS AT RUNTIME
${MINGW_PACKAGE_PREFIX}-aalib
${MINGW_PACKAGE_PREFIX}-appstream
${MINGW_PACKAGE_PREFIX}-atk|vcpkg:atk[introspection]
${MINGW_PACKAGE_PREFIX}-bzip2|vcpkg:bzip2
${MINGW_PACKAGE_PREFIX}-atk
${MINGW_PACKAGE_PREFIX}-cairo|vcpkg:cairo
${MINGW_PACKAGE_PREFIX}-cfitsio|vcpkg:cfitsio
${MINGW_PACKAGE_PREFIX}-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[cairo]
${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime|vcpkg:gobject-introspection
${MINGW_PACKAGE_PREFIX}-graphviz
${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}-gtk3|vcpkg:gtk3
${MINGW_PACKAGE_PREFIX}-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|vcpkg:libheif[hevc,openjpeg]
${MINGW_PACKAGE_PREFIX}-libheif
${MINGW_PACKAGE_PREFIX}-libilbm
${MINGW_PACKAGE_PREFIX}-libjpeg-turbo|vcpkg:libjpeg-turbo
${MINGW_PACKAGE_PREFIX}-libjxl|vcpkg:libjxl
${MINGW_PACKAGE_PREFIX}-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|vcpkg:tiff
${MINGW_PACKAGE_PREFIX}-libwebp|vcpkg:libwebp
${MINGW_PACKAGE_PREFIX}-libtiff
${MINGW_PACKAGE_PREFIX}-libwebp
${MINGW_PACKAGE_PREFIX}-libwmf
${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}-maxflow
${MINGW_PACKAGE_PREFIX}-mypaint-brushes2
${MINGW_PACKAGE_PREFIX}-openexr
${MINGW_PACKAGE_PREFIX}-openjpeg2
${MINGW_PACKAGE_PREFIX}-pango
${MINGW_PACKAGE_PREFIX}-poppler|vcpkg:poppler[glib]
${MINGW_PACKAGE_PREFIX}-poppler-data|vcpkg:poppler-data
${MINGW_PACKAGE_PREFIX}-python|vcpkg:python3
${MINGW_PACKAGE_PREFIX}-poppler-data
${MINGW_PACKAGE_PREFIX}-python
${MINGW_PACKAGE_PREFIX}-python-gobject
${MINGW_PACKAGE_PREFIX}-qoi|vcpkg:qoi
${MINGW_PACKAGE_PREFIX}-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 this script from the root of gimp source dir' -ForegroundColor Red
Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -ForegroundColor Red
exit 1
}
elseif (Test-Path 3_dist-gimp-inno.ps1 -Type Leaf)

View file

@ -1,6 +1,6 @@
From 1d1f3fe3ace998031d23d33c2192ee24d7e9766c Mon Sep 17 00:00:00 2001
From 9193a5e805d17cf990928ed77cfbebcd1a172d1c Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Fri, 3 Apr 2026 11:46:58 -0300
Date: Fri, 27 Mar 2026 20:36:27 -0300
Subject: [PATCH] Disable some things due to lack of packages
---
@ -21,9 +21,11 @@ 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 | 36 +++----------
19 files changed, 13 insertions(+), 261 deletions(-)
meson.build | 49 ++++-------------
21 files changed, 18 insertions(+), 273 deletions(-)
diff --git a/app/actions/tools-actions.c b/app/actions/tools-actions.c
index 9efa957edb..64e7981cfc 100644
@ -508,11 +510,36 @@ 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 eb1166c728..6e1635cf77 100644
index 8f5d2c4a96..5f763a454a 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -514,7 +514,9 @@ libgimpui_introspectable_files = [
@@ -503,7 +503,9 @@ libgimpui_introspectable_files = [
libgimpwidgets_introspectable,
]
@ -524,7 +551,7 @@ index eb1166c728..6e1635cf77 100644
gobject_introspection_warning = '\n '.join(['',
'GObject Introspection is disabled while cross-compiling because',
diff --git a/meson.build b/meson.build
index 4d378520c5..c2188c3353 100644
index 6b4e8b69a6..82b1424c4f 100644
--- a/meson.build
+++ b/meson.build
@@ -288,7 +288,7 @@ warning_cflags_common = [
@ -536,16 +563,28 @@ index 4d378520c5..c2188c3353 100644
'-Winit-self',
'-Wlogical-op',
'-Wmissing-declarations',
@@ -533,7 +533,7 @@ json_glib = dependency('json-glib-1.0', version: '>='+json_glib_min
@@ -531,17 +531,11 @@ 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')
+mypaint_brushes = dependency('mypaint-brushes-2.0', required: false)
if relocatable_bundle
@@ -698,7 +698,7 @@ endif
-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
# Check for extension support
appstream_minver = '0.16.1'
@ -554,7 +593,16 @@ index 4d378520c5..c2188c3353 100644
libarchive = dependency('libarchive')
@@ -1202,7 +1202,7 @@ pygobject_found = ''
@@ -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 = ''
pygobject_gexiv2_found = false
foreach py : py_candidates
#Check if PyGobject installation have pycairo (#13105)
@ -563,7 +611,7 @@ index 4d378520c5..c2188c3353 100644
if python_tmp.found() and python_tmp.language_version().version_compare(python3_minver)
python = python_tmp
#Check if PyGObject installation have minimum version
@@ -1221,9 +1221,7 @@ foreach py : py_candidates
@@ -1227,9 +1221,7 @@ foreach py : py_candidates
'''except (ImportError):''',
''' sys.exit(1)''']),
check: false).returncode() == 0
@ -574,7 +622,7 @@ index 4d378520c5..c2188c3353 100644
endif
endforeach
@@ -1232,11 +1230,6 @@ if not python.found() or not python.language_version().version_compare(python3_m
@@ -1238,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()))
@ -586,7 +634,15 @@ index 4d378520c5..c2188c3353 100644
## Javascript
gjs = find_program('gjs', required: false)
@@ -1822,7 +1815,6 @@ install_conf.set('LIBHEIF_REQUIRED_VERSION', libheif_minver)
@@ -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)
install_conf.set('LIBJXL_REQUIRED_VERSION', jpegxl_minver)
install_conf.set('LIBLZMA_REQUIRED_VERSION', liblzma_minver)
install_conf.set('LIBTIFF_REQUIRED_VERSION', libtiff_minver)
@ -594,7 +650,7 @@ index 4d378520c5..c2188c3353 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)
@@ -2014,13 +2006,13 @@ if get_option('debug-self-in-build')
@@ -2026,13 +2011,13 @@ if get_option('debug-self-in-build')
endif
gimp_run_env.set('GIMP_PYTHON_WITH_GI', python.full_path())
@ -610,7 +666,7 @@ index 4d378520c5..c2188c3353 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'
@@ -2083,18 +2075,6 @@ if meson.can_run_host_binaries() and have_gobject_introspection
@@ -2095,18 +2080,6 @@ if meson.can_run_host_binaries() and have_gobject_introspection
gimp_run_env.prepend('GIMP_TEMP_UPDATE_RPATH', plugin_exe)
endforeach
endif
@ -629,7 +685,7 @@ index 4d378520c5..c2188c3353 100644
endif
gimp_exe = find_program('tools'/'in-build-gimp.py')
@@ -2290,7 +2270,7 @@ final_message = [
@@ -2302,7 +2275,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 this script from the root of gimp source dir' -ForegroundColor Red
Write-Host '(ERROR): Script called from wrong dir. Please, call the script from gimp source.' -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
#.NET runtime required by msstore-cli (and its PowerShell counterpart)
[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 | Out-String).Trim()
$dotnet_msstore = (Invoke-RestMethod "https://raw.githubusercontent.com/microsoft/msstore-cli/refs/heads/rel/$msstore_tag/MSStore.API/MSStore.API.csproj").Project.PropertyGroup.TargetFramework
$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 | Out-String).Trim()
foreach ($dotnet in $dotnet_msstore)
$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_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*\"))
if (-not (Test-Path "$Env:ProgramFiles\dotnet\shared\Microsoft.NETCore.App\$dotnet_major*\") -and -not (Test-Path "${PARENT_DIR}dotnet-runtime-${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 -Force
$env:PATH = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime);" + $env:PATH
$env:DOTNET_ROOT = "$(Resolve-Path $PWD\${PARENT_DIR}dotnet-runtime)"
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})"
}
}
#powershell (with bundled .NET runtime) required by msstore-cli. See: https://github.com/microsoft/msstore-cli/issues/70
#powershell 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,23 +80,6 @@
</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,33 +10,38 @@ manconf.set('manpage_gimpdir', '$XDG_CONFIG_HOME/' + gimpdir / gimp_app_version)
manconf.set('gimpsysconfdir', prefix / gimpsysconfdir)
manconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
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')
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')
gimptool_man = configure_file(input : 'gimptool.1.in',
output: 'gimptool-' + gimp_app_version + '.1',
configuration: manconf)
man_files = [ gimptool_man ]
man_files = [
configure_file(
input : 'gimptool.1.in',
output: 'gimptool-' + gimp_app_version + '.1',
configuration: manconf,
)
]
if enable_console_bin
gimp_console_man = configure_file(input : 'gimp.1.in',
output: 'gimp-console-' + gimp_app_version + '.1',
configuration: manconf)
man_files += [ gimp_console_man ]
man_files += configure_file(
input : 'gimp.1.in',
output: 'gimp-console-' + gimp_app_version + '.1',
configuration: manconf,
)
endif
gimp_man = configure_file(input : 'gimp.1.in',
output: 'gimp-' + gimp_app_version + '.1',
configuration: manconf)
man_files += [ gimp_man ]
man_files += configure_file(
input : 'gimp.1.in',
output: 'gimp-' + gimp_app_version + '.1',
configuration: manconf,
)
install_man(man_files)
@ -71,21 +76,3 @@ 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 presets path. This is a string value.
# specified tool prests path. This is a string value.
#
# (default-tool-preset "Current Options")

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

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,19 +205,8 @@ 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 ();
}
@ -576,7 +565,6 @@ gimp_main (GType plug_in_type,
_gimp_plug_in_query (PLUG_IN);
gimp_close ();
gimp_env_exit (TRUE);
return EXIT_SUCCESS;
}
@ -589,7 +577,6 @@ gimp_main (GType plug_in_type,
_gimp_plug_in_init (PLUG_IN);
gimp_close ();
gimp_env_exit (TRUE);
return EXIT_SUCCESS;
}
@ -607,8 +594,6 @@ 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;
}
@ -652,20 +637,18 @@ 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_quit ();
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);
}
/**
@ -1038,29 +1021,6 @@ 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
@ -1172,7 +1132,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,7 +1059,6 @@ 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,7 +176,9 @@ GimpPlugIn * gimp_get_plug_in (void);
*/
GimpPDB * gimp_get_pdb (void);
GIMP_DEPRECATED
/* Forcefully causes the gimp library to exit and
* close down its connection to main gimp application.
*/
void gimp_quit (void) G_GNUC_NORETURN;
/* Return various constants given by the GIMP core at plug-in config time.
@ -206,13 +208,6 @@ 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