[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gtk-update-icon-cahce, update-mime-database

From: Yevgen Muntyan
Subject: gtk-update-icon-cahce, update-mime-database
Date: Fri, 01 Feb 2008 00:06:02 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20071119 Iceape/1.1.7 (Debian-1.1.7-1)


Sorry for a long post, hope you can read through it.

I am seeking an advice on the following. Gtk applications
which have icons should install them into
and then call gtk-update-icon-cache (see below [*]
for a sample of makefile rules). This should be done
on install and uninstall. Similarly, if an application
has files for mime database, it should install those
files into /usr/share/mime/packages/ and then run
update-mime-database, also on install and uninstall.
Stuff like this is fairly hard (unless you find editing and easy), see for instance

My question is, is it possible to write some nifty
autoconf macros to make this task easy? I would
like to have some GTK_MISC_FILES macro in, which would make me able to put the
following into

GTK_ICONS = myicon.png

and have all that gtk-update-icon-cache stuff handled
automatically. I can't actually imagine how I would
specify 48x48/apps directory here, though I do know
I want something nice and simple ;)

I can write an autoconf macro which will make me able
to do (in

GTK_ICONS = myicon.png
GTK_ICONS_DIR = 48x48/apps

That GTK_ICONS_MAGIC_RULE would actually
expand to a make rule (though I am not sure if
I can have two rules in it). But it'd be inconvenient
(at least my experience with intltool macros is
rather terrible), and it would be impossible to have
a rule for mime files in the same (since
they also need install-data-hook target).

So, is it possible to have such a functionality without
changing automake?


[*] Here is a piece of my which installs an icon:

hicolor = $(datadir)/icons/hicolor
iconthemedir = $(hicolor)/48x48/apps
icontheme_DATA = ../moo/mooutils/pixmaps/medit.png

update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)$(hicolor)

   if echo "Updating icon cache" && $(update_icon_cache); then        \
       echo "Done.";                            \
   else                                    \
       echo "*** GTK icon cache not updated. After install, run this:";\
       echo $(update_icon_cache);                    \
   echo "Updating icon cache" && $(update_icon_cache) && echo "Done."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]