On Sat, Mar 29, 2008 at 9:31 PM, Erik de Castro Lopo mle+win@mega-nerd.com wrote:
Erik de Castro Lopo wrote:
It seems that this function makes no use of WINEDLLPATH. Shouldn't this function also search along the paths specified by the environment variable?
I've grepped the sources and the only place that looks at WINEDLLPATH is the funcion build_dll_path() in libs/wine/loader.c.
The function build_dll_path() fills in an array dll_paths with is private to that file. Looking at other things in that file it seems that stuff in that file is mostly related to loading the native Linux versions of the windows DLLs. Is that right? If so, it looks like some of the code in libs/wine/loader.c needs to be cloned or shared with the code in dlls/ntdll/loader.c.
I'm willing to hack up a fix for this if someone can point me in the right direction.
When an app needs a certain dll windows (and wine) search according to this: directory of exe, current directory, system directory (windows/system32), windows directory (windows), and PATH env var.
What I would do if I were you is make a copy of that other needed dll and put it in the applications exe directory.
From what I've seen WINEDLLPATH is for internal dll.so parts of wine.
After some playing around it seems you can pass in some linux env vars but PATH is special, and PATH is the one you would need to add your dlls path too. For example you can do this:
$ MYVAR="hi" wine cmd /C echo %MYVAR%
and youll get "hi" on the command line but if you try this (some trickery to maintain your linux path involved ):
$ PATH="Z:/path/to/dll/;%PATH%:$PATH" wine cmd /C echo %PATH%
Gives me atleast (wine .9.58): c:\windows\system32;c:\windows
Which is the exact same thing I get when I pass no env var:
$ wine cmd /C echo %PATH%
To have a temporary addition to path that is passed on the command line it seems you could do this in windows:
cmd /V:ON /C "PATH=Z:/my/temp/path;%PATH%&& echo !PATH! && yourcommnd.exe"
However that doesn't work in wine. Maybe because late variable expansion (/V:ON) isn't implemented yet, I'm not sure. (I actually had to escape the ! when trying in wine due to bash, that could have played a role too)
--John