Add WINEPREFIX to the command in wineshelllink

Vitaliy Margolen wine-patch at kievinfo.com
Mon Oct 31 22:29:55 CST 2005



Vitaliy Margolen

changelog:
 - Add WINEPREFIX to the command in wineshelllink
-------------- next part --------------
Index: tools/wineshelllink
===================================================================
RCS file: /home/wine/wine/tools/wineshelllink,v
retrieving revision 1.19
diff -u -p -r1.19 wineshelllink
--- tools/wineshelllink	9 May 2005 09:28:05 -0000	1.19
+++ tools/wineshelllink	1 Nov 2005 04:26:22 -0000
@@ -28,6 +28,7 @@ descr=""
 link=""
 path=""
 workdir=""
+prefix=""
 
 usage()
 {
@@ -77,6 +78,10 @@ if [ -z "$link" ] ; then
     usage
 fi
 
+if [ -n "$WINEPREFIX" ]; then
+    prefix="WINEPREFIX=$WINEPREFIX "
+fi
+
 kde_entry()
 {
     xname=`basename "$link"`
@@ -84,7 +89,7 @@ kde_entry()
 # KDE Config File
 [KDE Desktop Entry]
 Name=$xname
-Exec=wine '$path' $args
+Exec=${prefix}wine '$path' $args
 Type=Application
 Comment=$descr
 EOF
@@ -98,7 +103,7 @@ gnome_entry()
     cat <<EOF
 [Desktop Entry]
 Name=$xname
-Exec=wine "$path" $args
+Exec=${prefix}wine "$path" $args
 Type=Application
 Comment=$descr
 EOF
@@ -112,7 +117,7 @@ mdk_entry()
     section=`dirname "$link"`
     [ -z "$icon" ] || xicon="icon=\"$xpmicon\""
     pathmenu=`echo "$path" | sed 's+\\\\+\\\\\\\\+g'`
-    echo "?package(local.Wine):needs=x11 section=\"/Wine/$section\" title=\"$base\" longtitle=\"$descr\" command=\"wine '$pathmenu' $args\" $xicon"
+    echo "?package(local.Wine):needs=x11 section=\"/Wine/$section\" title=\"$base\" longtitle=\"$descr\" command=\"${prefix}wine '$pathmenu' $args\" $xicon"
 }
 
 # copy the icon file to a specified dir and set xpmicon to the resulting path


More information about the wine-patches mailing list