libexec (Re: "kde5" or "kf5" ?)

David Faure faure+bluesystems at kde.org
Fri Feb 22 21:28:19 UTC 2013


On Friday 22 February 2013 18:45:45 Alexander Neundorf wrote:
> On Friday 22 February 2013, David Faure wrote:
> > On Thursday 21 February 2013 22:01:30 Alexander Neundorf wrote:
> > > Why not have a KF5DIRS variable ?
> > 
> > You keep thinking "KDE4, renamed" :-)
> > 
> > Think of KF5 as standalone libs on top of Qt. Do you currently have to set
> > a QCADIRS to use QCA, and a ATTICADIRS to use attica, and a SOPRANODIRS to
> > use soprano? No, because:
> > * executables are found using $PATH
> > * libs are found using $LD_LIBRARY_PATH (and fallbacks)
> > * plugins are found using $QT_PLUGIN_PATH
> > * data files are found using $XDG_DATA_DIRS
> > * global config files are found using $XDG_CONFIG_DIRS
> 
> So when I install kf5 libs to /opt/kf5-my-stuff/, I have to set
> QT_PLUGIN_PATH, XDG_DATA_DIRS, XDG_CONFIG_DIRS (and potentially PATH and
> LD_LIBRARY_PATH) to make the libraries work (if they have runtime
> dependencies), instead of setting only KF5DIRS=/opt/kf5-my-stuff/ , i.e.
> only one variable, and where I only need to know the install prefix, and
> not all the details ?

You're dreaming, when you say "instead of" :)
Surely you have to set PATH and LD_LIBRARY_PATH no matter what.

In fact, already now, when installing kdelibs (even 4) in a custom prefix, you 
*already* need to set PATH, LD_LIBRARY_PATH, XDG_DATA_DIRS, XDG_CONFIG_DIRS, 
QT_PLUGIN_PATH *and* KDEDIRS. 
Same thing for user stuff: XDG_DATA_HOME, XDG_CONFIG_HOME *and* KDEHOME.
So what I'm suggesting is to actually set *less* env vars in KF5 than in KDE 
SC 4.

And if you install any other library into that prefix, one that doesn't come 
from kf5 but from elsewhere, the vars will be exactly the same. No more "KDE 
stuff in a KDE island using KDE-specific env vars", but instead, the standard 
XDG env vars that make it possible for our stuff to be found by non KDE code 
too. GTK code, Qt code, python code ... can all find stuff (e.g. application 
desktop files, mimetype definitions, etc. etc.) in XDG_DATA_DIRS.

Let's talk about QT_PLUGIN_PATH: you want Qt to load plugins in $KDEDIRS?
I'll let you talk to the Qt developers, good luck :)

> Or, if KF5DIRS is no option, can we make it so that the build-time install
> location is checked first, so that a simple "make install" will lead to a
> working installation ?

Outside of the libexec special case: I don't see how, no.
Well, you could pass the expected full path to the plugin when calling 
QPluginLoader, but there are things that will require env vars (finding icons, 
mimetypes, desktop files etc.)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks



More information about the Kde-frameworks-devel mailing list