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. on windows, this should be doable with GetMappedFileName(), on linux by reading /proc/self/maps. i don't yet know how to handle mac os and some other potentially interesting unixes, but it should be possible to steal the solutions from lsof. for qnx and some other embedded platforms the question might be somewhat irrelevant (it's unlikely that somebody would want relocatable packages for them). _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel