sanity.c 21.5 KB
Newer Older
1
/* GIMP - The GNU Image Manipulation Program
2 3
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
4
 * This program is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
7 8 9 10 11 12 13 14
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
15
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16 17 18 19
 */

#include "config.h"

20
#include <cairo.h>
21
#include <fontconfig/fontconfig.h>
22
#include <pango/pango.h>
23
#include <pango/pangoft2.h>
24
#include <gdk-pixbuf/gdk-pixbuf.h>
25
#include <lcms2.h>
26
#include <gexiv2/gexiv2.h>
27
#include <gegl.h>
28

29
#include "libgimpbase/gimpbase.h"
30

31 32
#include "sanity.h"

33 34
#include "gimp-intl.h"

35

36
/*  early-stage tests  */
37
static gchar * sanity_check_gimp              (void);
38
static gchar * sanity_check_glib              (void);
39
static gchar * sanity_check_cairo             (void);
40
static gchar * sanity_check_pango             (void);
41 42
static gchar * sanity_check_fontconfig        (void);
static gchar * sanity_check_freetype          (void);
43
static gchar * sanity_check_gdk_pixbuf        (void);
44
static gchar * sanity_check_lcms              (void);
45
static gchar * sanity_check_gexiv2            (void);
46
static gchar * sanity_check_babl              (void);
47
static gchar * sanity_check_gegl              (void);
48 49
static gchar * sanity_check_filename_encoding (void);

50 51 52
/*  late-stage tests  */
static gchar * sanity_check_gegl_ops          (void);

53

54
/*  public functions  */
55

56
/* early-stage sanity check, performed before the call to app_run(). */
57
const gchar *
58
sanity_check_early (void)
59
{
60 61 62 63
  gchar *abort_message = NULL;

  if (! abort_message)
    abort_message = sanity_check_gimp ();
64 65 66

  if (! abort_message)
    abort_message = sanity_check_glib ();
67

68 69 70
  if (! abort_message)
    abort_message = sanity_check_cairo ();

71 72 73
  if (! abort_message)
    abort_message = sanity_check_pango ();

74 75 76 77 78 79
  if (! abort_message)
    abort_message = sanity_check_fontconfig ();

  if (! abort_message)
    abort_message = sanity_check_freetype ();

80 81 82
  if (! abort_message)
    abort_message = sanity_check_gdk_pixbuf ();

83 84 85
  if (! abort_message)
    abort_message = sanity_check_lcms ();

86 87 88
  if (! abort_message)
    abort_message = sanity_check_gexiv2 ();

89 90 91
  if (! abort_message)
    abort_message = sanity_check_babl ();

92 93 94
  if (! abort_message)
    abort_message = sanity_check_gegl ();

95
  if (! abort_message)
96
    abort_message = sanity_check_filename_encoding ();
97

98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
  return abort_message;
}

/* late-stage sanity check, performed during app_run(), after the user
 * configuration has been loaded.
 */
const gchar *
sanity_check_late (void)
{
  gchar *abort_message = NULL;

  /* the gegl ops test initializes all gegl ops; in particular, it initializes
   * all the strings used by their properties, which appear in the ui.  it
   * must be run after we've called language_init(), potentially overriding
   * LANGUAGE according to the user config, or else all affected strings would
   * use the translation corresponding to the system locale, regardless.
   */
115
  if (! abort_message)
116
    abort_message = sanity_check_gegl_ops ();
117 118 119 120 121 122 123

  return abort_message;
}


/*  private functions  */

124 125 126

/*  early-stage tests  */

127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
static gboolean
sanity_check_version (guint major_version, guint required_major,
                      guint minor_version, guint required_minor,
                      guint micro_version, guint required_micro)
{
  if (major_version > required_major)
    return TRUE;

  if (major_version < required_major)
    return FALSE;

  if (minor_version > required_minor)
    return TRUE;

  if (minor_version < required_minor)
    return FALSE;

  if (micro_version >= required_micro)
    return TRUE;

  return FALSE;
}

