[KDE/Mac] relocatable application bundles (with patch)

Jonas Bähr jonas.baehr at web.de
Sat Feb 9 01:28:39 CET 2008


Am 05.02.2008 um 13:04 schrieb Jonas Bähr:
> Am 04.02.2008 um 23:17 schrieb Harald Fernengel:
>> Hi,
>> Jonas Bähr wrote:
>>> # How it works:
>>> # $0 may be /Applications/Krusader.app/Contents/MacOS/krusader
>>> # ${0%/*/*} removes the last two elements from the path
>>> # => /Applications/Krusader.app/Contents is added to KDEDIRS
>>> #   => the app find its resorces
>>> KDEDIRS="${0%/*/*}:$KDEDIRS" $0.bin
>>> -----------8<-----------------------8<--------------
>> I think we should fix KStandardDirs to also look into the App  
>> Bundle's
>> path (e.g. with CFBundleGetMainBundle() and friends). Anyone
>> volunteers
>> to write a patch? :)
> Perhaps I'll find some time over the weekend...

Apparently I found some time ;-)

Here is a patch for kstandarddirs which adds support for bundled  
resources. I've found a Qt-only solution (no CoreFondation needed)  
which adds the "Contents" directory to KStandardDirs prefixes, just  
after KDEHOME and before the other locations. Application data in  
i.e. Krusader.app/Contents/share/apps/... is now found, where ever  
the application bundle is located :-)
Any opinions on this?

If this patch find it's way into kdelibs, I've got a question about  
the copyright. What is the policy in the case of a 32 lines patch?  
Should I list myself in the file header or not?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-4.0.0-kstandarddirs-macosx-bunlde.patch
Type: application/octet-stream
Size: 1201 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-mac/attachments/20080209/77d2d09a/attachment.obj 
-------------- next part --------------

> bye,
> Jonas
>> As Benjamin said, cmake is still a bit tricky, so getting the
>> information INTO the bundle currently has to be done manually during
>> installation.
>> Harald

More information about the kde-mac mailing list