Iconcache additions
Rivo Laks
rivolaks at hot.ee
Sat Jul 21 11:21:48 CEST 2007
Ühel kenal päeval (laupäev 21 juuli 2007) kirjutas Alexander Neundorf:
> Hi Rivo,
>
> On Friday 20 July 2007 11:12, Rivo Laks wrote:
> > Hi
> >
> > The attached patch adds KDE4_ICONS_INSTALLED macro which updates mtime of
> > the hicolor icontheme directory, to make the icon cache update itself. It
> > also makes the KDE4_INSTALL_ICONS macro use it.
>
> So how does it have to be used ?
> install( FILES preview.png DESTINATION
> ${DATA_INSTALL_DIR}/dolphin/icons/hicolor/64x64/actions )
> kde4_update_iconcache(${ICON_INSTALL_DIR})
Yes, this one. The iconcache doesn't look at app dirs, only at the general
icon dir (share/icons/...), so the latter has to be updated.
> For kde4_install_icons() it will look like this, right ?
> kde4_install_icons(${ICON_INSTALL_DIR})
> kde4_update_iconcache(${ICON_INSTALL_DIR})
The kde4_install_icons() calls kde4_update_iconcache() itself, so that's not
really necessary.
Also, since we always want to update ${ICON_INSTALL_DIR}/hicolor, I changed
the kde4_update_iconcache() to do that without taking any arguments. So now
you just need to do
kde4_update_iconcache()
after using install() to install icons. If you use kde4_install_icons() you
needn't change anything.
> > On k-c-d it was suggested that this could be a generic FD.org macro, but
> > I'm not sure where to put it in that case. Should another file be created
> > in kdelibs/cmake/modules/? Or should it even go into cmake itself (in
> > that case I believe we also have to ship a kde version of it though)?
> >
> > As touch doesn't exist on windows, I create a temporary file in the theme
> > dir there and then delete it. It should work but I haven't tested it, so
> > if anyone could make sure it really does what it should, I'd appreciate
> > it.
> >
> > And finally, I'm open to renaming the macro if you have better ideas
> > (KDE4_UPDATE_ICONCACHE?) ;-)
>
> Yes, sounds better IMO (ok, I suggested it ;-)
Ok, changed :-)
> Does version for Windows (if it works under Windows) also work under UNIX ?
> If it does, I'd say there's no need to have two different versions.
It does. It is a bit hackish, but it's probably better than two versions
indeed, so I've changed that as well.
Updated patch attached.
Rivo
PS: I'm subscribed so you needn't CC me :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-iconcache.diff
Type: text/x-diff
Size: 1812 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070721/fb9c190d/attachment.bin
More information about the Kde-buildsystem
mailing list