On Sunday 18 September 2011 13:53:48 Thiago Macieira wrote:
> /usr/libexec/OrganisationName/ApplicationName
> just like /usr/share/OrganisationName/ApplicationName
Typical view that on top of Qt, there are only standalone applications.
It's time for Qt developers to realize that there can also be frameworks, or
more generally sets of integrated applications, on top of Qt. For instance
this is why I added a "GenericDataLocation" which returns /usr/share, so that
apps can actually share some stuff in there (by using the same subdir name),
instead of each being confined to their own private space.
Back to libexec: it's the same issue. Let's take KDE frameworks as an example,
since you know it. If a library class (KRun) wants to find "kdesu", it can't
be looking into the app-specific
/usr/libexec/OrganisationName/ApplicationName.
Harri and Sune: I agree, we don't need to put all helpers into the same dir,
but we do need a way to find "kdesu", "kioexec", "drkonqi", and so on from any
kde application for instance, so it's not just about per-application stuff
either. The "base directory" has to be global, with a framework name added to
it for instance.
So, I guess the lookup call has to specify the directory.
Maybe like
findExecutable("kdesu", "PREFIX/lib/kdesu/libexec")
but that makes the installation directory impossible to move afterwards, if
the prefix gets hardcoded into the library (I guess that's bad).
So it would be better to specify "kdesu/libexec" and let Qt look into known
prefixes, but indeed PATH and LD_LIBRARY_PATH don't really help, and a new var
sounds overkill...
OK, we can of course do this in KDE's KStandardDirs (returning the list of
paths for the calls to QStandardPaths::findExecutable to look into), i.e.
based on $KDEDIRS plus the hardcoded install prefix.
I was just hoping that a more generic solution is found in Qt, so that any lib
could install a helper binary and find it at runtime.
I guess that's just not possible, except with the compiled-in install prefix
as above.
--
David Faure, [email protected], http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback