Commit Graph

594 Commits

Author SHA1 Message Date
Alx Sa 74b32f7c86 build: Add support for OpenMP dependency
Enables general support for OpenMP.
Currently, only the DDS plug-in utilizes it.
2023-01-09 16:41:06 +00:00
Stanislav Grinkov fa9f4e6825 app, build: depend on GLib 2.70
Commit 52d17439 introduced use of g_thread_pool_new_full which is
available only since GLib 2.70
2023-01-09 14:20:21 +00:00
Jehan 09ece8f6f9 Issue #8948: Autotools build does not support the new babl-0.1 naming. 2022-12-09 16:34:11 +01:00
Jehan 8c5e3887f9 configure.ac, meson.build: post-release version bump to 2.99.15. 2022-11-14 01:20:27 +01:00
Jehan a0811ff614 Release development version GIMP 2.99.14. 2022-11-13 23:04:38 +00:00
Øyvind Kolås 06b481a3ec meson, configure, app: depend on babl 0.1.98 2022-11-13 17:31:32 +01:00
Øyvind Kolås b85032d8b6 meson, configure, app: depend on GEGL 0.4.40 2022-11-13 17:16:49 +01:00
Alx Sa 00232e1787 plug-ins: Add support for loading .icns files
This ports ICNS loading code from Brion Vibber's 2004 plug-in.
It extends support for ICNS files that contain PNG or JP2 format icons.
2022-10-16 02:20:51 +00:00
Jehan bfc9e4bb72 configure: add an info message to advise building with meson and report bugs. 2022-10-11 16:39:12 +02:00
Daniel Novomeský eac694905f plug-ins: metadata import/export for JPEG XL format
Changes require libjxl 0.7.0
2022-10-05 14:15:26 +00:00
Jehan d2cf2813dd themes: new "Middle Gray" theme.
So what we read on the topic is to use (as base color) the gray which is
perceptually half-way between black and white. Unfortunately it can mean
different colors. For instance if using the sRGB TRC, the #808080 color is
sometimes cited.

Instead I went with the color LCH (50, 0, 0), i.e. with half perceptual
lightness in "CIE LCH(ab) float" babl space, i.e. #777777 in sRGB. It
corresponds to the 18.42% gray which is often refered to, so it seemed a fine
choice.

This replaces proposal in !683 because the contributor is not responding
anymore, and also it uses the common theme base CSS files used by all other
official themes.
2022-09-26 18:37:16 +02:00
Jehan fbb5b40345 app, autotools, meson: new GIMP_RELEASE macro.
We were using GIMP_UNSTABLE extensively to differentiate development
from stable code. But there is actually another level of development
code. Basically GIMP_UNSTABLE tells you are on the development branch,
e.g. for current branches, that you are on 2.99.* versions (vs. 2.10).
This depends on the minor version oddness.

GIMP_RELEASE will tell you if it's a release or a in-between-releases
code. This works with the micro version which must be even on release.
Any odd number means you are basically using random git code.

There can be any combination of GIMP_RELEASE and GIMP_UNSTABLE. For
instance 2.99.12 is a release of the unstable branch, whereas 2.10.33 is
development code of the stable branch.

I use this first in the update code as we were using GIMP_UNSTABLE for
both concepts but it made it harder to test. Now:

* GIMP_DEV_VERSIONS_JSON environment variable is only available on
  development code, not on release (whether stable or unstable).
* The weekly check limitation is also only for releases (dev code just
  check at every startup to quickly detect issues and regressions).
* Whether to look on testing website or public website json file depends
  on the code being a release or not.
* Finally only whether to check "DEVELOPMENT" or "STABLE" sections in
  the json file depends on whether we are on stable or unstable
  branches.
