Common gotchas upgrading from 4.0 -> 4.2
Brian J. Tarricone
bjt23 at cornell.edu
Wed Nov 3 21:08:38 CET 2004
On 11/03/04 14:06, Olivier Fourdan wrote:
> On Wed, 2004-11-03 at 18:34 +0530, Biju Chacko wrote:
> > Doesn't the configure script handle this? Why doesn't it do the correct
> > thing if librsvg is not installed?
>
> It's a runtime dependency, one can't tell if librsvg and its gdk_pixbuf
> loader is available and working on the target system.
i'd really be interested in seeing what gdk_pixbuf_get_formats(), followed
by gdk_pixbuf_format_get_mime_types() returns on these systems that are
having problems. i'd like to verify that the problem is really that
gdk-pixbuf's loader cache says it supports svg when librsvg isn't installed.
if that is indeed the case, there are three valid options in my mind that don't
reduce functionality or make mainenance harder on our end:
1) include a small .svg icon with libxfcegui4 that gets installed in a known
location, and try to open it on XfceIconTheme's class_init(). if it fails,
we don't have SVG support.
2) do g_module_open("librsvg.so") and try to resolve a well-known symbol.
if this fails, we don't have SVG. there's a possibility that this might
return false negatives in some corner cases (librsvg.so isn't in a normal
system location, but the gdk-pixbuf loader knows how to find it via the
linker's -rpath argument). also, if someone writes a pixbuf loader for
gdk-pixbuf that doesn't use librsvg, this will give a false negative.
3) run gdk-pixbuf-query-loaders and grep the output for "image/svg". i
don't know if all distros ship with this in a normal accessible location,
though. this also has the potential to be a bit slow, since we'd
essentially have to run strstr() on a ~2.5kB string.
i prefer #2 for its simplicity, but #1 for its accuracy. i don't really
like #3, but it _is_ 100% accurate, assuming gdk-pixbuf-query-loaders is
available.
i'd rather fix this from a user-transparent "find out how to do the right
thing" perspective. thoughts?
-brian
More information about the Xfce4-dev
mailing list