wine menus

Vitaliy Margolen wine-devel at kievinfo.com
Sun Jun 24 15:14:47 CDT 2007


Damjan Jovanovic wrote:
> Hi
> 
> At the moment, wine builds fd.o menus by calling winemenubuilder and
> wineshelllink when shell32's IPersistFile_fnSave is invoked. This both
> misses menus copied directly into the menu directory without calling
> IPersistFile_fnSave, and provides no way to remove the menus when the
> app is uninstalled.
Installers that doing this sort of stuff are broken by design. They usually 
don't work well/at all on different language systems. Or the pre-made .lnk 
files won't work if app is installed into different location.

> Is it possible to add a new utility, or patch an existing utility like
> wineboot, to synchronize between wine's .lnk files in the windows
> directory and the fd.o menus, instead of using
> winemenubuilder/wineshelllink? Would a patch that does that be okay?

All you really need to synchronize is something like this:
find ~/.wine/drive_c/ -name "*.lnk" -exec wine winemenubuilder '{}' \;

However this is "one-way" and it won't remove uninstalled links (which is 
pretty easy to add). But this still does not account for number of things:
1. Desktop entries (they are tricky - winemenubuilder uses some "magic" to 
decide if the link should be placed on the desktop or menu).
2. Multiple WINEPREFIXes
3. User modified .desktop entries (added extra parameters, env variables, etc.)
4. User (re)moved Wine menu entries using KDE/Gnome/etc menu editor(s). I 
can see this can be a huge annoyance when user deletes something and it's 
coming back.


I think what you can do, is to move location where Wine creates it's XDG 
links and menu structure somewhere under WINEPREFIX itself. Not sure if this 
would help or not. Most installers won't remove directories if they are not 
empty, even if created during the install.

Vitaliy.



More information about the wine-devel mailing list