Commit Graph

115 Commits

Author SHA1 Message Date
Jehan 871796a126 Issue #7956: Add full BigTiff open/export support to GIMP.
Recent libtiff supports loading BigTiff automatically so we didn't have
anything to do there (as long as a recent libtiff was used). For
creating a BigTIFF though, we simply needed to add a "8" flag to
TIFFOpen/TIFFClientOpen when creating a new image (i.e. using "w8"
mode) as explained here in the "Implementation Strategy" section:
http://www.simplesystems.org/libtiff/BigTIFFProposal.html

What this commit does:

- Explicitly bump our libtiff requirement to version 4.0.0 or higher
  (which is where BigTiff support appeared).
  libtiff 4.0.0 was apparently released on 2011-12-22 and is available
  on all current distributions, so it's probably not a problem.
- Switch to detect libtiff with a pkg-config test (added in libtiff
  commit faf5f3eb before 4.0.0 release, so it's fine) instead of
  function checks.
  (Note: meson was already detecting for libtiff-4 with pkg-config,
  which was obviously wrong since it should have mimicked autotools, but
  well… then changes were minimal on meson)
- Add a new "bigtiff" boolean argument to the "file-tiff-save" PDB
  procedure, FALSE by default. I set this as the first argument as I
  figure that choosing the format you want is quite a major choice.
  Unless I misunderstood something, since BigTIFF is really designed to
  be an evolution of TIFF with a "minimum change strategy", i.e. mostly
  using 64-bit instead of 32-bit offsets, everything which is possible
  in TIFF will be in BigTIFF (and oppositely as well, except of course
  having huge files) so there is no need to have 2 separate procedures.
- Adding this new argument to the GUI dialog as a checkbox.
- Tweak the load and export procedures' documentation strings to make
  clear we support both TIFF and BigTIFF.
  Note: interestingly there doesn't seem to be a separate mimetype for
  BigTIFF so nothing to update on this side.
- Tweak the procedure labels too to mention BigTIFF. Since BigTIFF is
  still a different format (though very closely resembling) from TIFF,
  unlike some others which are just extensions embedded in a TIFF file
  (like GeoTIFF we recently added), I figure it deserves to be
  explicitly cited.
2022-03-11 11:31:53 +01:00
Jehan 64bf8046ff configure.ac, meson.build: post-release version bump to 2.99.11. 2022-02-23 00:28:55 +01:00
Jehan 618e11e602 Release development version GIMP 2.99.10. 2022-02-22 22:30:47 +01:00
Jehan 62a76d7856 app: new welcome dialog to appear only at first launch after a new…
… installation or an update.
2022-02-22 12:23:46 +01:00
Øyvind Kolås ef4e1b86a1 configure, meson, app: depend on GEGL 0.4.36 2022-02-21 23:42:06 +01:00
Jehan 407f54f33e icons: more factorization of icon installation/build code.
Though the Color and Symbolic icon themes will have a different build
process and naming scheme for their icons, the base list is meant to be
the same by maintenance principle. So I am moving out the lists to the
icons/ directory's meson file.

Bumping meson requirement to 0.53.0 because I need to ability to use a
variable as dictionary key (not only string literals), which appeared in
this version. Meson 0.53.0 was released 2020-01-07 and seem to be used
in any stable distribution released since 2020. In any case, it seems
widespread enough to bump it now for our dev branch.
2022-02-01 13:07:25 +01:00
Jehan ae6c58652e icons, tools: fix the CI when building icon resources with vector icons.
Ok that was a bit of a mess with the 4 build cases (combinations of
meson, autotools, vector and raster icons). I *think* this is now OK.

Basically we still need to build the colorsvg2png tool even when
installing vector icons, just for the purpose of the 2 icons
dialog-question and gimp-wilber-eek which we compile into GLib resources
from PNG images.

Also it looks like I completely forgot to add the subdir meson.build in
icons/Color/.
2022-01-31 22:33:30 +01:00
Jehan bc999325be icons, tools: new colorsvg2png tool to build PNG out of SVG.
Build-time tool, which basically just rasterize SVG images (it doesn't
do anything special like gtk-encode-symbolic-svg which creates special
PNG for GTK to recolor them).

It looks like I had this prepared since 2018 according to file header,
but I just never finished doing it! :P

Basically now PNG icons of the Color icon themes do not need anymore to
be committed in the repository. They will be generated from the SVG
icons.

Also adding a missing icon from the 16px list (the Playground icon for
Preferences dialog was needed in 16x16 as well, yet missing).
2022-01-31 14:52:42 +01:00
Jehan 8aee873c95 icons: remove use of meson 'fs' module.
I realize that this module is available since meson 0.53.0 though our
current requirement is meson 0.50.0.
Note sure why meson was not popping any warning (normally it does when
we use a feature younger than the minimum requirement; but maybe this
doesn't work for modules).

Anyway this does the same thing without the 'fs' module, and maybe even
better (we know which icons should be converted or used from source, no
need to add any test logics here).
2022-01-26 16:43:18 +01:00
Jehan 8f0d67779c meson: rename -Dvec-icons to -Dvector-icons.
Should we really be that stingy for letters that we don't want to use
full words?! :-D
Let's have clear option names.
2022-01-26 02:55:27 +01:00
Jehan 11183f4fa4 icons: have -Dvec-icons=false option work with meson.
The whole logics of creating specially prepared PNG images for vector
icons (with gtk-encode-symbolic-svg) was absent. This option was
basically completely broken, yet we now know that we need the ability to
install PNG alternatives for the icons (see #6821).

This is a continuation of previous commit which is straightening a bit
our whole icon theme builds. Note though that more needs to be done
because I definitely still see room for more mess and far too much
duplication.
2022-01-26 01:04:27 +01:00
Daniel Novomeský 6acb5fde3e configure, meson: bump libjxl dependency to 0.6.1
JPEG XL plug-in always imported all JXL images
in 32-bit float precision in the past.
Now it also supports direct import in 8-bit
and 16-bit integer precision too.
2022-01-01 17:40:52 +01:00
Jehan d5e22ad313 configure, meson, devel-docs: make gi-docgen into an auto option.
Also called "feature" option in meson, so that by default it depends on
auto-detection of the gi-docgen hence won't break the configuration when
the tool is missing (the feature is simply disabled).

Also move the program check into the root meson file, which is anyway
much better to have a better visibility of features, otherwise we'd end
up just having tests everywhere in any possible random directory of the
repo.

Finally add a line in the summary of the configuration step, displaying
the docs generation being enabled or disabled.
2021-12-29 00:58:10 +01:00
Jehan b4578a8d90 configure, meson: depend on GExiv2 0.12.2 or over.
Part of the fix for #5863, which is to depend on newer version of GExiv2
where I contributed new APIs using GError-s instead of GLib warnings for
metadata tag issues.
Now Debian testing packages GExiv2 0.14.0 (and MSYS2 has 0.12.3) so
let's bump the dependency for our dev branch.
2021-12-28 02:04:15 +01:00
Jehan d4a951dc6b meson: PNG support has not been an optional feature since forever!
Not sure why this was set as optional in the meson build, as it was
already mandatory in the autotools build back then (and for as long as I
remember).
2021-12-22 19:37:25 +01:00
Jehan a982809c5f configure, meson, plug-ins: unmaintain WebkitGTK-depending plug-ins.
This is an official way to declare these plug-ins as now
unmaintained/deprecated.
Relevant plug-ins are:

1) help-browser (Displaying the docs): nowadays every desktop machine
   has a browser. Let's just use whatever is the person's default
   browser.
2) web-page (Web screenshot): it looks to me like every browser has this
   feature by default now (I use it all the time in Firefox to get a
   full-page screenshot, never in GIMP), even on mobile, I am told. It's
   nice to have it in GIMP too, but not like absolutely necessary.

On the other hand:

1. It's a hell to build, with a lot of issues. We have regular issues on
   our Flatpak-s. We don't manage to build it on our CI (only locally
   apparently). Also it takes a crazy amount of time (like 90% of CI
   build-time would be webkit).
