Commit Graph

223 Commits

Author SHA1 Message Date
Bruno Lopes 2758965731 meson: Optimize DWARF symbols to Dr. Mingw 2024-05-24 13:11:18 +00:00
Bruno Lopes dc21fb7601 meson, build: Disable CodeView (.pdb) generation and bundling for now
1) Right now, MS Partner Center doesn't tell us if the .pdb bunbled as .appxsym
are fine and we only have "Unknow" dumps in the Health page from MS Par. Cen.

My theory, according to my tests with 'SymChk', 'PDBCopy' and 'llvm-pdbutil',
is that this is happening because .pdb from clang or gcc are not "perfect", but
I really have no proof to afirm this, since Partner Center tell us nothing
about them, and we don't even know if the .appxsym were uploaded to begin with.

---

2) The compiler can't generate DWARF (.debug*) symbols when generating .pdb,
which breaks debugging in DrMingw and even lldb according to my tests.
(This is not a fault of the .pdb format but a circumstance: our debuggers
only support DWARF, which is the format already used by MSYS2 packages)

---

So, the .pdb will return probably only in the potential vcpkg transition.
2024-05-24 13:11:18 +00:00
Nils Philippsen 29fda469d1 meson: Detect Lua 5.4 and fall back to plain name
Lua-lgi works with Lua 5.4 meanwhile which is the only implementation on
some architectures.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-05-13 23:49:42 +02:00
Jehan 973c2dd710 meson: fixing the datadir/libdir/sysconfdir.
As noticd by Bruno, the meson port is inconsistent with our 2.10
autotools build here too (and therefore our data path standards).
Fixing.
2024-04-25 01:13:38 +02:00
Jehan 3fbf34dabc meson: fails to compile with -Dpython=disabled flag.
We compile GObject-Introspection anyway (except for cross-builds, where
anyway we don't rely on local Python scripts), so even if not installing
the Python plug-ins, still use them locally.
2024-04-24 19:48:59 +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
Bruno Lopes 4c968d9aa0 meson, build/windows: generate AppList, StoreLogo and *Tile .png's
Most of the work in this commit is by @Jehan.

These icons are used only by the .msix (MS Store) distribution of GIMP.

Some legacy icons are used only by Windows 10 and need to have smaller logo
than full image dimensions, so let's not use colorsvg2png. We just pass the
dimensions to use by configuring variants of the same base script.
2024-04-21 18:15:31 -03:00
Jehan 8cf688ac16 meson, build/windows: generate .pdb (CodeView) debug symbols
This makes possible to debug with DIA SDK, if wanted by the developer.
Also, this is needed to create .appxsym files for MS Store debugging.

Ideally meson should be able to install for us, but apparently it doesn't.
See https://github.com/mesonbuild/meson/issues/12977
2024-04-21 18:13:47 -03:00
Jehan ef314804c4 Issue #11361: building fails on macOS.
This line should have never been pushed (in commit a78c41d2a3), my bad! It was
an early (extremely ugly and bad!) attempt to try and have the bindings see the
libraries another way than using DYLD_LIBRARY_PATH (which was instead resolved
with commit 3e980d5ad4).

This omission went unnoticed until I add `set -e` very likely as this failed
command would stop the script in failure.
2024-04-20 20:17:59 +02:00
Bruno Lopes 9653e50e5f gitlab-ci, build: Unify Debian jobs and add AppImage artifact
AppImage is pretty fast to make, like the win crossbuild; and portable,
being very appropriate to do quick tests on Linux when pushing to git.

The overall organization of Debian jobs was changed to take advantage
of this and make things less complicated (but less clear at first sight).
I reinforce that this was the most efficent way to make the AppImage.
2024-04-18 20:54:49 -03:00
Jehan 3e980d5ad4 libgimp: generate build-only GIR/Typelib variants for macOS.
The previous commit worked for all the compiled executables, but for Python
plug-ins (and likely all other GObject-Introspected bindings), we need to
generate a temporary typelib linking to the in-build-directory libgimp*
libraries.

This is similar to what the script `package/macports_build_app.sh` does for
packaging in gimp-macos-build repository.
2024-04-16 17:43:15 +00:00
Jehan a78c41d2a3 meson: on macOS temporarily update rpath to find libraries of non-installed GIMP.
The DYLD_LIBRARY_PATH trick was working fine on CI, but not on local builds for
Lukas. Apparently there are security measures disabling the environment
variable. Instead let's temporarily add then remove libgimp libraries folders
from rpath.

See: https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/merge_requests/292#note_2075291
2024-04-16 17:43:15 +00:00
Jehan 140a3c82d0 Issue #10713: API versioning got broken with meson.
This is now back in sync with how it used to be up to GIMP 2.10. Basically our
API version should always be <major>.0 in the shared libraries naming, as well
as in pkg-config and docs. Otherwise we would break library compatibility with
every minor version bump.
2024-04-15 23:35:37 +02:00
Jehan 378e80408d meson: share a same environment for all usages of self-built GIMP
In particular GIMP used for unit-testing, or in other cases as a build tool,
from the non-installed binaries, can use a same meson `env` object.
2024-04-08 20:30:51 +02:00
Jehan 42171503d4 data, plug-ins: logo images moved to gimp-data repository.
Now the development and stable logos will be generated from gimp-data.

In other changes, the gi-docgen logo is installed as a symlink using
install_symlink() which exists since meson 0.61.0 so I bumped our meson
dependency (in practice we were already using this function anyway and Debian
bookworm has meson 1.0.1 so it's all good).

Finally I don't install a wilber.png anymore, which was only used by script-fu
testing, and which was the same as gimp-logo.png (except 256x256 instead of
128x128). Unless mistaken, all script-fu tests loading this image still work
with the change. The only one where I needed further change was buffer.scm
(which was checking the dimensions).

See gimp-data@9aa6e35.
2024-03-28 00:19:10 +01:00
Jehan 0b5b4173ab build, data: moving splash image to gimp-data repository.
- Splash images will now be stored from gimp-data.
- The installer BMP image scripts also move in the same time.
- We don't need devel and non-devel variants of the BMP images in InnoSetup
  scripts since the images are generated from the actual splash.
2024-03-28 00:19:10 +01:00
Jehan 9d279a60ce meson: moving away from meson subprojects in favor of git submodules.
Meson subprojects just have too many problems and limitations and I can foresee
the maintenance headache and the future incoming false-positive bug reports if
we start using meson subprojects.

Comparing to the simplicity of git submodule which also has much better
notifications to help people understand when the submodule is not in sync and
how to remedy to it.

See commit gimp-data@c364adb explaining the main reasons in detail.
2024-03-28 00:19:10 +01:00
Jehan 67f5dd0df8 meson: pass the executable name to `gimp-data` to build gimp.ico.
Note that the executables are not built yet at this point, but we just need to
pass the name for configuration. The gimp.ico generation step is run manually
anyway and requires a fully functional and installed GIMP.

See commit gimp-data@40d4822.
2024-03-28 00:19:10 +01:00
Jehan 2bda55fa9a meson: cursors are now hosted and installed from gimp-data too. 2024-03-28 00:19:10 +01:00
Jehan 686897e35d meson: icons are now installed by making gimp-data a meson subproject.
This commit is separate from the previous to make it immediately clear (by
comparing files) that the previous commit is a simple move with no modification
whatsoever of the icons/ directory, i.e. the symmetrical removal of add commit
gimp-data@8b54490.

We now clone gimp-data as a meson subproject. I am currently testing the
subproject feature though I am doubting a bit because of its limitations: the
git clone is not updated automatically, nor are errors clear. Therefore it would
be easy to end up with outdated data for developers not manually and regularly
running:

> meson subprojects update

Worse, it looks like even when updating the suproject, it fails to be properly
reconfigured. See: https://github.com/mesonbuild/meson/issues/12898
2024-03-28 00:19:10 +01:00
Jehan 7b43a7492f libgimp: new unit testing framework for libgimp.
With Python binding, it gets very easy to test new functions. I've been
wondering if we need C counterparts, but really since it's a GObject
Introspection binding, if a function succeeds there, it should also succeed in C
code.

For now, I'm testing a few of GimpPalette API. Not all of it yet. Also I test
both the direct C binding and PDB procedure since in some cases, one or the
other may not properly working. See #10885.
2024-02-28 22:55:58 +01:00
Øyvind Kolås da289b9c50 meson,app: depend on babl-0.1.108 2024-02-24 18:08:31 +01:00
Jehan 4755f0e805 meson.build: post-release version bump to 2.99.19.
On the way to the RC1!
2024-02-18 11:11:24 +01:00
Jehan f94c4cb5db Release development version GIMP 2.99.18. 2024-02-17 18:01:20 +01:00
Jehan e992ca3e51 app, libgimp, pdb, plug-ins: GimpText* using GeglColor.
One of the big improvement in this commit is that text layers are now much
better at space accuracy. They were already space-aware, yet rendered as sRGB u8
only before being converted to the image's space. It means that text layers had
the following limitations:

* Any color out of sRGB gamut were trimmed.
* Precision was always 8-bit (even if the image was high-bit depth).

Now GimpTextLayout keeps track of its source space (for RGB and CMYK only, this
won't be as easy when we will support more backend, since Cairo has only RGB
support for image data) and the image TRC (in case it bypasses the color space's
TRB) and it draws within this gamut and space.
It means first that we are not limited to sRGB colors; we will draw text main
color in the full image gamut, with still 2 remaining limitations:

* Unbounded colors are impossible because Pango format (to color text) uses
  hexadecimal (so even with half/float images, you can't draw out-of-gamut text
  unfortunately).
* Main color precision is still 8-bit, yet a tiny bit better than before as we
  at least follow TRC (so we avoid some of the precision loss when converting,
  even though the bit-depth is still the biggest loss).

The outline color on the other hand is drawn through Cairo API entirely, in
float. This means that the outline color will now be without any precision loss.

Note that this depends on CAIRO_FORMAT_RGBA128F which is only available since
Cairo 1.17.2 which is not in Debian bookworm (our current baseline for GIMP
3.0). It means that the old precision will still happen with older Cairo
version, as determined by #if code at compilation.
2024-02-11 23:28:02 +01:00
Øyvind Kolås 9e6f90d664 meson,app: depend on GEGL-0.4.48 2024-02-11 22:42:16 +01:00
Daniel Novomeský 63aa33f808
meson: require libheif >= 1.15.1 2024-02-05 13:28:13 +01:00
Jehan e7b85e3d67 Issue #10725: do not test for lua-lgi when lua can't be run.
In particular in a cross-compilation environment where you don't have an exe
wrapper or cross-host run ability, you still want to be able to configure GIMP.

It is also possible to install lua scripts anyway with -Dlua=enabled, bypassing
ability to test lua-lgi presence (a warning will be outputted at configuration
time, but no error).
2024-02-01 15:46:55 +00:00
Jehan 2102e58884 Issue #9752: actually check for lua-lgi at configuration.
The -Dlua option has 3 cases:

1. disabled: lua plug-ins aren't installed at all.
2. auto: lua plug-ins are only installed if we find a lua installation
   with access to the 'lgi' module. We now do the actual test at configuration
   (not only lua existence test, but also lua-lgi).
3. enabled: lua plug-ins are always installed but if no lua installation with
   'lgi' module is found, a warning is displayed at end of configuration step.
2024-01-29 18:42:45 +01:00
Bruno Lopes c60604a535 Partially revert "build/flatpak: Drop 'gimp_app_version' hardcoding"
As suggested by Jehan, the manifest will be configured by meson.
Of course, for CI compliance, this pushes the job to a further stage:
'packaging', which is what Flatpak is about, after all.

The distribution job name has also been changed, because when Store job
is merged, this will be the new nomenclature of the distribution jobs,
which was not changed since !1171 by lack of time.
2024-01-21 14:04:35 +00:00
Jehan 4693f1d824 Issue #10183: --iso-8601 is not a supported option by `date` CLI tool on macOS. 2023-10-17 15:23:30 +02:00
Jehan 7f2b301d68 meson: search lua alternatively to luajit.
This will be needed in particular for GIMP on Windows/Aarch64. Also even on
other OSes, it is useful to support lua plug-ins not only with luajit but also
upstream lua.
2023-10-15 11:53:27 +00:00
Jehan ccb8a7be2e meson: fix inserting generation date and time in authors.md. 2023-10-14 17:12:49 +02:00
Jehan ea55b7a11a app, devel-docs, libgimp: updating gimp_text_layer_[gs]et_font() and new…
… function gimp_font_get_pango_font_description().

Also updating file-pdf-save which is the only plug-in using these right now.

Note that I am not fully happy with the new function
gimp_font_get_pango_font_description() because I experienced some weird behavior
in file-pdf-save which is that some fonts were wrong if this is called after
pango_cairo_font_map_set_resolution().
But let's say this is a first step looking for improvements.
2023-10-01 21:02:34 +02:00
Jehan bd9eb1d8ff meson: requires Pango >= 1.50.
New code uses pango_attribute_as_font_desc() which appeared with Pango 1.50.
Since it's currently present in Debian stable, I don't bother too much and bump
this dependency.

Also let's use the same version for pango, pangocairo and pangoft2. They all
come from the same project/repository, so we must likely expect them to be equal
(if they are not, there is likely a problem).
2023-09-12 14:23:40 +00:00
Heiko Becker 8b2574e917 meson: Add explicit options for cfitsio and openmp
...instead of automagically enabling them if the dependency happens
to be installed.
2023-09-03 22:41:04 +02:00
Alx Sa f947109f92 build: Enable IFF format on Windows
Now that libiff and libilbm have been added to the MSYS2 repositories,
the plug-in can be built automatically on Windows.
2023-07-26 17:12:35 -04:00
Alx Sa ab93a1484a meson: Add option to compile Amiga IFF
Code provided by @lillolollo
Since libilbm and libiff are not in all repositories yet, this adds an option so
it is not required when building GIMP.
2023-07-12 22:55:20 +00:00
Jehan 6d2580a421 meson.build: post-release version bump to 2.99.17. 2023-07-05 18:09:54 +02:00
Jehan d3c5536ac8 Release development version GIMP 2.99.16. 2023-07-05 16:00:47 +02:00
Jehan c95b8518fe app, icons: use the Python executable found by pythonmod.find_installation().
We already search for a compatible Python version in the root meson file, no
need to look up Python 3 again in the PATH, each time we run an external Python
script in the build.

This should hopefully fix #9687.
2023-07-04 19:00:55 +02:00
Lukas Oberhuber df4ed9c1ec app: Fix key presses not working on mac
Part fixes #9322. This was making GIMP on MacOS unusable.
2023-07-02 15:57:44 +01:00
Jehan 9ccdd56a36 build: run build/windows/meson.build before app/ plug-ins/ and extensions/.
Fixes:

> ../extensions/goat-exercises/meson.build:12:4: ERROR: Unknown variable "gimp_plugins_rc".
2023-06-27 01:01:50 +02:00
Jehan 2fd25fe6bd build: generate the Windows installer welcome images from the splash screen.
After discussion with Jernej, InnoSetup should now work better with rescaling
a big image properly to the window size, yet the ratio should still matter.
Apparently the welcome image is a hack and this is why it requires specific
ratio images. We don't use the big size yet, but since Jernej told me which
dimensions are expected, I already added the code for it to make it easier
later.

So anyway this code would allow us not to have to commit welcome images each
time, which are basically resized copy in BMP of the splash screen, slowly yet
surely filling up our repository with image duplicates.
After all, we develop a scriptable image editor! We should use it to edit images
and export in expected formats!

I only use this script for the devel installer for now, for testing and see how
it goes.
2023-06-27 00:39:17 +02:00
Øyvind Kolås 7277baea54 meson,app: depend on GEGL-0.4.46 2023-06-26 00:56:58 +02:00
Øyvind Kolås c4734a27b5 meson,app: depend on GEGL 0.4.45 2023-06-13 17:14:03 +02:00
Jehan ebe63c215f INSTALL, meson: remove references to autotools and warning. 2023-05-27 00:33:17 +02:00
Michael Natterer 26dce72d2c Remove autotools 2023-05-27 00:03:52 +02:00
Niels De Graef 01e960e98e plug-ins/scheme-wrapper: Use GIR for enum values
This allows our script-fu plugins to use the GIMP enum values, just like
all our other plug-ins know them.

In other words:

* Names are consistent with those of other plug-ins
* Introspectable enums are automatically added as they are added to the
  introspection file, without even needing a recompile
* No need to keep track of our enum types anymore, as that is just a
  redundant implementation of introspection in practice. This in turn
  will let us simplify some of the pdb code
2023-05-24 23:19:20 +02:00
Michael Natterer 37dfa24def meson: default to create default binary symlinks only in stable versions 2023-05-23 10:34:47 +02:00