150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
static gchar *
sanity_check_gimp (void)
{
  if (GIMP_MAJOR_VERSION != gimp_major_version ||
      GIMP_MINOR_VERSION != gimp_minor_version ||
      GIMP_MICRO_VERSION != gimp_micro_version)
    {
      return g_strdup_printf
        ("Libgimp version mismatch!\n\n"
         "The GIMP binary cannot run with a libgimp version\n"
         "other than its own. This is GIMP %d.%d.%d, but the\n"
         "libgimp version is %d.%d.%d.\n\n"
         "Maybe you have GIMP versions in both /usr and /usr/local ?",
         GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION, GIMP_MICRO_VERSION,
         gimp_major_version, gimp_minor_version, gimp_micro_version);
    }

  return NULL;
}

170 171 172 173
static gchar *
sanity_check_glib (void)
{
#define GLIB_REQUIRED_MAJOR 2
174 175
#define GLIB_REQUIRED_MINOR 56
#define GLIB_REQUIRED_MICRO 0
176

177 178 179
  const gchar *mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
                                              GLIB_REQUIRED_MINOR,
                                              GLIB_REQUIRED_MICRO);
180 181 182 183 184

  if (mismatch)
    {
      return g_strdup_printf
        ("%s\n\n"
185
         "GIMP requires GLib version %d.%d.%d or later.\n"
186
         "Installed GLib version is %d.%d.%d.\n\n"
187
         "Somehow you or your software packager managed\n"
188
         "to install GIMP with an older GLib version.\n\n"
189
         "Please upgrade to GLib version %d.%d.%d or later.",
190 191 192 193 194
         mismatch,
         GLIB_REQUIRED_MAJOR, GLIB_REQUIRED_MINOR, GLIB_REQUIRED_MICRO,
         glib_major_version, glib_minor_version, glib_micro_version,
         GLIB_REQUIRED_MAJOR, GLIB_REQUIRED_MINOR, GLIB_REQUIRED_MICRO);
    }
195

196 197 198 199 200 201 202
#undef GLIB_REQUIRED_MAJOR
#undef GLIB_REQUIRED_MINOR
#undef GLIB_REQUIRED_MICRO

  return NULL;
}

203 204 205 206
static gchar *
sanity_check_cairo (void)
{
#define CAIRO_REQUIRED_MAJOR 1
207 208
#define CAIRO_REQUIRED_MINOR 14
#define CAIRO_REQUIRED_MICRO 0
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232

  if (cairo_version () < CAIRO_VERSION_ENCODE (CAIRO_REQUIRED_MAJOR,
                                               CAIRO_REQUIRED_MINOR,
                                               CAIRO_REQUIRED_MICRO))
    {
      return g_strdup_printf
        ("The Cairo version being used is too old!\n\n"
         "GIMP requires Cairo version %d.%d.%d or later.\n"
         "Installed Cairo version is %s.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older Cairo version.\n\n"
         "Please upgrade to Cairo version %d.%d.%d or later.",
         CAIRO_REQUIRED_MAJOR, CAIRO_REQUIRED_MINOR, CAIRO_REQUIRED_MICRO,
         cairo_version_string (),
         CAIRO_REQUIRED_MAJOR, CAIRO_REQUIRED_MINOR, CAIRO_REQUIRED_MICRO);
    }

#undef CAIRO_REQUIRED_MAJOR
#undef CAIRO_REQUIRED_MINOR
#undef CAIRO_REQUIRED_MICRO

  return NULL;
}

233 234 235 236
static gchar *
sanity_check_pango (void)
{
#define PANGO_REQUIRED_MAJOR 1
237 238
#define PANGO_REQUIRED_MINOR 42
#define PANGO_REQUIRED_MICRO 0
239

240 241 242
  const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
                                               PANGO_REQUIRED_MINOR,
                                               PANGO_REQUIRED_MICRO);
