Commit graph

2160 commits

Author SHA1 Message Date
Bruno Lopes
605470cc05 tools: Add dumpbin support to defcheck.py
This is needed for MSVC environment.
2026-03-02 22:21:29 -03:00
Bruno Lopes
59f2fa45ca tools: Make defcheck.py CWD unambiguous
This is better for debugging when some error happens.
2026-03-02 16:50:41 -03:00
Bruno Lopes
d6f5205a89 tools: Port improved defcheck.py from gegl 2026-03-01 18:30:54 -03:00
Bruno Lopes
b7d89728c4 app, libgimpthumb, plug-ins, tools: Fix POSIX namespace warnings on MSVC 2026-02-28 10:06:46 -03:00
Bruno Lopes
6df22e2ba0 tools: Try to prevent race conditions on python3 symlink handling 2026-02-15 23:09:34 -03:00
Alfred Wingate
cae3be98df tools/gen-languages: query user locale before falling back to en_US
setlocale(LC_ALL, "") queries the user locale.

setlocale(LC_ALL, NULL) also queries the locale, but not the user
locale. It actually queries the programs locale, which by default is C.

Otherwise the user would need to have en_US.UTF-8 available no matter
what.

Check that derivates UTF8 of C locale aren't used as well.

Bug: https://bugs.gentoo.org/969468
Fixes: 88261f8b4c
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2026-02-02 17:25:49 +00:00
Bruno Lopes
61c078fa43 meson, tools: sys.executable is not the same as python.full_path()
This avoids using the python chosen by Meson's find_program(),
which is not the one from find_installation() and can not have GI.
2026-01-22 18:40:36 -03:00
Bruno Lopes
c8fd1d356a tools: Check LC_BUILD_VERSION before copying .dylibs
We should avoid macOS version mismatch on custom built libraries.
2026-01-05 22:20:03 -03:00
Bruno Lopes
391008e42f tools: Handle installations where Meson python do not have python3 symlink
We do check for python with import('python').find_installation() then
check for GI module support for introspection. However, this python is
not necessarely the one that will be found by .py plugins at build-time.
That is because the found python by Meson can not have a python3 symlink
but the python3 symlink is the one in-build GIMP uses fowlloing the shebang.

So, to we proper build GIMP on such environments, we can create a symlink.
That is needed for MacPorts where multiple pythons exist without a symlink
but this is useful for all environments because python3 is now unambiguous.
2026-01-04 17:56:32 -03:00
Bruno Lopes
c9ce259e9c gimp-data, tools: macOS assets are now built from Meson
Adresses #14236

We used to call ninja at Portfile, which is way suboptimal.
Now, we properly generate them from Meson if -Ddmg is true.
2026-01-03 22:17:18 -03:00
Bruno Lopes
cd4af46675 tools: Check for GIMP_TEMP_UPDATE_RPATH" binaries before patching
Similarly to what we do on tools/lib_bundle.py when setting LC_RPATH.
This is needed to avoid multiple install_name_tool conflicting.
2026-01-03 18:09:13 -03:00
Bruno Lopes
9a598a6fcd tools: Support for .framework on LC_LOAD_DYLIB section of lib_bundle.py
It will not bundle the framework but now correctly point to @rpath.

This will be specially useful since we do use Python.framework on macOS.
2026-01-03 15:10:21 -03:00
Bruno Lopes
c51fd7843f tools: Some libraries can have LC_RPATH set
I confirmed that few dependencies have LC_RPATH set so
we need to change these too, not only executables.
2025-12-30 19:28:42 -03:00
Bruno Lopes
cc44ae4579 tools: Add comment and fix variable on "codesign" section 2025-12-30 15:36:06 -03:00
Bruno Lopes
45c76ffb16 tools: Ad-hoc sign macOS binaries after LC_RPATH wizardry
This is needed for M-series chips.
2025-12-30 10:36:13 -03:00
Bruno Lopes
eb621a13b7 tools: Set LC_RPATH on binaries pointing to .dylib path
And also set the adjacent LC_LOAD_DYLIB and LC_ID_DYLIB.
All the 3 vars are needed for relocatable .app bundles.
2025-12-29 13:09:47 -03:00
Bruno Lopes
1b0492aff9 tools: Contents/Frameworks is the standard for libraries on macOS
See: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19

I confirmed checking some 3P .app bundles and
indeed they do not use Contents/Resources/lib for libs.
2025-12-29 13:09:04 -03:00
Bruno Lopes
381ea0c6d2 build/windows: Move Windows .pdb utility to tools/
This reverts 63f5ea9d regarding the file naming

Since the script is an utility pretty much one-task, it suits better on tools,
similarly to what we do on babl and meson (but on these we put on root).
And, along with 8c0f92b3, it makes build/windows less scary with less files.
2025-12-26 19:15:15 -03:00
Bruno Lopes
4356895b73 tools: Add MSVC's dumpbin support to lib_bundle.py 2025-12-26 15:22:14 -03:00
Bruno Lopes
8c0f92b39a build, tools: Add initial macOS support to lib_bundle.py
It will be useful later in my WIP work to move macOS scripts to GIMP infra.
2025-12-26 15:22:02 -03:00
Jehan
10cf3f05ee tools: remove generate_changelog.sh.
We have not used this script since 2009.
2025-12-15 13:17:28 +01:00
Jehan
923b7e09b5 tools: fix versioning on successive RC releases. 2025-12-14 23:11:35 +01:00
Bruno Lopes
8748b8bb41
app, libgimpbase, plug-ins, tools: Include missing IO headers if on Windows
Otherwise, gimp fails to build on MSVC
2025-11-29 18:16:54 -03:00
Jehan
88261f8b4c Issue #13774: languages list is not localized on AppImage.
Seems like our CI runners are configured with POSIX locale. Both C and
POSIX locales are basically overriding any attempt to localize during
the build (setting LANGUAGE doesn't work) and unfortunately we are now
self-localizing the list of languages during build.

So let's add a bogus en_US.UTF-8 locale before setting LANGUAGE. This
should fix the issue. It would probably also fix the same issue for
various third-party packages if distributions' build machines are set
similarly!
2025-11-23 17:13:38 +00:00
Jehan
1ad2627eca tools: correctly parse RC versions. 2025-11-17 23:28:38 +01:00
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