wineshelllink: If defined add WINEPREFIX to the command line of the link.

Vitaliy Margolen wine-patch at kievinfo.com
Thu Feb 16 22:42:22 CST 2006


This time quoted content of the $WINEPRFIX variable. As-is it should be
big help to number of Wine testers that have separate prefixes setup for
lots of different apps they test.

ChangeLog:
wineshelllink: If defined add WINEPREFIX to the command line of the link.

 tools/wineshelllink |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
-------------- next part --------------
f82397ccff606da520b568820bcdbcba657c71eb
diff --git a/tools/wineshelllink b/tools/wineshelllink
index 10fa80b..d3bbe12 100755
--- a/tools/wineshelllink
+++ b/tools/wineshelllink
@@ -33,6 +33,7 @@ descr=""
 link=""
 path=""
 workdir=""
+prefix=""
 
 usage()
 {
@@ -82,6 +83,10 @@ if [ -z "$link" ] ; then
     usage
 fi
 
+if [ -n "$WINEPREFIX" ]; then
+    prefix="WINEPREFIX=\"$WINEPREFIX\" "
+fi
+
 kde_entry()
 {
     xname=`basename "$link"`
@@ -89,7 +94,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
@@ -103,7 +108,7 @@ gnome_entry()
     cat <<EOF
 [Desktop Entry]
 Name=$xname
-Exec=wine "$path" $args
+Exec=${prefix}wine "$path" $args
 Type=Application
 Comment=$descr
 EOF
@@ -117,7 +122,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