2. From what I gather, new versions don't work on Windows anymore. Even
   MSYS2 seems to have dropped the ball and don't try anymore.
   Basically we would have a feature disparity from GIMP 3.0 (most
   platform but Windows). We don't know when it will be resolved (if
   ever) as it's been like this for years.

Now why we are keeping the code around instead of just removing
everything is that the topic tree in the help browser is useful and
comfortable to use. Ideally we should get some equivalent to help
browsing the help efficiently in the web docs as well (so basically
menus, web search and alike?). So I am told to keep the code around at
least for now to see if we can figure something out or improve the
situation.
Except for this point, we can consider the WebkitGTK plug-ins as
deprecated from GIMP 3.0 on.
2021-12-22 18:59:07 +01:00
Øyvind Kolås 124239202c app,build: depend on GEGL-0.4.34 2021-12-19 00:59:33 +01:00
Yoshinori Yamakawa 2d1c447508 libgimpwidgets: Migration from GetICMProfile() to WcsGetDefaultColorProfile() 2021-12-17 21:58:03 +00:00
Jehan 44f6ee36fe meson: missing test for sys/prctl.h.
This is needed for prctl(), to allow a child process to trace the
parent.
2021-12-04 18:50:34 +01:00
Jehan f94abce8b3 configure.ac, meson.build: post-release version bump to 2.99.9. 2021-10-19 18:06:55 +02:00
Jehan 71c2fd63b8 Release development version GIMP 2.99.8. 2021-10-19 14:45:24 +02:00
Jehan 52928e04a5 Issue #7327: Cannot build GIMP3 on MSYS2 using Meson.
This is untested on my side, because the bug only happens on native
builds with meson (our CI has cross-builds with meson and native builds
with autotools and I only do cross-builds locally) but I think/hope it
will work.

