Don't override WINEDLLPATH in winewrapper

Francois Gouget fgouget at free.fr
Sun Feb 1 14:56:04 CST 2004


To start Winelib applications winemaker generates a script that does:

export WINEDLLPATH=$WINEDLLPATH:.
...
exec wine "$appname" "$@"

The problem is that wine is a symlink to tools/winewrapper which does:

...
WINEDLLPATH="$topdir/dlls:$topdir/programs"
...

So the winewrapper script overrides our WINEDLLPATH and we don't find
the Winelib app.

Here's a patch to avoid this problem:

Changelog:

 * tools/winewrapper

   Preserve the original WINEDLLPATH so we can load out-of-tree Winelib
applications.


Index: tools/winewrapper
===================================================================
RCS file: /var/cvs/wine/tools/winewrapper,v
retrieving revision 1.8
diff -u -r1.8 winewrapper
--- tools/winewrapper	6 Nov 2003 01:17:56 -0000	1.8
+++ tools/winewrapper	1 Feb 2004 20:10:57 -0000
@@ -68,7 +68,12 @@
 else
   LD_LIBRARY_PATH="$topdir/libs"
 fi
-WINEDLLPATH="$topdir/dlls:$topdir/programs"
+if [ -n "$WINEDLLPATH" ]
+then
+  WINEDLLPATH="$topdir/dlls:$topdir/programs:$WINEDLLPATH"
+else
+  WINEDLLPATH="$topdir/dlls:$topdir/programs"
+fi
 WINESERVER="$topdir/server/wineserver"
 WINELOADER="$topdir/loader/wine"
 export LD_LIBRARY_PATH WINEDLLPATH WINESERVER WINELOADER


-- 
Francois Gouget
fgouget at codeweavers.com



More information about the wine-patches mailing list