1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-05 21:02:42 +02:00

2135 Commits

Author SHA1 Message Date
Bruno Lopes
f09007507f Declare gexiv2 dependency on many targets (due to gimpmetadata.h)
Our build files were relying 'sysroot' to find gexiv2.h but this is
not possible with Apple Clang om which sysroot points to macOS SDK.
So, exotic environments like Homebrew were failing. Let's fix this.
2025-10-03 18:31:53 -03:00
Bruno Lopes
ad9dbf2c8b tools: Drop bashism/gnushism in read command 2025-10-01 21:26:25 -03:00
Jehan
8c910c2b6b tools: improve release stats.
- Interactively query the release version from standard input.
- Compute the logical previous version but also the previous release in
  time. For instance the logical previous release of GIMP 3.0.6 will be
  3.0.4 but the time-wise previous release will be 3.1.4.
- Some statistics will use the logical previous release whereas others
  the time-wise one.
2025-10-01 14:39:51 +02:00
Bruno Lopes
c13bf1af19 build: Move loose scripts in meson subdir to tools
The build dir looks "prettier" without the meson subdir.
With prettier I mean: just the OSes subdirs.
2025-09-24 09:07:47 -03:00
Jehan
aa9e437d42 tools: better logic for the splash image text.
Change of series must always have their own splash image (which will
stay the same within the whole series).
Development releases though will have a new splash image most of the
time (but it is not mandatory).

See rule edicted in commit Infrastructure/gimp-web-devel@061f544.
2025-09-22 12:39:23 +02:00
Jehan
ec4daa643e tools: use release news alias URL.
While we don't know the accurate URL of every release before
publication, we now know the alias it will have in the shape:
https://www.gimp.org/release/<version>

Cf. commit Infrastructure/gimp-web@bca40810
2025-09-22 12:30:08 +02:00
Alx Sa
c8cf2219ce libgimpbase, libgimpwidgets, tools, app: Remove warnings
This patch fixes a few (mostly Windows-specific) warnings on build.
* Hides functions like gimp_get_foreign_window () and variables
like transient_set that aren't used in Windows.
* Changes hollow_g_shell_quote () to not return a const gchar *,
since the value it returns is actually not const.
* Cast update_interval to double to remove warning about mixing
enums and doubles in division.
2025-09-07 18:41:13 +00:00
Bruno Lopes
4738472fcd tools: Drop bashisms on milestones info fetching 2025-09-03 21:13:34 -03:00
Jehan
03f7cf58b8 tools: also parse milestone infos automatically. 2025-09-03 16:18:14 +02:00
Bruno Lopes
53a1d07ffd tools: Remove last bashisms in new release-stats.sh
'paste' is a bit opaque but at least more portable.
2025-09-02 16:08:53 -03:00
Bruno Lopes
0191e0a485 tools: Drop bashisms on new release-stats.sh versioning evaluation 2025-09-02 15:53:58 -03:00
Jehan
81c844d2ca tools: tweak script so that it outputs statistics in release news format.
Though most of the stats we were pulling came from this, let's format it
exactly how we have done in many latest release news.
Also add automatic stats pulling too of our many side repositories.
2025-09-02 19:08:48 +02:00
Michael Natterer
9f789e68d5 app, tools, plug-ins: more #pragma once, and formatting cleanup where
I noticed the need.
2025-08-13 01:48:40 +02:00
Michael Natterer
572b160ff9 tools, modules: #pragma once 2025-07-13 12:54:21 +02:00
Jehan
83dca4d9be tools: fix my flatpak install script for Nightly.
The AppId for our nightly flatpak is now different.
2025-06-27 20:55:37 +02:00
Bruno Lopes
fd47161215 gitlab, build, tools: Port bashisms to POSIX-compliant code
Although these scripts are not called by Meson, portability outside the
build system is always welcome (specially on macOS or non-GNU OSes).
2025-06-16 22:06:06 -03:00
Bruno Lopes
1f8f17cd9a gimp-data: Bump to fix #14236 2025-06-11 16:00:00 -03:00
Christoph Reiter
b78cd8d59d meson: fix install scripts not taking DESTDIR into account
Regression from 455dc1faa6

The new install scripts installed the files into MESON_INSTALL_PREFIX
instead of MESON_INSTALL_DESTDIR_PREFIX.
2025-05-18 10:36:56 -03:00
Bruno Lopes
eff825c1a7 Issue #6378: tools: Don't auto-quote filenames on gimptool for Windows
Fixes #6378

