On Thu, Sep 30, 2010 at 05:57:02PM +0200, Tamas TEVESZ wrote:
> 
> basically, as far as i can tell, debian has app definitions in its own 
> format,

Exactly. Each package that wants to put something in a menu drops a file
in /usr/share/menu. See our debian/wmaker.menu for an example of that.
Docs are at
http://alioth.debian.org/docman/view.php/30046/2/menu-one-file.html#ch3

> and then **magic**, and then it becomes the old-style menu in
> /etc/X11/WindowMaker/menu.hook or thereabouts.

Exactly.

> what happens in the **magic** part?

The magic involves the update-menus and install-menu programs (in the
menu package[1]), and our debian/wmaker.menu-method. Docs are at
http://alioth.debian.org/docman/view.php/30046/2/menu-one-file.html#s7.2

update-menus gets run by the post-installation and post-removal scripts
of any package that provides a menu entry or uses menus. It takes the
files in /usr/share/menu, combines them into one file (like the one
attached), and feeds that to the various scripts in /etc/menu-methods.
Most of those scripts use #!/usr/bin/install-menu.

debian/wmaker.menu-method is basically a configuration file for the
install-menu program. For each menu, it first expands "startmenu", then
all the children, then "endmenu". A submenu child gets expanded in the
same way, while a leaf child gets expanded based on its 'needs' field as
shown between "supported" and "endsupported".

> (also, how do other distros do this?)

No idea. It seems Ubuntu has Debian's menu package, I don't know if they
use it by default or have something different. Some distros might use
the freedesktop.org specification.[2]


[1] http://packages.debian.org/sid/menu
[2] http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html


-- 
To unsubscribe, send mail to [email protected].

Reply via email to