#!/bin/sh # # Create menu/desktop entries for an application # This is used by the IShellLink interface # # Copyright 2000 Alexandre Julliard # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # mode="" args="" menu="" icon="" descr="" link="" path="" workdir="" usage() { cat < /dev/null 2>&1 if [ $? = 0 -a $mode = "menu" ] then iconname="`basename "$link"`.xpm" dir="$HOME/.menu/icons" if [ -f "$icon" ] then mkdir -p "$dir" cp "$icon" "$dir/$iconname" xpmicon="$dir/$iconname" else xpmicon="" fi mdk_entry >> "$HOME/.menu/wine" update-menus > /dev/null 2>&1 fi # KDE if [ -d "$HOME/.kde" ] then copy_icon "$HOME/.kde/share/applnk/Wine" if [ $mode = "menu" ] then kde_entry > "$HOME/.kde/share/applnk/Wine/$link.kdelnk" # KDE 1.x kludge. Wake up KDE, if we can find kpanel running which kwmcom >/dev/null 2>/dev/null && \ ps u -C kpanel >/dev/null 2>/dev/null && \ kwmcom kpanel:restart elif [ -d "$HOME/Desktop" ] then kde_entry > "$HOME/Desktop/$link.kdelnk" # KDE 1.x kludge: wake up KDE, if we can find kfm running... which kfmclient >/dev/null 2>/dev/null && \ ps u -C kfm >/dev/null 2>/dev/null && \ kfmclient refreshDesktop fi fi if [ -d "$HOME/.kde2" ] then copy_icon "$HOME/.kde2/share/applnk/Wine" if [ $mode = "menu" ] then gnome_entry > "$HOME/.kde2/share/applnk/Wine/$link.desktop" elif [ -d "$HOME/Desktop2" ] then gnome_entry > "$HOME/Desktop2/$link.desktop" fi fi # Gnome if [ -d "$HOME/.gnome" ] then copy_icon "$HOME/.gnome/apps/Wine" if [ $mode = "menu" ] then gnome_entry > "$HOME/.gnome/apps/Wine/$link.desktop" elif [ -d "$HOME/.gnome-desktop" ] then gnome_entry > "$HOME/.gnome-desktop/$link.desktop" fi fi exit 0