243 244 245

  if (mismatch)
    {
246 247 248 249
      const gint pango_major_version = pango_version () / 100 / 100;
      const gint pango_minor_version = pango_version () / 100 % 100;
      const gint pango_micro_version = pango_version () % 100;

250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
      return g_strdup_printf
        ("%s\n\n"
         "GIMP requires Pango version %d.%d.%d or later.\n"
         "Installed Pango version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older Pango version.\n\n"
         "Please upgrade to Pango version %d.%d.%d or later.",
         mismatch,
         PANGO_REQUIRED_MAJOR, PANGO_REQUIRED_MINOR, PANGO_REQUIRED_MICRO,
         pango_major_version, pango_minor_version, pango_micro_version,
         PANGO_REQUIRED_MAJOR, PANGO_REQUIRED_MINOR, PANGO_REQUIRED_MICRO);
    }

#undef PANGO_REQUIRED_MAJOR
#undef PANGO_REQUIRED_MINOR
#undef PANGO_REQUIRED_MICRO

  return NULL;
}

270 271 272
static gchar *
sanity_check_fontconfig (void)
{
273
  const gint fc_version = FcGetVersion ();
274 275 276 277 278

#define FC_REQUIRED_MAJOR 2
#define FC_REQUIRED_MINOR 2
#define FC_REQUIRED_MICRO 0

279 280 281 282
  if (fc_version < ((FC_REQUIRED_MAJOR * 10000) +
                    (FC_REQUIRED_MINOR *   100) +
                    (FC_REQUIRED_MICRO *     1)))
    {
283 284 285 286
      const gint fc_major_version = fc_version / 100 / 100;
      const gint fc_minor_version = fc_version / 100 % 100;
      const gint fc_micro_version = fc_version % 100;

287
      return g_strdup_printf
288
        ("The Fontconfig version being used is too old!\n\n"
289 290
         "GIMP requires Fontconfig version %d.%d.%d or later.\n"
         "The Fontconfig version loaded by GIMP is %d.%d.%d.\n\n"
291 292 293 294 295 296
         "This may be caused by another instance of libfontconfig.so.1\n"
         "being installed in the system, probably in /usr/X11R6/lib.\n"
         "Please correct the situation or report it to someone who can.",
         FC_REQUIRED_MAJOR, FC_REQUIRED_MINOR, FC_REQUIRED_MICRO,
         fc_major_version, fc_minor_version, fc_micro_version);
    }
297 298 299 300

#undef FC_REQUIRED_MAJOR
#undef FC_REQUIRED_MINOR
#undef FC_REQUIRED_MICRO
301

302 303
  return NULL;
}
304

305 306 307 308 309 310 311 312
static gchar *
sanity_check_freetype (void)
{
  FT_Library ft_library;
  FT_Int     ft_major_version;
  FT_Int     ft_minor_version;
  FT_Int     ft_micro_version;
  FT_Int     ft_version;
313 314 315 316 317

#define FT_REQUIRED_MAJOR 2
#define FT_REQUIRED_MINOR 1
#define FT_REQUIRED_MICRO 7

318 319 320 321 322 323 324
  if (FT_Init_FreeType (&ft_library) != 0)
    g_error ("FT_Init_FreeType() failed");

  FT_Library_Version (ft_library,
                      &ft_major_version,
                      &ft_minor_version,
                      &ft_micro_version);
325

326 327 328 329 330 331 332 333 334 335 336 337 338
  if (FT_Done_FreeType (ft_library) != 0)
    g_error ("FT_Done_FreeType() failed");

  ft_version = (ft_major_version * 10000 +
                ft_minor_version *   100 +
                ft_micro_version *     1);

  if (ft_version < ((FT_REQUIRED_MAJOR * 10000) +
                    (FT_REQUIRED_MINOR *   100) +
                    (FT_REQUIRED_MICRO *     1)))
    {
      return g_strdup_printf
        ("FreeType version too old!\n\n"
339
         "GIMP requires FreeType version %d.%d.%d or later.\n"
340 341
         "Installed FreeType version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
342
         "to install GIMP with an older FreeType version.\n\n"
343 344 345 346 347
         "Please upgrade to FreeType version %d.%d.%d or later.",
         FT_REQUIRED_MAJOR, FT_REQUIRED_MINOR, FT_REQUIRED_MICRO,
         ft_major_version, ft_minor_version, ft_micro_version,
         FT_REQUIRED_MAJOR, FT_REQUIRED_MINOR, FT_REQUIRED_MICRO);
    }
348 349 350 351 352

#undef FT_REQUIRED_MAJOR
#undef FT_REQUIRED_MINOR
#undef FT_REQUIRED_MICRO

353
  return NULL;
354
}
355