This will break Cygwin workflows (aka when the dev use 'sh' instead
of native cmd or PowerShell) but we were already not supporting that
due to 'win32_command' which redirects Unixish commands to cmd.
2025-05-04 11:54:03 -03:00
Bruno Lopes
d88966b272 app, app-tools, data, plug-ins, tools: Do not hardcode python executable
Use 'python' module instead.
2025-04-17 14:32:06 -03:00
Bruno Lopes
42049493cb tools: Port meson-mkenums.sh to Python 2025-04-17 09:39:08 -03:00
Bruno Lopes
455dc1faa6 app, app-tools, tools: Port Windows's enable_default_bin to Python 2025-04-17 09:39:00 -03:00
Bruno Lopes
dea5e2414a tools: Fix 'in-build-gimp.py' indentation to conform with Coding Style 2025-04-16 16:44:22 -03:00
Bruno Lopes
99bf8defe7 tools: Port in-build-gimp.sh to Python
Both .sh and .py versions take 2:15 minutes to generate all the
assets but the more cross platform the better so Python wins.
2025-04-16 13:41:16 -03:00
Jehan
c3bc4e5336 Issue #12904: make debugging self with gdb optional with -Ddebug-self-in-build.
Some people reported cases where gdb doesn't even seem to understand
Python scripts (the error in #12904 implies it is looking for standard
gdb commands, because apparently -x option allows both styles).
Others had issues in sandbox building (#12956).

I don't really want to spend too much time understanding each case,
especially as it's a self-debugging tool, not absolutely necessary for a
successful compilation.

So let's just make this optional, and default to "false".
2025-02-24 18:13:09 +01:00
Jehan
7694b1dc04 Issue #12640: run in-build GIMP binary through a debugger when gdb is available.
It is not in fact a fix for #12640, only an improvement to our build
script, wrapping our calls to GIMP executables and outputting a
backtrace on a crash. This way, when people report issues during one of
the relevant calls, we may be able to diagnose.

It won't be useful for other types of failures (when the process doesn't
crash, but e.g. the script is wrong or other non-fatal bugs in GIMP).
2025-01-06 21:09:37 +01:00
Daniele Forsi
994137a82e Fix spelling errors found with codespell 2025-01-04 15:11:03 +00:00
Jehan
fe6e1d77c8 tools: fix generating welcome dialog data for RCs.
Not sure why, but previous RCs' versions were written all lowercase and
with a tilde separator, so I just used the same syntax, but that won't
fly with how we will write it in the main meson file. So let's do a few
string fixes to make both syntax match.
2024-11-04 03:28:48 +01:00
Jehan
9c226d5e77 app*, docs, tools: -Denable-default-bin=enabled will also install a gimp-major binary.
On Windows, it will basically be a copy of the main binaries. On other
OSes, it will be symlinks.
This will help for Windows installers where we want to use major version
only in registry and we need a binary named appropriately for this
apparently.

As for the "major" version, I will in fact use the next major when minor
is 99 (also called API major version), not that it will matter much very
soon!
2024-11-03 22:55:39 +01:00
Jehan
b93e50ef23 Issue #12126: Build broken since 741dc20b. 2024-10-08 01:10:53 +02:00
Jehan
741dc20bca tools: gen-languages must be compiled natively. 2024-09-30 17:12:34 +02:00
Jehan
98b2216244 tools: fix another deprecation warning, this time in PyGObject.
Fixes:

> PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated.
> Please specify keyword(s) for "label" or use a class specific constructor.
> See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
2024-09-26 20:10:47 +02:00
Jehan
1726a6f89f tools: fix deprecated syntax.
This fixes a similar deprecation warning on various pieces of code:

> DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
>   samples = log.find ("samples") or empty_element
2024-09-26 19:49:47 +02:00
Jehan
8344d7c331 tools: more portability fixes.
Apparently mktemp with busybox (and no GNU coreutils) requires mktemp
template to be XXXXXX.
Thanks to pippin for raising this issue.
2024-09-23 01:18:14 +02:00
Jehan
df8b8015f2 tools: --preserve-root --one-file-system are not portable options.
pippin had trouble with it when using busybox. So let's test for them
(assuming they will show up in a `rm --help`).
2024-09-23 00:01:06 +02:00
Jehan
59eeae66fd app, tools: fix build without iso-codes package. 2024-08-17 21:16:00 +02:00
Jehan
ee2f86105c app: move "System Language" out of GIMP_L10N_LANGS_SIZE.
This is the only "language" from the list whose name is special and
should be localized at runtime, yet before we set any Preferences
language. It needs to be localized as the System Language itself which
will be run-dependant.

For instance, if your system is in French, it will be displayed as
"Langue système" but if you change your system to Korean, at next run,
it would show "시스템 언어". It is a per-run localization, independant
from the language selected in Preferences, and even less dependant from
build-time system language.
2024-08-15 20:57:02 +02:00
Jehan
aba7316e34 tools: bind the "iso_639_3" gettext domain to iso-codes location…
… found at build-time.

