Commit Graph

477 Commits

Author SHA1 Message Date
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
Øyvind Kolås dde7108584 build,app: require GEGL-0.4.14 2019-03-01 14:42:26 +01:00
Øyvind Kolås 3e2d9e6b9e build,app: require babl-0.1.62 2019-03-01 14:42:23 +01:00
Michael Natterer a4e77e57f6 app, plug-ins: start consolidating brush and pattern loading/saving code
We currently have brush and pattern I/O code in both the core and
plug-ins. This commit starts removing plug-in code in favor of having
one copy of the code in the core, much like XCF loading and saving is
implemented.

Add app/file-data/ module with file procedure registering code, for
now just with an implementation of file-gbr-load.

Remove the file-gbr-load code from the file-gbr plug-in.
2019-02-11 12:51:31 +01:00
Jehan 60d407ac21 configure.ac: remove old outdated code.
There was still code for a warning, now irrelevant as it was about
non-recommended GTK+2 version for Windows. Anyway this is now removed.
2019-02-05 15:33:02 +01:00
Jehan 4d84c1d7ee app, libgimpbase: --enable-relocatable-bundle replaces --enable-binreloc
Older --enable-binreloc configure option had basically the same purpose
as the newer --enable-relocatable-bundle, though the old binreloc was
only used for gimpenv.c code.
As a consequence, commit 10ce702188 was still not working fine since
gimp_installation_directory_file() also need binreloc enabled (to be
actually relocatable).

Let's get rid of this whole mess, by implying we want binreloc code to
be used when --enable-relocatable-bundle is ON. We don't need the
m4macros anymore, since AM_BINRELOC was basically just checking that
`/proc/self/maps` was present. But anyway being present at compile time
does not mean it will be at runtime (nor the opposite). So this test is
not that useful. The binreloc code will anyway fallback gracefully to
the non-binreloc code (i.e. trying to use build-time install paths) if
the procfs is lacking at runtime.
2019-02-05 14:50:31 +01:00
Michael Natterer 2c81d9cbcf Issue #1683 - possibly undefined macro: AM_PATH_GTK_3_0
Stop using AM_PATH_GTK_3_0(), it's deprecated, use PKG_CHECK_MODULES()
instead.
2019-01-30 21:47:16 +01:00
Jehan c0fed5afd6 desktop: check that no remaining TODOs are in appdata file.
Before each release, we prepare now a <release> tag. Unfortunately some
details are not always well known for sure in advance, in particular the
date of release (plans are made to be broken!), and also the release
news URL (since the date is in the URL). So I usually leave them as TODO
and until now, I never forgot to update them just before release. But
there is always the risk of forgetting.
Now the test for the appdata files will also look for remaining "TODO"
in the file if and only if the micro version is even (which means it's a
release). So we won't ever forget to update the file as long as we run
`make check` on the last commit (which we always do obviously).
2019-01-23 23:48:02 +01:00
Michael Natterer 19320235f1 Issue #1004 - file-pdf-load crashes in lcms when opening PDF with...
...color profile

The issue is fixed in poppler 0.50, but since this is git master, we
now depend on poppler >= 0.69 and poppler-data >= 0.4.9
2019-01-07 03:34:41 +01:00
Alexandre Prokoudine 79bc2dc1ef file-dds: add original source code of the DDS plug-in
This is the code from the 'gimp-2.9' branch of the plug-in,
integrated into GIMP's build system.
2019-01-02 18:33:46 +01:00
Michael Natterer b24cc6e7fa configure.ac: require babl >= 0.1.61 2019-01-01 19:21:52 +01:00
Ell 3821ce4bcd configure.ac: require babl >= 0.1.60 2018-11-15 12:55:46 -05:00
Ell 43e3939d4a configure.ac: require GEGL >= 0.4.13 2018-11-14 10:52:02 -05:00
Ell c0b107531e configure.ac: escape backslash chars in compiler version string
When constructing CC_VERSION, escape backslash characters in the
compiler version string, so that they don't get interpreted as
escape sequences by the compiler.  This is especially important on
Windows, where the version string of MinGW may contain backslash
characters as part of paths.
2018-11-11 05:49:09 -05:00
Massimo Valentini df4e35a846 Issue #2454: recent libwmf uses pkg-config. 2018-11-08 11:39:30 +01:00
Ell a75c57f2cd configure.ac: add devel-docs/performance-logs/Makefile
Skipped for now on master, together with the rest of devel-docs/.

Should have been part of fa9161e4f2.
2018-11-08 03:51:11 -05:00
Øyvind Kolås a39b4abfbc configure/app: depend on GEGL 0.4.12 2018-10-23 14:36:26 +02:00
Michael Natterer 0f88830a00 configure.ac: the list of required versions is now alphabetically ordered 2018-10-18 18:31:43 +02:00
Øyvind Kolås d885ef34f5 configure/app: depend on GEGL 0.4.10 2018-10-16 18:54:37 +02:00
Øyvind Kolås ca6e22f0f8 app/configure: depend on babl-0.1.58 2018-10-05 16:28:30 +02:00
Ell 0245775346 configure.ac: fix libbacktrace test
... added in last commit.
2018-09-22 22:46:35 -04:00
Ell 7cdd1ebeef app: add source location information to the Linux GimpBacktrace backend
When libbacktrace is available, use it to retrieve source location
information in the Linux GimpBacktrace backend.
2018-09-22 22:39:08 -04:00
Jehan 9560a653c5 configure: check presence of "gegl:matting-levin" with `gegl --exists`.
This is a runtime dependency. If absent, we simply won't have access to
the alternative Matting Levin engine in the foreground selection tool.