356 357 358 359
static gchar *
sanity_check_gdk_pixbuf (void)
{
#define GDK_PIXBUF_REQUIRED_MAJOR 2
360 361
#define GDK_PIXBUF_REQUIRED_MINOR 30
#define GDK_PIXBUF_REQUIRED_MICRO 8
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385

  if (! sanity_check_version (gdk_pixbuf_major_version, GDK_PIXBUF_REQUIRED_MAJOR,
                              gdk_pixbuf_minor_version, GDK_PIXBUF_REQUIRED_MINOR,
                              gdk_pixbuf_micro_version, GDK_PIXBUF_REQUIRED_MICRO))
    {
      return g_strdup_printf
        ("GdkPixbuf version too old!\n\n"
         "GIMP requires GdkPixbuf version %d.%d.%d or later.\n"
         "Installed GdkPixbuf version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older GdkPixbuf version.\n\n"
         "Please upgrade to GdkPixbuf version %d.%d.%d or later.",
         GDK_PIXBUF_REQUIRED_MAJOR, GDK_PIXBUF_REQUIRED_MINOR, GDK_PIXBUF_REQUIRED_MICRO,
         gdk_pixbuf_major_version, gdk_pixbuf_minor_version, gdk_pixbuf_micro_version,
         GDK_PIXBUF_REQUIRED_MAJOR, GDK_PIXBUF_REQUIRED_MINOR, GDK_PIXBUF_REQUIRED_MICRO);
    }

#undef GDK_PIXBUF_REQUIRED_MAJOR
#undef GDK_PIXBUF_REQUIRED_MINOR
#undef GDK_PIXBUF_REQUIRED_MICRO

  return NULL;
}

386 387 388 389
static gchar *
sanity_check_lcms (void)
{
#define LCMS_REQUIRED_MAJOR 2
390
#define LCMS_REQUIRED_MINOR 8
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433

  gint lcms_version = cmsGetEncodedCMMversion ();

  if (LCMS_VERSION > lcms_version)
    {
      return g_strdup_printf
        ("Liblcms2 version mismatch!\n\n"
         "GIMP was compiled against LittleCMS version %d.%d, but the\n"
         "LittleCMS version found at runtime is only %d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install a LittleCMS that is older than what GIMP was\n"
         "built against.\n\n"
         "Please make sure that the installed LittleCMS version\n"
         "is at least %d.%d and that headers and library match.",
         LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10,
         lcms_version / 1000, lcms_version % 100 / 10,
         LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10);
    }

  if (lcms_version < (LCMS_REQUIRED_MAJOR * 1000 +
                      LCMS_REQUIRED_MINOR * 10))
    {
      const gint lcms_major_version = lcms_version / 1000;
      const gint lcms_minor_version = lcms_version % 100 / 10;

      return g_strdup_printf
        ("Liblcms2 version too old!\n\n"
         "GIMP requires LittleCMS version %d.%d or later.\n"
         "Installed LittleCMS version is %d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older LittleCMS version.\n\n"
         "Please upgrade to LittleCMS version %d.%d or later.",
         LCMS_REQUIRED_MAJOR, LCMS_REQUIRED_MINOR,
         lcms_major_version, lcms_minor_version,
         LCMS_REQUIRED_MAJOR, LCMS_REQUIRED_MINOR);
    }

#undef LCMS_REQUIRED_MAJOR
#undef LCMS_REQUIRED_MINOR

  return NULL;
}

