3 # Create menu/desktop entries for an application
4 # This is used by the IShellLink interface
6 # Copyright 2000 Alexandre Julliard
20 usage: wineshelllink options
23 --desktop create a desktop link
24 --menu create a menu entry
25 --path xx path to the application
26 --link xx name of link to create
27 --args xx command-line arguments for the application
28 --icon xx icon to display
29 --workdir xx working directory for the application
30 --descr xx application description
39 (--desktop) mode="desktop"; shift 1 ;;
40 (--menu) mode="menu"; shift 1 ;;
41 (--path) path=$2; shift 2 ;;
42 (--link) link=$2; shift 2 ;;
43 (--args) args=$2; shift 2 ;;
44 (--icon) icon=$2; shift 2 ;;
45 (--descr) descr=$2; shift 2 ;;
46 (--workdir) workdir=$2; shift 2 ;;
56 Name=`basename "$link"`
57 Exec=wine "$path" $args
61 [ -z "$workdir" ] || echo "Path=\"$workdir\""
62 [ -z "$xpmicon" ] || echo "Icon=$xpmicon"
69 Name=`basename "$link"`
70 Exec=wine "$path" $args
74 [ -z "$workdir" ] || echo "Path=\"$workdir\""
75 [ -z "$xpmicon" ] || echo "Icon=$xpmicon"
78 # copy the icon file to a specified dir and set xpmicon to the resulting path
83 mkdir -p "$dir/""`dirname "$link"`" || true
86 cp "$icon" "$dir/$link.xpm"
87 xpmicon="$dir/$link.xpm"
95 if [ -d "$HOME/.kde" ]
97 copy_icon "$HOME/.kde/share/applnk/Wine"
100 kde_entry > "$HOME/.kde/share/applnk/Wine/$link.kdelnk"
101 elif [ -d "$HOME/Desktop" ]
103 kde_entry > "$HOME/Desktop/$link.kdelnk"
109 if [ -d "$HOME/.gnome" ]
111 copy_icon "$HOME/.gnome/apps/Wine"
112 if [ $mode = "menu" ]
114 gnome_entry > "$HOME/.gnome/apps/Wine/$link.desktop"
115 elif [ -d "$HOME/.gnome-desktop" ]
117 gnome_entry > "$HOME/.gnome-desktop/$link.desktop"