xdg question w.r.t cmake

Thiago Macieira thiago at kde.org
Tue Jul 24 04:10:48 BST 2007


Alexander Neundorf wrote:
>Hi,
>
>in FindKDE4Internal.cmake we have:
>
>_set_fancy(XDG_APPS_INSTALL_DIR            
> "${SHARE_INSTALL_PREFIX}/applications/kde4" ...
> _set_fancy(XDG_DIRECTORY_INSTALL_DIR  
> "${SHARE_INSTALL_PREFIX}/desktop-directories" ...
> _set_fancy(XDG_MIME_INSTALL_DIR           
> "${SHARE_INSTALL_PREFIX}/mime/packages" ...
>
>How related are these ?
>Would it make sense to give them a common base install directory, which
> could then be different from the KDE share install dir ?
>
>How related are shared-mime-info, the icon cache and e.g. xdg-utils ?
>Would it make sense to put the support stuff for them (macros, finding
> the executables, etc.) in one common FindXdg.cmake file ?

Reading of those is controlled by $XDG_CONFIG_DIRS and $XDG_DATA_DIRS (the 
latter, int his case). Which means that whatever we install to, it must 
be loaded in those variables.

Third-party applications are supposed to ignore those variables when 
installing and install directly to the default locations. If the user 
removed the default locations from $XDG_*_DIRS, he must have a very good 
reason to.

KDE, however, doesn't have to install to the default locations, since KDE 
is the desktop. So I say the code in the CMake script is correct: we 
install to KDE's installation prefix. Installing to a separate prefix 
doesn't seem very useful or interesting to us.

To be noted:
- like I said, $XDG_*_DIRS must include the location where KDE installed 
to. So if the user installed somewhere else than /usr or /usr/local, the 
variables MUST be modified. I just don't know if we should do it in 
startkde or if we should force the user to do it.

- the above point isn't really noticed because KStandardDirs doesn't 
properly respect the $XDG_*_DIRS variables: it uses $KDEDIRS too. To be 
strictly compliant with the spec, it should use the XDG variables only 
when looking up XDG things. This, however, introduces a Kiosk-related 
problem.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070724/2e512ebc/attachment.sig>


More information about the kde-core-devel mailing list