Locally "installed" Dll's

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Locally "installed" Dll's

Post by ischou »

Some small utilities that I sometimes run are often distributed as a .ZIP file containing the application and any DLL's that it depends on.

Windows has a behavior where if a DLL is located in the same directory as an application, windows preferentially chooses the DLL's in that directory over the same DLL that appears in C:\Windows\system32

Wine doesn't seem to behave this way (at least not version 1.3.28). Is that a correct assessment? If so, is there a rationale for why wine doesn't behave this way? And would it be difficult to implement? Or is there a setting to enable this type of behavior?

In my current case, I'd hate to have to install vcrun2008 in a perfectly good WINEPREFIX just to run one tiny application that came with its own dlls in its local directory.

Thanks.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Locally "installed" Dll's

Post by vitamin »

ischou wrote:Wine doesn't seem to behave this way (at least not version 1.3.28). Is that a correct assessment? If so, is there a rationale for why wine doesn't behave this way?
You are correct. If Wine's dll isn't compiled to prefer native Wine will always try it's own first. This is intentional.
ischou wrote:And would it be difficult to implement? Or is there a setting to enable this type of behavior?
It's already implemented. Add your program to winecfg applications (first tab). Select it, go to libraries tab, add whatever dlls you want it to use as native, and set them to "native" or "native, builtin" order.
ischou wrote:In my current case, I'd hate to have to install vcrun2008 in a perfectly good WINEPREFIX just to run one tiny application that came with its own dlls in its local directory.
Newer (msvc7.0+) runtimes are special. They use manifest files, and won't work if not properly installed, or manifests are missing...
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Re: Locally "installed" Dll's

Post by ischou »

I'll try the custom application setting when I get a chance.
vitamin wrote:Newer (msvc7.0+) runtimes are special. They use manifest files, and won't work if not properly installed, or manifests are missing...
There is a manifest file included with the little utility program and the vcrun2008 dlls. Is there something special I need to do to tell wine to use this manifest file for this application?
John Drescher

Locally "installed" Dll's

Post by John Drescher »

There is a manifest file included with the little utility program and the vcrun2008 dlls.  Is there something special I need to do to tell wine to use this manifest file for this application?
I would just use winetricks to install the vc2008 runtime.

John M. Drescher
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Locally "installed" Dll's

Post by vitamin »

ischou wrote:Is there something special I need to do to tell wine to use this manifest file for this application?
Try putting manifest and whatever msvc runtime dll(s) you need into the program's directory.
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Re: Locally "installed" Dll's

Post by ischou »

vitamin wrote:Try putting manifest and whatever msvc runtime dll(s) you need into the program's directory.
Yes, that's where they are. Wine doesn't seem to see them to choose them as native over the built-in ones.

Setting an application by application exception is okay except for the fact that I still need to install vcrun2008 and set different behavior for default versus this one utility app.

I was hoping to avoid having to install vcrun2008 into my WINEPREFIXES, as nothing else I had been running up to now needed it and the utility came with its own DLLs.

I guess I bite the bullet and install vcrun2008 into one of them.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Locally "installed" Dll's

Post by vitamin »

ischou wrote:Yes, that's where they are. Wine doesn't seem to see them to choose them as native over the built-in ones.
Have you added your msvc dlls under librareis tab? And have you set them to native?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Locally "installed" Dll's

Post by dimesio »

ischou wrote: Yes, that's where they are. Wine doesn't seem to see them to choose them as native over the built-in ones.
Try deleting or renaming the fake vc90 manifest in windows/winsxs/manifests.
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Re: Locally "installed" Dll's

Post by ischou »

dimesio wrote:
ischou wrote: Yes, that's where they are. Wine doesn't seem to see them to choose them as native over the built-in ones.
Try deleting or renaming the fake vc90 manifest in windows/winsxs/manifests.
Thanks! This accomplishes the behavior that I want.

Should wine include manifests to the built-in vc90 if they don't implement much of the required functionality?
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Locally "installed" Dll's

Post by dimesio »

ischou wrote:Thanks! This accomplishes the behavior that I want.
The downside to that method is that Wine will recreate those manifests every time you upgrade and the wineprefix is updated. You can prevent that by making that directory read-only.
Locked