It was working on a machine with default paths and system-installed
packages (e.g. a typical Linux distributions) but needs to be manually
set up e.g. on Windows.
2024-08-15 15:50:30 +02:00
Jehan
364f541336 tools: fix self-localization of languages for Windows.
Basically reusing the solution from commit 7ccfad1716.
2024-08-15 15:50:30 +02:00
Jehan
90fb84de26 tools: list supported languages with po/LINGUAS.
We can't rely on installed *.mo files anymore when this procedure is
done at build time.
2024-08-15 15:50:30 +02:00
Jehan
e7f62f69f3 tools: proper error handling for gen-languages.
In particular, we don't want the build to succeed when various obvious
issues occur, which may even end up in a successful-looking build (yet
with no proper language lists), like we had in !1597.
2024-08-15 15:50:30 +02:00
Jehan
8feb827e78 tools: gen-languages should always search from ISO_CODES_LOCATION.
This became a build step, not runtime one, therefore we don't care
anymore about relocation.
2024-08-15 15:50:30 +02:00
Jehan
b9fcb22877 build, tools: always use iso_639_3 gettext domain.
Also no need to bundle the iso_639 gettext domain anymore for runtime.
2024-08-15 15:50:30 +02:00
Jehan
a106acd408 app, tools: localization for GimpLanguageStore languages must happen at runtime.
Unlike the GimpTranslationStore which can use a list of pre-localized
languages (each language in its own name), the GimpLanguageStore must be
displayed in the currently used locale.
2024-08-15 15:50:30 +02:00
Jehan
4d79e9db0b tools: only list languages with part 1 and part 2 codes or with a localization.
Our GimpTranslationStore contains self-localized names of all languages
we support.
As for GimpLanguageStore, it contains all known languages with their
name in the current locale. When moving to ISO 639-3 list, we had all
possible language, included ancient ones, extinct ones, and so on. With
the iso-codes installation on my machine, this meant a struct with 7910
languages! When showing the Text tool options for the first time, GIMP's
UI is frozen for a few seconds because of this, while it constructs the
GimpLanguageEntry making use of the GimpLanguageStore.

By only listing part 1 and part 2 languages (as well as the rare
languages which are not in these list yet which we still support, i.e.
right now only 'ckb' (Central Kurdish), see #11626), the list lowers to
189 languages, which is still good and are the main languages or
language families AFAIU. And now the Text tool options are constructed
instantly.
Note that this is in fact even less than when we were just using
iso_639.xml (I counted 487 languages stored there), but I believe it to
be enough for the usage we have in the Text tool.
2024-08-15 15:50:30 +02:00
Jehan
5f9083f251 app, tools: generate the language list at build-time.
Instead of always parsing the ISO-639 listing at each and every startup,
let's just generate the list of languages, their English name, and the
self-localized names as static struct.
This will just be much faster, and no worrying on the size of the XML
(or json) to parse.
2024-08-15 15:50:30 +02:00
Bruno
fb5474ae4d Issue #4053: Add "*default_bin" support on Windows and enable it
Almost every program have a non-versioned .exe on Windows. MSYS2 does this too.
2024-06-05 11:51:14 -03:00
Jehan
c40dc612a5 tools: update the rm command for macOS.
Hopefully now the CI jobs can run?!
2024-04-24 23:31:05 +02:00
Jehan
4e8f7c5be6 tools: fix in-build-gimp.sh on macOS.
This should hopefully fix:

> realpath: /Users/circleci/macports-gimp3-arm64/var/macports/build/_Users_circleci_project_ports_graphics_gimp3/gimp3/work/build/.GIMP3-build-config-: No such file or directory

Though it's harder to verify because of the "Intel macOS resource brownouts"
going on on CircleCI infra, and only x86_64 runners allowed me to SSH to them.
But I think that's the right fix seeing the error.
2024-04-24 21:57:15 +02:00
Jehan
2f9881c03f build, tools, gimp-data: removing gimp_exe_config_dir from the root meson.build.
Creating a temporary config directory for the in-build GIMP (run as a tool or
for unit-testing) is not done as a build target anymore, but in the
in-build-gimp.sh script as a unique temp directory, then cleaned out on exit.
This has a few advantages:

- It is properly cleaned out once the build ends (instead of leaving a full
  config dir as trash inside the build dir).
- It is not reused from one build to another (with risk of carrying bugs and
  issues over).
- Every use of the in-build GIMP will have its own config directory, and in
  particular when they are called in parallel.

As a side update, make sure that all `gimp_exe` runs depend on
`gimp_exe_depends`.
2024-04-21 20:43:29 -03:00