Converting libraries and plugins to use gtk3



Any library that links to gtk+, gdk or gdk-pixbuf, that switches to gtk3
will need to have the new version be separate from and parallel
installable with the old version.

If this is not done then distributions can not ship applications still
using gtk2 linking to the older version of the library, as this change
is binary incompatible (and since you can't mix gtk2 and gtk3 in the
same app).

There are multiple things that have to be done (with examples from
gnome-desktop):

* Update all dependencies to gtk3 based libraries

* All pkg-config files need to be renamed  so that applications can
select which version they want. For instance from gnome-desktop-2.0.pc
to gnome-desktop-3.0.pc

* The include directory prefix need to be renamed so it doesn't conflict
with the old library. For instance from /usr/include/gnome-desktop-2.0
to /usr/include/gnome-desktop-3.0. (and the pc file updated to point
apps to this)

* The library name needs to change. For instance from 
libgnome-desktop-2.so to libgnome-desktop-3.so

* Some libraries ship with apps linked to the library, like e.g.
gst-launch or pango-querymodules. These need to be renamed (typically by
appending -3 or suchlike) so that both the old and new can coexist and
be used on the same system.

* Any config files or similar that you belive may change in a backwards
incompatible way in the future needs to be put in a new place that does
not conflict with the old one. 

Since this is also a generic ABI break this is a good time to do some
housekeeping that you don't normally have the possibility to do, for
instance:

* Remove deprecated functions
* Reset the so version to 0:0:0
* Break any ABI you wanted to change 
* Break API if its important (I'd recommend not changing API to much
  to make porting apps easy)

Applications that dynamically load modules that may use gtk (plugins for
instance) also need to change the location of the plugins as to not load
any plugin linking to gtk2 into a gtk3 app.

Similarly, any plugins for gtk3 apps (themes, pixbuf loaders, etc) need
to be built against gtk3 and put in the new place.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a hate-fuelled umbrella-wielding ex-con She's a beautiful nymphomaniac 
barmaid with an incredible destiny. They fight crime! 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]