[Wine] Wine menus - rebuilding, deleting

Gert van den Berg wine-users at mohag.net
Mon Feb 9 11:00:12 CST 2009


On Sun, Feb 8, 2009 at 7:24 PM, vitamin <wineforum-user at winehq.org> wrote:
>
> Gert van den Berg wrote:
>> 1. Is there some kind of command that will build a wine menu based on all the files in the standard locations (Start menu and Desktop)?
>
> I've used this to rebuild menu structure:
>
> Code:
>
> export WINEPREFIX=~/.wine; find $WINEPREFIX/drive_c/ -name "*.lnk" -exec wine winemenubuilder '{}' \;

Thanks. I build the following little script below (If someone finds it
useful. It is meant for my ~/.wine-* type of prefixes and ignores the
Desktop and icons. It does not do the standard .wine directory,
although it should be easy to add)

If I have some time I might do a Perl script that can handle separate
prefixes. (I would probably need to look inside the .desktop files...)
This should have the advantage of not breaking edits (such as using a
patched Wine-git for Warcraft...)

#!/bin/sh

find="/usr/bin/find"
wine="wine"
rm="/bin/rm"

# Clears menus - leaves desktop and icons alone
"$rm" -f $HOME/.config/menus/applications-merged/wine*
"$rm" -rf $HOME/.local/share/applications/wine


# Rebuild Start Menu for all prefixes starting with ".wine-"
for prefix in "$HOME/".wine-*; do
        WINEPREFIX="$prefix"
        export WINEPREFIX
        "$find" "$WINEPREFIX/drive_c/" -name '*/Start Menu/*.lnk'
-exec "$wine" winemenubuilder '{}' \; 2> /dev/null
done



More information about the wine-users mailing list