32
34
static gchar * sanity_check_gimp (void);
33
35
static gchar * sanity_check_glib (void);
36
static gchar * sanity_check_pango (void);
34
37
static gchar * sanity_check_fontconfig (void);
35
38
static gchar * sanity_check_freetype (void);
39
static gchar * sanity_check_babl (void);
40
static gchar * sanity_check_gegl (void);
36
41
static gchar * sanity_check_filename_encoding (void);
47
52
abort_message = sanity_check_glib ();
49
54
if (! abort_message)
55
abort_message = sanity_check_pango ();
50
58
abort_message = sanity_check_fontconfig ();
52
60
if (! abort_message)
53
61
abort_message = sanity_check_freetype ();
55
63
if (! abort_message)
64
abort_message = sanity_check_babl ();
67
abort_message = sanity_check_gegl ();
56
70
abort_message = sanity_check_filename_encoding ();
58
72
return abort_message;
85
99
sanity_check_glib (void)
87
const gchar *mismatch;
89
101
#define GLIB_REQUIRED_MAJOR 2
90
#define GLIB_REQUIRED_MINOR 12
91
#define GLIB_REQUIRED_MICRO 3
102
#define GLIB_REQUIRED_MINOR 16
103
#define GLIB_REQUIRED_MICRO 1
93
mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
105
const gchar *mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
107
GLIB_REQUIRED_MICRO);
132
sanity_check_pango (void)
134
#define PANGO_REQUIRED_MAJOR 1
135
#define PANGO_REQUIRED_MINOR 18
136
#define PANGO_REQUIRED_MICRO 0
138
const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
139
PANGO_REQUIRED_MINOR,
140
PANGO_REQUIRED_MICRO);
144
const gint pango_major_version = pango_version () / 100 / 100;
145
const gint pango_minor_version = pango_version () / 100 % 100;
146
const gint pango_micro_version = pango_version () % 100;
148
return g_strdup_printf
150
"GIMP requires Pango version %d.%d.%d or later.\n"
151
"Installed Pango version is %d.%d.%d.\n\n"
152
"Somehow you or your software packager managed\n"
153
"to install GIMP with an older Pango version.\n\n"
154
"Please upgrade to Pango version %d.%d.%d or later.",
156
PANGO_REQUIRED_MAJOR, PANGO_REQUIRED_MINOR, PANGO_REQUIRED_MICRO,
157
pango_major_version, pango_minor_version, pango_micro_version,
158
PANGO_REQUIRED_MAJOR, PANGO_REQUIRED_MINOR, PANGO_REQUIRED_MICRO);
161
#undef PANGO_REQUIRED_MAJOR
162
#undef PANGO_REQUIRED_MINOR
163
#undef PANGO_REQUIRED_MICRO
120
169
sanity_check_fontconfig (void)
122
gint fc_version = FcGetVersion ();
123
gint fc_major_version = fc_version / 100 / 100;
124
gint fc_minor_version = fc_version / 100 % 100;
125
gint fc_micro_version = fc_version % 100;
171
const gint fc_version = FcGetVersion ();
127
173
#define FC_REQUIRED_MAJOR 2
128
174
#define FC_REQUIRED_MINOR 2
132
178
(FC_REQUIRED_MINOR * 100) +
133
179
(FC_REQUIRED_MICRO * 1)))
181
const gint fc_major_version = fc_version / 100 / 100;
182
const gint fc_minor_version = fc_version / 100 % 100;
183
const gint fc_micro_version = fc_version % 100;
135
185
return g_strdup_printf
136
186
("The Fontconfig version being used is too old!\n\n"
137
187
"GIMP requires Fontconfig version %d.%d.%d or later.\n"
255
sanity_check_babl (void)
257
gint babl_major_version;
258
gint babl_minor_version;
259
gint babl_micro_version;
261
#define BABL_REQUIRED_MAJOR 0
262
#define BABL_REQUIRED_MINOR 0
263
#define BABL_REQUIRED_MICRO 22
265
babl_get_version (&babl_major_version,
267
&babl_micro_version);
269
if (babl_major_version < BABL_REQUIRED_MAJOR ||
270
babl_minor_version < BABL_REQUIRED_MINOR ||
271
babl_micro_version < BABL_REQUIRED_MICRO)
273
return g_strdup_printf
274
("BABL version too old!\n\n"
275
"GIMP requires BABL version %d.%d.%d or later.\n"
276
"Installed BABL version is %d.%d.%d.\n\n"
277
"Somehow you or your software packager managed\n"
278
"to install GIMP with an older BABL version.\n\n"
279
"Please upgrade to BABL version %d.%d.%d or later.",
280
BABL_REQUIRED_MAJOR, BABL_REQUIRED_MINOR, BABL_REQUIRED_MICRO,
281
babl_major_version, babl_minor_version, babl_micro_version,
282
BABL_REQUIRED_MAJOR, BABL_REQUIRED_MINOR, BABL_REQUIRED_MICRO);
285
#undef BABL_REQUIRED_MAJOR
286
#undef BABL_REQUIRED_MINOR
287
#undef BABL_REQUIRED_MICRO
293
sanity_check_gegl (void)
295
gint gegl_major_version;
296
gint gegl_minor_version;
297
gint gegl_micro_version;
299
#define GEGL_REQUIRED_MAJOR 0
300
#define GEGL_REQUIRED_MINOR 0
301
#define GEGL_REQUIRED_MICRO 18
303
gegl_get_version (&gegl_major_version,
305
&gegl_micro_version);
307
if (gegl_major_version < GEGL_REQUIRED_MAJOR ||
308
gegl_minor_version < GEGL_REQUIRED_MINOR ||
309
gegl_micro_version < GEGL_REQUIRED_MICRO)
311
return g_strdup_printf
312
("GEGL version too old!\n\n"
313
"GIMP requires GEGL version %d.%d.%d or later.\n"
314
"Installed GEGL version is %d.%d.%d.\n\n"
315
"Somehow you or your software packager managed\n"
316
"to install GIMP with an older GEGL version.\n\n"
317
"Please upgrade to GEGL version %d.%d.%d or later.",
318
GEGL_REQUIRED_MAJOR, GEGL_REQUIRED_MINOR, GEGL_REQUIRED_MICRO,
319
gegl_major_version, gegl_minor_version, gegl_micro_version,
320
GEGL_REQUIRED_MAJOR, GEGL_REQUIRED_MINOR, GEGL_REQUIRED_MICRO);
323
#undef GEGL_REQUIRED_MAJOR
324
#undef GEGL_REQUIRED_MINOR
325
#undef GEGL_REQUIRED_MICRO
205
331
sanity_check_filename_encoding (void)