Commit Graph

510 Commits

Author SHA1 Message Date
Jehan 49351777b6 Issue #3884: missing libgtk-3-dev leads to configure syntax error. 2020-04-27 12:21:19 +02:00
Michael Schumacher 0108d7e214 Change order of CFLAGS for SSE tests
This makes the configure tests for SSE support fail if CFLAGS specify -mno-sse2 or/and -mno-sse4.1.
Fixes #4363.
2020-03-17 18:49:46 +00:00
Ell 51e4549d5c configure.ac: fix last commit
Removed a little bit too much.
2020-03-08 13:10:34 +02:00
Ell 52ae7d180a configure.ac, meson: require glib >= 2.56.2
GLib 2.56.0 and 2.56.1 have a Windows-specific bug we were testing
for, so let's just bump to 2.56.2.
2020-03-08 12:28:33 +02:00
Ell 401745e62a Makefile.am, meson.build: require GEGL >= 0.4.23 2020-02-20 13:02:54 +02:00
Øyvind Kolås ab5ed1575c meson,app,autotools: depend on GEGL-0.4.22 2020-02-18 22:02:30 +01:00
Jehan f98e506712 configure, data: create/install the gimp-release file. 2020-02-14 00:56:22 +01:00
Jehan 7b5fff7861 app: now also process the build revision when checking for updates.
The idea is to be able to advertize a new revision of the same version
of GIMP. For instance, this would apply when we release a
`gimp-2-10-14-setup-3.exe` Windows installer (then we are at revision
3, provided we started at revision 0).

The revision number is obviously only relevant to a given platform and
version. Also the concept of build ID allows to differentiate various
builds for a same platform, in particular to not look at revisions of
third-party builds. The build ID can be any string. Maybe we could just
use reverse DNS build id (such as "org.gimp.GIMP_official") to identify
the official GIMP build. So in the end, we only compare revisions for an
identical (version, platform, build-id) tuple.
2020-02-06 21:47:00 +01:00
Jehan 315665592c app, configure: new --disable-check-update option at configuration.
Allows to disable the automatic update check at startup. I believe some
packagers will want such options, in particular on Linux distribution
(where they control their own release schedule and won't want GIMP to
pop new version warning up because they have been slow to update their
package).
Note that it is still possible to query version checks manually in the
about dialog, but the automatic check/popup is gone with this option.
2020-02-06 21:21:17 +01:00
Øyvind Kolås ab7c119c07 meson,app,autotools: depend on babl 0.1.74 and GEGL 0.4.20 2020-01-17 17:01:22 +01:00
Michael Natterer 4dfcffe4f7 Remove all checks for finite() and isfinite()
and simply use isfinite() everywhere, it's part of C99.
2020-01-05 16:36:18 +01:00
Jehan 506a0476f4 app: check last GIMP release from gimp.org/gimp_versions.json.
GIMP will now process the remote gimp_versions json file to look if one
is using the last version of GIMP. This initial code doesn't act up yet
on this information. This will come in further commits.

Here are the characteristics:
- Since this requires internet access, a new checkbox is available in
  the Preferences dialog, allowing to disable version checks. Note that
  it is enabled by default as it is an important security feature, but
  it has to be deactivatable.
- The remote access is done as an async operation because we don't want
  it to block the startup in any way (for whatever reason). Also it
  doesn't output errors if it fails to not be a bother (you don't
  technically need internet access for an image program).
- We don't check at every startup. At each successful check, we save a
  timestamp to prevent too frequent useless checks (I set it the timer
  to a week or more for now).
2019-12-13 17:51:44 +01:00
Jehan 73c09ebb32 app, configure: add configure option for a build id and revision.
The point will be for a packager to create a unique build ID to identify
the build or provenance. I also add a revision number so that we can
identify 2 builds from the same version/commit, same maker and platform.

