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

Alexander Neundorf neundorf at kde.org
Sun Feb 24 10:11:17 UTC 2013


On Sunday 24 February 2013, Oswald Buddenhagen wrote:
> On Sat, Feb 23, 2013 at 11:25:59PM +0100, David Faure wrote:
> > On Saturday 23 February 2013 19:05:34 Alexander Neundorf wrote:
> > > At configure/cmake time, we can configure e.g. the data install dir,
> > > the lib  install dir and the install prefix into the library.
> > > At that point, we can check whether both are installed into the same
> > > prefix,  independent of whether absolute or relative paths are used for
> > > installing.
> > > 
> > > So we can configure the relative path to the data and to the library
> > > into the  library, so we have then e.g. "share/kio/" and
> > > "lib/<multiarchdir>/" in the library.
> > > At library runtime we can find out the location of the library, check
> > > that it  contains the configured relative library install path, and if
> > > so, remove that part, and we have the install prefix at library
> > > runtime. (I can create an example for that)
> > 
> > OK, I understand the idea now. [...]
> > 
> > The other problem I see, is where to put all that code.
> 
> QString QLibraryInfo::libraryFilePath(void *codePtr);
> QString QLibraryInfo::libraryDirPath(void *codePtr);
> 
> the current implementation of QLibraryInfo::location() to hard-code
> absolute paths is totally sick and should be changed. patches welcome.

See my other mail here in this thread, it has an example attached.
dladdr() works here for me, and it should also work on FreeBSD, OSX and maybe 
SunOS.
For Windows I found GetModuleHandleEx()

Alex


More information about the Kde-frameworks-devel mailing list