New BinReloc patch

Arend van Beelen jr. arend at auton.nl
Sun Apr 18 20:30:30 BST 2004


On Sunday 18 April 2004 20:53, Waldo Bastian wrote:
> On Sun April 18 2004 19:35, Arend van Beelen jr. wrote:
> > Hi!
> >
> > Been a bit busy last few days, but I've created a new (significantly
> > reduced) patch for adding binary relocation support to KStandardDirs.
> > There are now two new API calls: executablePrefix() and libraryPrefix().
>
> Since this functionality is not available on all platforms I don't think it
> should be part of the API.
Why not? Qt is a cross-platform toolkit, but includes platform-specific API 
calls as well. Now using the platform-specific API's in Qt will result in a 
non-compiling program on other platforms, whereas with these calls your 
application will still work, only the call with return a null-string. The 
netto effect is that applications on Linux will automagically become binary 
relocatable, whereas non-Linux applications will remain not, just like they 
are now. Now if you're really against the idea the function may return a 
null-string, I could even let it return the hardcoded PREFIX as set during 
configure (which should be entirely legal as the binaries aren't 
relocatable...)

> Why does KIconLoader need to search in the path 
> of the application? Isn't it enough if the application prefix has been
> added in kstandarddirs?
You might be right here, it failed when I didn't when I tried it with Apollon, 
but the problem might be with Apollon here... I'll look into this some more.

-- 
Arend van Beelen jr.
http://www.liacs.nl/~dvbeelen

Yes, he died, but he will return to die with me again.
-- Nightwish




More information about the kde-core-devel mailing list