Basically we were using .full_path() because these rc files were also
used as input of some configure_file() calls which doesn't like custom
target objects as input (it wants strings or file objects). Yet a bug
in meson didn't like the colon used in native Windows full paths ('C:'
and such) when used in windows.compile_resources(). This has been fixed
by Luca Bacci in: https://github.com/mesonbuild/meson/pull/9368
Yet we just cannot depend on very early meson (or worse dev meson code).

On the other hand, if the input is a custom_tgt object, it uses the
object ID which we give as first parameter of custom_target() so we know
it's appropriately named without colons (such as 'gimp_plugins_rc').
Thus we should not bump into this issue again.

For the few usage in configure_file(), I just add a .full_path() only
when needed at call time.

Last but not least, I replace the bogus `meson --version` call by a
`python3 -c 'exit()'` as advised by Eli Schwartz:
2afa019c70 (note_1284951)

The reason is that it is apparently possible (or will be when some
reimplementation of meson will be done) that the `meson` executable
itself does not exist. On the other hand, `python3` should always be
there, as a mandatory dependency of the build tool.

In order to use an appropriate `python3`, I made the
pythonmod.find_installation() check required in our build (which should
not be a problem since it's a meson requirement as well), even when the
-Dpython option is false (this one depends on other requirements too
anyway, such as version and pygobject). This way I can call this meson
variable of discovered python in my bogus call, instead of calling a
(potentially different) python from PATH environment.
2021-10-12 17:06:18 +02:00
Stanislav Grinkov 48ee6a1a72
build: meson.build minor code refactoring 2021-09-30 01:04:59 +06:00
Daniel Novomesky 7ce0f2d60e Add JPEG XL plug-in 2021-09-27 09:22:24 +02:00
Øyvind Kolås 127bf7abfb configure,meson,app: depend on GEGL-0.4.32 2021-09-05 20:34:59 +02:00
Jehan d707e4cb1a autotools, meson: bump GLib dependency to 2.68.0.
GLib 2.68.0 was released on 2021-03-18 and has finally been added to
Debian testing (now that the release freeze is over!). So dependency
bumps are slowly going to happen again on the development branch.
Actually Debian testing has even 2.68.4, but it's a bit too recent and
2.68.0 is enough to get rid of some of the deprecation issues.
2021-08-26 17:02:15 +02:00
Jehan f0be2256d0 meson: -Dcheck-update option as a yes|no|platform-default combo.
Similar to the previous commit for the meson build system, the
'check-update' option is not a boolean anymore, but has now 3 values.
2021-08-26 01:25:52 +02:00
Jehan 54263f254d libgimbase, meson: reorganize execinfo dependency testing.
As discussed in !455: remove duplicate testing, testing header and
testing the library are a same test in one (for instance we don't want
to get into weird cases where the lib is found but not the header; this
updated test takes such inconsistencies into account). Also it's better
to have all dependency tests together in the root meson file.

Finally adding some comments to make this all more understandable for
anyone looking at this in the future.
2021-08-04 21:18:42 +02:00
Jehan 2d6bf6dec5 meson.build: fix more xmllint validation.
The authors.xml validation was also not run. This is nearly the last of
getting rid of run_target(). There is still the desktop file validation
but it doesn't have any output argument. We'll see how we update this
last one.

The only other usages of run_target() are proper usage (creating
'install-*' targets).
2021-06-18 16:09:25 +02:00
Jehan df7e319bc6 meson: fix comment about building with specific CPU instructions.
Per discussion on !262 and in particular Ell comments, the contributed
patch was right but the comment was not. It is not just about
g-ir-scanner and failing build. The build can still be successful yet
the built GIMP would crash when run on a CPU not supporting all the
extensions.
2021-06-16 00:26:54 +02:00
Niels De Graef def862bae4 meson: Always enable CPU extensions
Don't enable conditionally based on the buildtype.

Further, don't use `add_project_arguments()` to enable the instructions:
this will lead to crashes within g-ir-scanner, which can't properly
parse these instructions.

https://gitlab.gnome.org/GNOME/gimp/-/issues/5053
2021-06-15 21:15:32 +00:00
Jehan ee2a3104e9 meson: fix the build.
Commit a8f020d889 broke the build. I removed a subdir() by mistake.
2021-05-19 23:03:46 +02:00
Jehan a8f020d889 meson: -Dwindows-installer also works on Linux build machine.
To this day, the windows-installer option only creates the language
files for the installer. There is just no reason to forbid building them
(hence testing the option works) on non-Windows platforms. In autotools,
it already works fine on all platforms.
2021-05-19 22:00:45 +02:00
Jehan 1e53985e4b configure.ac, meson.build: post-release version bump to 2.99.7. 2021-04-26 15:18:46 +02:00
Jehan bf1b405a74 Release development version GIMP 2.99.6. 2021-04-26 12:05:16 +02:00
Jehan cd3333c6d3 meson, configure, plug-ins: image/x-sun-raster is a supported MimeTypes.
Also ".sun" is a possible (and common) file name extension for Sun
Raster images, according to various sources and samples I found (these
samples with .sun extension also opened fine in GIMP, so it's not just a
subvariant which we may not handle or something of the sort). This one
is not so important though as we also register magic bytes for detection
(which is the proper way), but it can still be useful, mostly for
exporting (as we will direct to the SunRaster plug-in if someone tried
to export a file with .sun extension, since no other file format uses
this extension AFAICS).

There is no functional change, I just had a look at this plug-in while
handling !428 and realized this format was not present in the MimeType
list (which is used to generate the desktop file, in order to have
proper mime types, not detection based on extension only, unlike
Windows in !428).
2021-04-04 16:01:58 +02:00
Øyvind Kolås 95900ae6f1 configure,meson,app: depend on GEGL-0.4.30 2021-03-27 20:26:52 +01:00
Jehan 1de810f6de configure, meson: missing OpenRaster MIME type in desktop file.
Adding support for .ora files when Python plug-ins are installed.
2021-02-20 18:48:16 +01:00
Jehan eae3d47e32 devel-docs, meson: g-ir-doc option to generate introspected API docs.
Similar to the --enable-g-ir-doc option I just added on autotools. Also
separate this option from gtk-doc as it is unrelated (not everything
under devel-docs is related to gtk-doc!).
2021-01-29 16:51:47 +01:00
Jehan 82209920a9 devel-docs: Introspected Python libgimp and libgimpui docs generation.
Based on the proposed process proposed by Akkana Peck. Thanks Akk!
For now, it's only in the meson build, which is fairly terrible to use
as soon as we do custom build rules. Here are the list of issues:

- meson does not allow building in subdir (issue 2320 on meson tracker).
  Sure I could make several subdirs with meson in them. But here the
  future goal would be to be able to generate docs for other
  introspected languages, and maybe also other output formats (epub or
  whatnot). For this, since these are basically the same commands which
  are used, the best practice would be to have loops generating one
  target per language/format combination, reusing code rather than ugly
  copy-pasting in subdirectories' meson files).
- custom_target() requires the output parameter to be the complete list
  of generated files. But we have more than a thousand of them. It's not
  practical. Maybe we could try to find a way to generate the list from
  the contents of the .def files which are already exhaustive and exact.
- Install also requires the output list to be complete.
- I temporarily have these docs not generated by default (because the
  gtk-doc option is already crazy slow as it is, making meson near
  unusable for development if it's enabled). If you want to generate the
  docs, the commands are as following (yeah I don't understand what the
  target names are for since meson does not actually create targets with
  these names, so we have to use fake output names instead):

> ninja devel-docs/g-ir-docs/Gimp-python-html
> ninja devel-docs/g-ir-docs/GimpUi-python-html
2021-01-21 16:50:47 +01:00
Jehan 72effc5a57 configure.ac, meson.build: post-release version bump to 2.99.5. 2020-12-22 23:58:16 +01:00
Jehan db996f218d Release development version GIMP 2.99.4. 2020-12-22 23:39:07 +01:00
Øyvind Kolås 2d5aa81456 depend on GEGL-0.4.28 2020-12-20 13:37:08 +01:00
Jehan de91d84906 meson: libjpeg and libtiff are not optional dependencies! 2020-11-17 04:08:15 +01:00
Jehan b19e7796b2 app: s/pango_fc_font_has_char/pango_font_has_char/ (undeprecation). 2020-11-15 17:25:49 +01:00
Michael Natterer c6f6c42e7a configure.ac, meson.build: post-release version bump to 2.99.3 2020-10-25 22:26:18 +01:00
Michael Natterer 71d24f1103 configure.ac, meson.build: bump versions for the 2.99.2 release 2020-10-25 21:25:47 +01:00
Jehan e736b5fa0c meson: do not show "profile support: yes" when HEIC support is OFF.
Note that profile support also affect AVIF but since AVIF support came
anyway after libheif 1.4.0 (which is when color profile support
appeared), there is no way to differentiate there.
Thanks to Darix for noting the miss.
See: https://gitlab.gnome.org/GNOME/gimp/-/issues/5787#note_938976
2020-10-22 11:54:51 +02:00
Jehan cb2268ab21 meson: separate line for HEIC and AVIF support.
libheif pc files provides variables which are actually older than our
minimum libheif requirement (so it's usable generically) to determinate
if libheif was built for HEIC/AVIF support. This is quite useful as we
had our share of annoyance with missing support of some encoder/decoder
even when libheif requirement was alright.

Also adding image/avif (if relevant decoder is present) to list of
supported mimetypes.
2020-10-19 18:56:13 +02:00
Jehan a3498f427a meson: add a `install-extensions` target to meson/ninja. 2020-10-18 01:13:42 +02:00