#!/bin/sh # # Create menu/desktop entries for an application # This is used by the IShellLink interface # # Copyright 2000 Alexandre Julliard # Modified Lav 2003 # - remove special support for windows manager's menu # Modified Lav 2004, 2005 # - rewrite all menu handlers (only for cp1251 wine encoding) # Modified Lav 2005 # - now local encoding used from WINE # # 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="" enc_to_utf8() { # -r possible only in ALT Linux iconv -r'_' -t UTF-8 } usage() { cat < "$HOME/.kde/share/applnk-alt/$SECT/$dirlink/$xlname.desktop" fi # Gnome if [ -d "$HOME/.gnome" ] ; then mkdir -p "$HOME/.gnome/apps-alt/$SECT/$dirlink" freedesktop_entry | enc_to_utf8 > "$HOME/.gnome/apps-alt/$SECT/$dirlink/$xlname.desktop" fi fi # Desktop if [ $mode = "desktop" ] ; then if [ -d "$HOME/Desktop" ] ; then freedesktop_entry | enc_to_utf8 > "$HOME/Desktop/$xlname.desktop" fi fi