434 435 436 437 438 439
static gchar *
sanity_check_gexiv2 (void)
{
#ifdef GEXIV2_MAJOR_VERSION

#define GEXIV2_REQUIRED_MAJOR 0
440
#define GEXIV2_REQUIRED_MINOR 10
441
#define GEXIV2_REQUIRED_MICRO 6
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473

  gint gexiv2_version = gexiv2_get_version ();

  if (gexiv2_version < (GEXIV2_REQUIRED_MAJOR * 100 * 100 +
                        GEXIV2_REQUIRED_MINOR * 100 +
                        GEXIV2_REQUIRED_MICRO))
    {
      const gint gexiv2_major_version = gexiv2_version / 100 / 100;
      const gint gexiv2_minor_version = gexiv2_version / 100 % 100;
      const gint gexiv2_micro_version = gexiv2_version % 100;

      return g_strdup_printf
        ("gexiv2 version too old!\n\n"
         "GIMP requires gexiv2 version %d.%d.%d or later.\n"
         "Installed gexiv2 version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older gexiv2 version.\n\n"
         "Please upgrade to gexiv2 version %d.%d.%d or later.",
         GEXIV2_REQUIRED_MAJOR, GEXIV2_REQUIRED_MINOR, GEXIV2_REQUIRED_MICRO,
         gexiv2_major_version, gexiv2_minor_version, gexiv2_micro_version,
         GEXIV2_REQUIRED_MAJOR, GEXIV2_REQUIRED_MINOR, GEXIV2_REQUIRED_MICRO);
    }

#undef GEXIV2_REQUIRED_MAJOR
#undef GEXIV2_REQUIRED_MINOR
#undef GEXIV2_REQUIRED_MICRO

#endif

  return NULL;
}

474 475 476 477 478 479 480 481
static gchar *
sanity_check_babl (void)
{
  gint babl_major_version;
  gint babl_minor_version;
  gint babl_micro_version;

#define BABL_REQUIRED_MAJOR 0
482
#define BABL_REQUIRED_MINOR 1
483
#define BABL_REQUIRED_MICRO 61
484 485 486 487 488

  babl_get_version (&babl_major_version,
                    &babl_minor_version,
                    &babl_micro_version);

489 490 491
  if (! sanity_check_version (babl_major_version, BABL_REQUIRED_MAJOR,
                              babl_minor_version, BABL_REQUIRED_MINOR,
                              babl_micro_version, BABL_REQUIRED_MICRO))
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
    {
      return g_strdup_printf
        ("BABL version too old!\n\n"
         "GIMP requires BABL version %d.%d.%d or later.\n"
         "Installed BABL version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older BABL version.\n\n"
         "Please upgrade to BABL version %d.%d.%d or later.",
         BABL_REQUIRED_MAJOR, BABL_REQUIRED_MINOR, BABL_REQUIRED_MICRO,
         babl_major_version, babl_minor_version, babl_micro_version,
         BABL_REQUIRED_MAJOR, BABL_REQUIRED_MINOR, BABL_REQUIRED_MICRO);
    }

#undef BABL_REQUIRED_MAJOR
#undef BABL_REQUIRED_MINOR
#undef BABL_REQUIRED_MICRO

  return NULL;
}