It will also be used later to check for new versions (see "phone home"
feature #2584).

Separating autotools and meson commits for easy backport.
2019-12-11 21:59:11 +01:00
Jehan 6124be59b7 configure: fix typo which was breaking the build. 2019-11-13 13:25:23 +01:00
Jehan f051e6d238 Issue #4185: Plug-in “file-heif.exe” crashes exporting HEIF/HEIC.
My previous test (commit 41285813a5) was a bit misinformed. So it turns
out bug #4185 is for all platforms and the broken libheif versions are
1.5.0 and 1.5.1 only.

So my new test (platform independent) is: prefer libheif versions with
profile support, except 1.5.x; then prefer lower versions without
profile support; and only as last resort accept 1.5.x versions (but
output a warning).
2019-11-13 12:33:14 +01:00
Jehan 5da252ca18 Issue #2543: gimp doesn't open on debian stretch (libmypaint crash).
Known bug in libmypaint dependency. It has been fixed in libmypaint
1.4.0, which we cannot hard require unfortunately (Debian testing still
at 1.3.0).

Still let's make add a warning so that packagers are aware of the issue
and update when possible.
2019-11-12 17:13:05 +01:00
Jehan 41285813a5 configure: improve libheif detection and output.
Replace the "Heif >= 1.4.0" line in the summary output by a comment in
the "Heif" line explaining this is about profile support.

Also add a >= 1.6.0 test and output a warning for Windows and macOS (cf.
bug #4185).
2019-11-12 14:48:26 +01:00
Alex Samorukov 2cb0493b2f Replace finite() with isfinite() by default
This is part of the C standard also also causing warning on macOS.

(cherry picked from commit 04997fc0ae)
2019-11-07 10:13:59 +01:00
Ell d97dd6413a configure.ac: fix escaping of backslashes in compiler version string
There is one more level of unescaping...
2019-10-29 21:27:21 +02:00
Øyvind Kolås f0077265b4 configure, meson, app: depend on gegl-0.4.18 2019-10-27 01:37:24 +02:00
Ell 6b87e2f90c configure.ac: add AC_MSG_RESULT() for color-profile directory check 2019-10-26 22:22:25 +03:00
Jehan 2791328e41 configure: fix LUA test.
Bug discovered by Simon. See #3921.
The logics of the whole test for binding interpreters may still change
(or even disappear), but for now, at least make it work as expected.
2019-09-12 18:02:06 +02:00
Félix Piédallu 0792cb65f4 [devel-docs] move version file to deduplicate code 2019-09-09 18:15:13 +00:00
Øyvind Kolås fe3e945154 configure,app: depend on babl-0.1.72 2019-08-22 23:15:43 +02:00
Tobias Ellinghaus 583d965773
Fix typo in configure warning re: luajit 2019-08-20 14:02:43 +02:00
Jehan 0abdbebaad plug-ins: fix and install the Lua goat-exercise.
So procedure:new_return_values() just seems broken with LGI. It doesn't
even look like it reaches the C code.
Anyway we can also just reconstruct the GimpValueArray, which works
fine. We now have official support for Lua plug-ins!
2019-08-16 19:46:32 +02:00
Jehan f9f144b4bc configure: add a check for gjs (JavaScript interpreter with GI binding).
As discussed on IRC, I am not sure if really this is needed, since
theoretically we now have support for a whole bunch of languages without
doing anything (languages supported by GObject Introspection) and we are
not going to check for all of them.
Yet since now we install one JS plug-in, let's still do a quick check.
We'll see later if we want to change how we handle supported script
languages.
2019-08-09 18:40:14 +02:00
Jehan b1662443af m4macros, configure: add and use AM_PYTHON_CHECK_PYGOBJECT() macro.
Rather than looking for pygobject-3.0 with pkg-config, run an actual
test in python, loading the 'gi' module.
I also added a version parameter making it possible to even check for a
required version of PyGObject, though it is currently unused (as I have
no idea if we have a minimum requirement for our plug-ins to work well).

This is an improvement of commit 8e938e0960 as I realized that we don't
need any development files, therefore I don't think that searching with
pkg-config was the right idea in our case.
2019-08-09 18:18:21 +02:00
Jehan 8e938e0960 configure: also look for pygobject-3.0 runtime dependency.
If we decide to look for Python dependencies, we should also look for
pygobject as it provides the GI binding to Python.
I'm still not sure if we should look for these runtime dependencies at
configure time. But for the time being, if we continue doing so, let's
do it right.
2019-08-09 16:43:34 +02:00
Jehan fc33489223 plug-ins: move goat-exercise to a goat-exercises/ directory.
We will fill this up with more examples of plug-ins in other languages.
Also we will improve a bit the examples to redirect people to source
code so that they understand what these plug-ins are.
2019-08-07 00:00:20 +02:00
Jehan bfda31a67e configure: fix the Python checks.
1/ First I realize we were still using AM_PATH_PYTHON() and not
   AM_PATH_PYTHON3().
2/ We don't need to check anymore for pygtk, pycairo, nor do we need
   Python headers. Everything is now taken care of by GObject
   Introspection and we have nothing else to build GIMP-side.
3/ Change --enable-python into --with-python. We don't actually build
   anything now. There is no Python support to enable or disable
   anymore. We simply install Python plug-ins or not. The 3 values are
   "yes" (default, configure breaks if a Python 3 interpreter is not
   found), "no" (Python plug-ins are not installed, not recommended) and
   "force" (install Python plug-ins anyway even if an interpreter is not
   found; this can be useful especially for cross-compilation since
   Python is not useful at build-time anymore).

   Note that --with-python=force, if an interpreter is not found, the
   file `pygimp.interp` won't be installed. This is not a problem at all
   if the interpreter can be found at runtime the standard way.
   Otherwise packagers should add themselves a pygimp.interp file with
   the known interpreter path.
2019-08-06 18:35:53 +02:00
Øyvind Kolås 05d47f197a build: require babl-0.1.70 2019-08-02 18:44:15 +02:00
Jehan 62d87f15d9 plug-ins: port python-console to new GObject-introspected API.
I may have missed things. That is the problem of non-compiled script
languages. There is also a known warning:
> DeprecationWarning: Gtk.Dialog.set_alternative_button_order_from_array is deprecated
I'll see later about this one.

Push-time note: calling various functions is actually broken right now
in the console since the late API changes (it was working fine yesterday
evening when I tested the same python-console code). Pushing anyway for
now.
2019-07-30 12:57:59 +02:00
Ell 41d3b478a2 configure.ac: s/GOBJECT_INTROSPECTION_CHECK/GOBJECT_INTROSPECTION_REQUIRE/
Make sure configure fails when introspection is not installed,
since we compile it unconditionally for now.
2019-07-29 02:02:04 +03:00
Jehan 0f0cf4df87 po-python: install again localization for Python plug-ins.
This used to be deactivated. Let's install them again.
Also activate localization in the palette-to-gradient plug-in.
2019-07-28 21:06:36 +02:00
Jehan 65fb7536e1 plug-ins: port Python plug-in palette-to-gradient to introspected API.
Localization still doesn't work, but this is normal (po-python is not
installed). I will later make the proper tests for this.

Other than this, it is a pretty simple port. It lost all particularities
and facilities of pygimp, but the fact that it now works similarly to
the C API is quite nice too.
It still uses the legacy API for plug-ins though and will have to be
ported further when the new API will be stable.

Also I still haven't figured out why we need to return the number of
returned values. With the proper annotations, an array length parameter
disappears in introspected Python (because it is useless as Python lists
know their length). But it would seem that this annotation doesn't work
the same for returned values, which is a bit sad as it creates ugly
redundancy.

It can be noted that I an going to move all Python plug-ins from
plug-ins/pygimp/plug-ins/ to plug-ins/python/. The whole pygimp/
subdirectory will actually be deleted eventually (I keep it around for
now as reference) as Python plug-in should not need to be considered
particularly from now on. They can just be considered as generic
executables.
2019-07-28 18:43:00 +02:00
Jehan 521ff83cba configure: some Python test cleanup/improvements.
In particular, when header check fails, Python option is disabled.

Also let's use pkg-config to search for the Python include directory.
The reason is that include/python{version} is not always
true. On my system in particular, python3.7 was in `include/python3.7m`.
2019-07-28 18:43:00 +02:00
Akkana Peck 872aa50c56 Re-enable Python in the build, but requiring Python >3.6.0 since...
... we'll need that for gobject introspection
Edit by Jehan: don't actually re-enable pygimp, only do bring back the
Python 3 configure search.
2019-07-28 18:43:00 +02:00
Øyvind Kolås 23ade7b80b build, app: require babl-0.1.68 or newer 2019-07-25 15:10:22 +02:00
Jehan 0c75cd7fc4 configure, libgimpbase, m4macros: first steps into API introspection.
So far only libgimpbase is introspected. It just works though (I could
test that I could just run a plug-in which could access libgimpbase API
without any problem).
The g-ir-scanner call outputs a lot of warning but I won't care for
these right now.

The `introspection.m4` is taken straight from GEGL tree.
2019-07-25 10:51:03 +02:00
Michael Natterer b9a4fdd1e0 configure.ac: build the devel-docs again 2019-07-23 19:33:48 +02:00
Michael Natterer 928b85d25c app: add gegl:bayer-matrix and gegl:linear-sinusoid to the menus
in Filters -> Render -> Pattern. Also depend on GEGL from git.
2019-06-28 15:48:47 +02:00
Michael Natterer 62f010df90 configure.ac, plug-ins: make file-heif build with older libheif again
Lower requirement to 1.3.2 and check for 1.4.0 separately. Put color
profile code in #ifdef HAVE_LIBHEIF_1_4_0.
2019-06-25 13:20:07 +02:00
Øyvind Kolås b3dcb5aaac build: depend on babl-0.1.66 2019-06-12 21:32:47 +02:00
Michael Natterer df0c659f8b configure.ac: also check for gtk-update-icon-cache-3.0
not only gtk-update-icon-cache, the exacutable name seems to depend on
how GTK is built and packaged.
2019-06-02 15:57:42 +02:00
Øyvind Kolås a3f2d734a7 depend on babl-0.1.64 2019-05-25 19:51:42 +02:00
Ell 04f9281bdd configure.ac: improve compiler version string escaping
In configure.ac, improve backslash escaping in the compiler
version string.  Backslashes are currently not properly escaped in
our Windows builds, leading to spurious (and, in particular, non-
UTF8) characters in the compiler version string.
2019-05-20 03:09:20 -04:00
Ell 29d575c033 configure.ac: require GEGL >= 0.4.16 2019-05-08 04:22:38 -04:00
Jehan 406279e4ef app: new "gex" format (GIMP Extension).
File extension (.gex) may still change if anything better is proposed.
This format is currently just a compressed archive containing the
extension data (plug-in, brushes or whatever) and the metadata file.

For now, opening such file will simply install it as a new extension,
keeping all file permissions and structure. Of course in the future, it
will have to trigger a confirmation dialog.

Currently the compression used is zip, which is just a first draft. This
is not a decisive choice as well. We could use some tarball compressed
in whatever other compression algorithm. I use libarchive as a new
dependency to support unarchiving as it seems to be a common library
(and since it is already used by AppStream-glib anyway, this doesn't add
any actual dependency, just make it direct).
2019-04-12 18:49:18 +02:00
Jehan 22e14e0b9b Issue #3164: HEIC doesnt have color profile.
Since this requires libheif 1.4.0, released end of February 2019, this
commit should not go into the gimp-2-10 branch right now.
2019-04-01 15:29:58 +02:00