If we don't add a test in configure, this may be easily forgotten. I
created the `gegl --exists` feature specifically for this kind of
checks, so let's check operation existence.
2018-09-17 16:40:00 +02:00
Øyvind Kolås c2666ae5b8 configure, app: depend on babl-0.1.57 2018-09-05 00:20:59 +02:00
Ell 667efc221d app: add Windows backend to GimpBacktrace
The Windows backend produces full, multithreaded backtraces.  When
DrMingw is available, it also provides full symbol and (where
available) source-location information.  Otherwise, it provides
symbol information for most of our libraries, but not for the GIMP
binary itself.
2018-09-03 15:57:53 -04:00
Ell 80bf686c94 app: add GimpBacktrace
GimpBacktrace provides an interface for creating and traversing
multi-threaded backtraces, as well as querying symbol information.
While we already have some backtrace functionality, it relies on
external tools for the most part, and as such is rather expensive,
and is only meant for producing opaque backtraces.  GimpBacktrace,
on the other hand, is meant to be relatively cheap (we're going to
use it for profiling,) and allow inspection of the backtrace data.
In the future, it might make sense to replace some, or all, of the
other backtrace functions with GimpBacktrace.

GimpBacktrace currently only supports Linux.  By default, it uses
dladdr() to query symbol information, which is somewhat limited (in
particular, it doesn't work for static functions.)  When libunwind
is installed, GimpBacktrace uses it to get more complete symbol
information.  libunwind is currently an optional dependency, but it
might make sense to promote it to a mandatory, or opt-out,
dependency, as it's lightweight and widely available.

On other platforms, the GimpBacktrace interface can still be used,
but it always returns NULL backtraces.
2018-09-02 02:54:43 -04:00
Debarshi Ray 3bf1c6a571 configure: Simplify libjpeg detection
The jpeg_save_markers API has existed since 27th March 1998! So it's
safe to assume that everybody has it, and there's no need to check for
it.

libjpeg-turbo has had a libjpeg.pc since 2016, and the IJG's software
has it too. Dropping support for old libraries is a small price to pay
for the benefits of a simpler build.

https://gitlab.gnome.org/GNOME/gimp/merge_requests/28
2018-08-30 13:22:44 +02:00
Jehan b8d4ab4808 configure: reorder the dependency version list.
Current order was just completely random, which makes it hard to manage.
Let's order alphabetically.
2018-08-20 17:06:16 +02:00
Jehan 17e37ddf24 INSTALL: add appstream-glib in the dependency list. 2018-08-19 18:11:56 +02:00
Jehan 11cee13f62 configure: more explicit error message for gtk-encode-symbolic-svg.
Make it obvious this is a tool searched in PATH (and not for instance a
lib) from the error message.
2018-08-19 18:07:09 +02:00
Ell f1ff239d68 configure.ac: require GEGL >= 0.4.9 2018-08-19 03:38:53 -04:00
Øyvind Kolås 6ad5d74565 configure/app: depend on GEGL 0.4.8 2018-08-18 15:23:22 +02:00
Jehan babf74a3db icons: generate PNG symbolic icons with `gtk-encode-symbolic-svg`.
We don't need to commit PNG symbolic icons as `gtk-encode-symbolic-svg`
is perfectly able to generate them from the SVG.
Moreover its man says that it makes "specially prepared png files",
whatever that means. So I don't think we should just rename our
self-exported PNG files as '*-symbolic.symbolic.png'. It is better to
generate them with this tool.

Note that I am now splitting icon-list.mk into 2 files. This is only a
temporary stepback, as I am actually going to merge the 2 icon themes
into one very soon, and hopefully we should be able to generate the list
to ensure we don't miss an icon.
Anyway the icon lists had already diverged earlier, even though it was
only all still in a single file.
2018-08-18 12:51:59 +02:00
Jehan 624edf9017 Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit...
... Windows installation of GIMP.

Our default installer installs 32-bit version of the various DLLs in
32/bin/ (under the installation prefix). Currently this additional
folder is simply added in the PATH, so it works most of the time.
Unfortunately the PATH is searched last for DLLs, and in particular, it
is searched after system directories. So it means that if any misbehaved
application is installing DLLs in system dirs (and in particular
incompatible/older versions of the same DLLs a GIMP plug-in uses), it
breaks the 32-bit plug-in.

SetDllDirectoryW() bypasses this order and the set folder is searched in
between the binary directory and the system dirs. We were already
setting this for our main bin/ directory, which was good for 64-bit
plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
run plug-ins check the bitness of the executable before running it, and
updates the DLL folder accordingly.
The alternative 32-bit folder can be overridden by the configure option
--with-win32-32bit-dll-folder (default: 32/bin/). This option can only
be set when building for 64-bit Windows obviously.

Alternatively we could have put copies of 32-bit DLLs in a subfolder
with each 32-bit plug-in, but this is at best a terrible workaround, as
we would duplicate DLLs for every such case. And this would not have
protected third-party plug-ins which wish to use some of our DLLs.
Last alternative is to use AddDllDirectory(), but it works since Windows
7 with a given update only. And our current official support is any
Windows since Windows 7. So we don't want to use this right now (also
I'm not sure it would actually be much better than current
implementation, and it seems to have a bit more limitations than
SetDllDirectoryW(), though I have not tested).

(cherry picked from commit 91c139f4d0)
2018-08-15 14:34:19 +02:00