512 513 514 515 516 517 518 519
static gchar *
sanity_check_gegl (void)
{
  gint gegl_major_version;
  gint gegl_minor_version;
  gint gegl_micro_version;

#define GEGL_REQUIRED_MAJOR 0
520
#define GEGL_REQUIRED_MINOR 4
521
#define GEGL_REQUIRED_MICRO 13
522 523 524 525 526

  gegl_get_version (&gegl_major_version,
                    &gegl_minor_version,
                    &gegl_micro_version);

527 528 529
  if (! sanity_check_version (gegl_major_version, GEGL_REQUIRED_MAJOR,
                              gegl_minor_version, GEGL_REQUIRED_MINOR,
                              gegl_micro_version, GEGL_REQUIRED_MICRO))
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549
    {
      return g_strdup_printf
        ("GEGL version too old!\n\n"
         "GIMP requires GEGL version %d.%d.%d or later.\n"
         "Installed GEGL version is %d.%d.%d.\n\n"
         "Somehow you or your software packager managed\n"
         "to install GIMP with an older GEGL version.\n\n"
         "Please upgrade to GEGL version %d.%d.%d or later.",
         GEGL_REQUIRED_MAJOR, GEGL_REQUIRED_MINOR, GEGL_REQUIRED_MICRO,
         gegl_major_version, gegl_minor_version, gegl_micro_version,
         GEGL_REQUIRED_MAJOR, GEGL_REQUIRED_MINOR, GEGL_REQUIRED_MICRO);
    }

#undef GEGL_REQUIRED_MAJOR
#undef GEGL_REQUIRED_MINOR
#undef GEGL_REQUIRED_MICRO

  return NULL;
}

550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
static gchar *
sanity_check_filename_encoding (void)
{
  gchar  *result;
  GError *error = NULL;

  result = g_filename_to_utf8 ("", -1, NULL, NULL, &error);

  if (! result)
    {
      gchar *msg =
        g_strdup_printf
        (_("The configured filename encoding cannot be converted to UTF-8: "
           "%s\n\n"
           "Please check the value of the environment variable "
           "G_FILENAME_ENCODING."),
         error->message);

      g_error_free (error);

      return msg;
    }

  g_free (result);

  result = g_filename_to_utf8 (gimp_directory (), -1, NULL, NULL, &error);

  if (! result)
    {
      gchar *msg =
        g_strdup_printf
        (_("The name of the directory holding the GIMP user configuration "
           "cannot be converted to UTF-8: "
           "%s\n\n"
           "Your filesystem probably stores files in an encoding "
           "other than UTF-8 and you didn't tell GLib about this. "
           "Please set the environment variable G_FILENAME_ENCODING."),
         error->message);

      g_error_free (error);

      return msg;
    }

  g_free (result);

  return NULL;
}


/*  late-stage tests  */