2022-09-05 22:16:56 +02:00
Jehan ba83b30c21 configure.ac, meson.build: post-release version bump to 2.99.13. 2022-08-22 01:44:45 +02:00
Jehan b1e13b5a15 Release development version GIMP 2.99.12. 2022-08-21 21:21:38 +02:00
Jehan 64113d67bc themes: new Compact theme.
Something which is regularly asked is to use smaller icons. We used to
have a "Small" theme in 2.8, which got away in 2.10 with icon sizing (cf
issue #6121).

This is a revival of such a theme (except I call it "Compact" because it
feels more appropriate than "Small"). The theme is basically the same as
"Default" (through an include), just tweaking some size related CSS
rules.
2022-08-21 00:05:10 +02:00
Akkana Peck 947bd1666a themes: add Light theme
It still has some issues, but it's already pretty usable.
2022-08-19 17:40:49 +00:00
Jehan dfd427d9db Remove old outdated data.
* gimp-zip.in was apparently a very old script to package GIMP for
  Windows into zip files. It has not been updated since 2007 and these
  days, we package GIMP as an installer for Windows. I guess the need of
  having just a compressed folder to move might be wanted for some, but
  anyway this script is so old, it's probably completely broken now. It
  would be much simpler to redo such a process from scratch (we have
  very close jobs in the CI which could be better bases to work from).
* config.h.win32 seems to be an old manually-maintained config.h and it
  has a big "WARNING! OUTDATED!" text at the top (also untouched since
  2007). I guess it might have been used some time long ago. But these
  days, we don't need a specific Windows-only config.h. The generated
  one works fine.
2022-08-02 16:33:09 +02:00
Øyvind Kolås 6cc1e035f1 app, configure, meson: depend on GEGL-0.4.38 2022-07-13 23:31:24 +02:00
Jehan 25e35e17fe app: detect system language with a more robust logic.
langinfo.h is not on all systems apparently and/or the locale item we
test for may not be available everywhere. Actually even on Linux, after
testing more deeply, I could create cases where nl_langinfo() would not
return a result (if the locale is broken through environment variable
for instance). setlocale() seems to always return usable value so far,
so I fallback on it. As a last resort, I look at environment variables
(even though these may contain invalid contents.

As for Windows and macOS, I try to use more platform-specific methods.
In macOS in particular, as I understood from reports, GIMP follows
correctly the language preference order, which means we should not look
at a single (top) lang, but at the whole list of prefered languages as a
single settings to determine whether the language was changed or not.

Should fix on Windows:

> fatal error: langinfo.h: No such file or directory

and on macOS:

> error: use of undeclared identifier '_NL_IDENTIFICATION_LANGUAGE'
2022-07-07 18:58:50 +02:00
Anders Jonsson e601a6c7de Change GTK+ to GTK
GTK got rid of the + in 2019:
https://lwn.net/Articles/779305/
2022-07-07 14:02:36 +00:00
lloyd konneker d5a83429b4 ScriptFu: Add script-fu-interpreter akin to other interpreters
Why:
1) users can install .scm scripts to plug-ins dir
2) Crashing scripts do not crash extension-script-fu

Scripts (.scm files) have a shebang and are executable
and in a same-named subdir of plugin dir.

Interpreter/scripts create PDB procs of type PLUGIN unlike extension-script-fu
which creates PDB procs of type TEMPORARY, owned by extension-script-fu.

Unlike other interpreters, the interpreter is-a plugin outright,
not by virtue of the script subclassing GimpPlugin and using GI.

More details in /plug-ins/script-fu/interpreter/README
2022-06-30 13:39:45 +00:00
Niels De Graef f663d26ab5 Migrate from intltool to gettext
intltool has long been dead upstream. Let's not poke the dead corpse,
please.

This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.

Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.

The following major changes happened:

* meson: Changed `custom_target()` to `i18n.merge_file()` for all
  supported file types
* Added `.its` and `.loc`  files for the GIMP-specific XML formats, so
  that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
  do this in gettext, so instead we start from an XML file (again with
  its own ITS rules etc), translate that with gettext, and then use
  `xsltproc` with a bit of magic to output the .isl file for each
  language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
  which gettext natively understands.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
2022-06-25 10:25:49 +02:00
lloyd konneker 07ceb5a086 ScriptFu: extract PDB proc script-fu-server from plugin script-fu
Create new plugin file script-fu-server-plugin.c
with code extracted from script-fu.c, which is an omnibus plugin
implementing PDB proc extension-script-fu and other PDB procs.

Why:

1. extension-script-fu is smaller and doesn't doesn't link to socket libraries.
   (GIMP always starts extension-script-fu and it stays running.)

2. packagers/admins can omit script-fu-server executable from an installation,
   if they think letting users serve net ports is not secure.

3. crashing script-fu-server does not crash extension-script-fu,
   which requires restart of GIMP

The changes are mostly a simple refactor, extracting code.
No functional change apparent to users.
Low risk of introduced bugs.
Extremely few users use script-fu-server anyway.
Added some logging.
While at it, use G_DECLARE_FINAL_TYPE
2022-06-19 19:18:39 +00:00
lloyd konneker 5cc3becf16 ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu
Changes are mostly to the dir structures and build system for ScriptFu.
Some changes to the outer plugin source to call the library.

Why: so that other executables (future gimp-scheme-interpreter,
or a future separated script-fu-server) can exist in separate directories,
and share the library in memory (when built shared.)