602 603 604
static gchar *
sanity_check_gegl_ops (void)
{
605 606
  static const gchar *required_ops[] =
  {
607
    "gegl:alien-map",
608
    "gegl:buffer-sink",
609 610
    "gegl:buffer-source",
    "gegl:c2g",
611
    "gegl:cache",
612
    "gegl:cartoon",
613
    "gegl:cell-noise",
614 615
    "gegl:checkerboard",
    "gegl:color",
616
    "gegl:color-enhance",
617
    "gegl:color-exchange",
618
    "gegl:color-rotate",
619 620
    "gegl:color-temperature",
    "gegl:color-to-alpha",
621
    "gegl:component-extract",
622
    "gegl:convolution-matrix",
623
    "gegl:copy-buffer",
624 625 626 627
    "gegl:crop",
    "gegl:cubism",
    "gegl:deinterlace",
    "gegl:difference-of-gaussians",
628
    "gegl:diffraction-patterns",
629
    "gegl:displace",
630
    "gegl:distance-transform",
631
    "gegl:dither",
632
    "gegl:dropshadow",
633
    "gegl:edge",
634
    "gegl:edge-laplace",
635
    "gegl:edge-neon",
636 637
    "gegl:edge-sobel",
    "gegl:emboss",
638
    "gegl:engrave",
639
    "gegl:exposure",
640
    "gegl:fattal02",
641 642
    "gegl:fractal-trace",
    "gegl:gaussian-blur",
643
    "gegl:gaussian-blur-selective",
644
    "gegl:gegl",
645
    "gegl:grid",
646
    "gegl:high-pass",
647
    "gegl:hue-chroma",
648
    "gegl:illusion",
649
    "gegl:image-gradient",
650 651 652 653
    "gegl:introspect",
    "gegl:invert-gamma",
    "gegl:invert-linear",
    "gegl:lens-distortion",
654
    "gegl:lens-flare",
655
    "gegl:long-shadow",
656
    "gegl:mantiuk06",
657 658 659
    "gegl:map-absolute",
    "gegl:map-relative",
    "gegl:matting-global",
660
    "gegl:maze",
661
    "gegl:median-blur",
662
    "gegl:mirrors",
663 664 665 666 667 668 669 670 671 672
    "gegl:mono-mixer",
    "gegl:motion-blur-circular",
    "gegl:motion-blur-linear",
    "gegl:motion-blur-zoom",
    "gegl:noise-cie-lch",
    "gegl:noise-hsv",
    "gegl:noise-hurl",
    "gegl:noise-pick",
    "gegl:noise-rgb",
    "gegl:noise-slur",
673
    "gegl:noise-solid",
674
    "gegl:noise-spread",
675
    "gegl:npd",
676
    "gegl:oilify",
677 678
    "gegl:opacity",
    "gegl:over",
679
    "gegl:panorama-projection",
680
    "gegl:perlin-noise",
681 682 683
    "gegl:photocopy",
    "gegl:pixelize",
    "gegl:polar-coordinates",
684
    "gegl:recursive-transform",
685
    "gegl:red-eye-removal",
686
    "gegl:reinhard05",
687
    "gegl:rgb-clip",
688
    "gegl:ripple",
689
    "gegl:saturation",
690 691
    "gegl:scale-ratio",
    "gegl:seamless-clone",
692
    "gegl:sepia",
693
    "gegl:shadows-highlights",
694
    "gegl:shift",
695
    "gegl:simplex-noise",
696 697
    "gegl:shift",
    "gegl:sinus",
698
    "gegl:slic",
699
    "gegl:snn-mean",
700
    "gegl:softglow",
701
    "gegl:spherize",
702
    "gegl:spiral",
703
    "gegl:stereographic-projection",
704 705
    "gegl:stretch-contrast",
    "gegl:stretch-contrast-hsv",
706
    "gegl:stress",
707
    "gegl:supernova",
708 709
    "gegl:threshold",
    "gegl:tile",
710
    "gegl:tile-paper",
711
    "gegl:tile-glass",
712 713 714 715 716
    "gegl:tile-seamless",
    "gegl:transform",
    "gegl:translate",
    "gegl:unsharp-mask",
    "gegl:value-invert",
717
    "gegl:value-propagate",
718
    "gegl:video-degradation",
719 720
    "gegl:vignette",
    "gegl:warp",
721
    "gegl:waterpixels",
722
    "gegl:wavelet-blur",
723 724 725
    "gegl:waves",
    "gegl:whirl-pinch",
    "gegl:write-buffer"
726 727
  };

728 729
  gint i;

730 731
  for (i = 0; i < G_N_ELEMENTS (required_ops); i++)
    {
732 733 734 735 736 737 738 739 740 741
      if (! gegl_has_operation (required_ops[i]))
        {
          return g_strdup_printf
            ("GEGL operation missing!\n\n"
             "GIMP requires the GEGL operation \"%s\".\n"
             "This operation cannot be found. Check your\n"
             "GEGL install and ensure it has been compiled\n"
             "with any dependencies required for GIMP.",
             required_ops [i]);
        }
742
    }
743

744 745
  return NULL;
}