Whether the library is built shared and installed on its own
(versus static and not installed)
is a compile time option (both automake LibTool and meson abstract it away)
The default is shared and installed, say as libgimp-scriptfu-3.0.so.

Installed alongside other shared libraries (e.g. wherever libgimp is installed)
to simplify packaging.

A preliminary refactoring which helps enable MR gimp!647
2022-06-11 08:58:30 -04:00
Jehan 920041c3a0 desktop: gimp-data-extras AppStream was moved to the appropriate repo.
See the commit 28467cb on the gimp-data-extras repo where I moved this
data in. Not sure why this metadata file was ever pushed to the main
repo as it is obviously for the data-extras package (or else I am
missing some information!).

The old 2017 report where it was originally added:
https://bugzilla.gnome.org/show_bug.cgi?id=763398
2022-05-04 23:00:00 +02:00
Jehan 1691d9b8bc desktop: fix the data-extras AppStream file.
appstreamcli was returning the error:

> E: gimp-data-extras:3: cid-is-not-rdns gimp-data-extras

Apparently non-desktop component must absolutely follow the schema with
a unique identifier with 3 parts or more.

As advised in the spec, let's use the main desktop component ID, adding
a specific subpart.

Also use underscore rather than hyphen for maximum compatibility.
See: https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic

Finally for addons, share/metainfo/ is the recommended install path.
See: https://freedesktop.org/software/appstream/docs/sect-Metadata-Addon.html
2022-05-03 22:33:27 +02:00
Jehan 73f1f944c5 desktop: use appstreamcli for testing instead of appstream-util.
As told to us, this is the reference AppStream file testing tool, and it
understands more of the spec.

Also since commit 73e2e701da, appstream-util chokes on newer url types
from the spec. These tags are now supported both in appstream-util and
appstreamcli source code, except that appstreamcli had release 0.15.3,
available in Debian testing, whereas there were apparently no recent
appstream-glib/util release (and none since 2020). So for these various
reasons, let's go with the appstreamcli tool.

The only downside is that appstream package (where appstreamcli lives)
is not available on MSYS2, but since it's only an optional test tool for
XML files which should be common on all platforms, it's probably
acceptable.
2022-05-03 21:48:28 +02:00
Jehan b83450f9e2 configure, meson: the build tool depends on very old glib.
For the build tool, we really don't need a recent GLib. Checking the few
function docs, GLib 2.2 is fine, which (looking at git logs) means any
version after 2002. At this point, it's nearly unneeded to add a minimum
required version, but let's be thorough.

Anyway really no need to block a build if we have an old build GLib,
which is completely enough, as long we have the recent host GLib.
2022-04-01 18:11:55 +02:00
Jehan 1866b4c5f8 configure, tools: colorsvg2png must be built as native build executable. 2022-04-01 18:11:55 +02:00
Jehan e866cb7c9c configure, libgimp: disable GIR build when cross-compiling and…
… add --enable-force-gir-cross-compilation to force it anyway.

Similar to what we already have in the meson build.
2022-04-01 17:33:38 +02:00
Jehan 8a6613bf78 configure: prioritize pkg-config check for libmng.
Make the code similar to the change we made in meson: first pkg-config,
then a basic library check with actual function test.
2022-04-01 17:33:38 +02:00
Jehan ae36d20c41 configure: fix option --enable-windows-installer.
The name of the base source file changed as its format is now ini before
further transformation.
2022-03-29 00:18:31 +02:00
Jehan 1cc7510739 configure, meson: bumping GExiv2 requirement to version 0.14.0.
GExiv2 0.14.0 was released last September. It has been on Debian Testing
since October. The MSYS2 repository for Windows also provides this
version now, and I have bumped the version used in gimp-macos-build. So
let's upgrade the requirement (for the dev branch only) so that we can
finally get rid of all the remaining annoying warnings relative to this
library.
2022-03-18 15:00:59 +01:00
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
Øyvind Kolås ef4e1b86a1 configure, meson, app: depend on GEGL 0.4.36 2022-02-21 23:42:06 +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
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 15b0828eb2 configure: typo fix.
Argh sorry!
2021-12-28 03:35:06 +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
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +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
Lukas Oberhuber e5157f9894 configure.ac: Correct detection of `xgettext`
On macOS at least, `xgettext` is not being correctly identified because
`AM_GLIB_GNU_GETTEXT` is blowing away `XGETTEXT` variable which then
messes up the version checking.

This moves that macro to after the version check.
2021-12-18 00:15:49 +00: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
Daniel Novomesky 7ce0f2d60e Add JPEG XL plug-in 2021-09-27 09:22:24 +02:00