What is the difference between native and build-in libraries

Questions about Wine on Linux
Locked
dbdaniel42
Newbie
Newbie
Posts: 2
Joined: Fri Sep 23, 2016 10:21 pm

What is the difference between native and build-in libraries

Post by dbdaniel42 »

I'm running Arch Linux. I noticed that Wine already includes plenty of native libraries in the package. The only I am specifically looking at is msvcp140 as it is required to set winecfg to use the native one in order to run Battle.net. I am just confused what the difference is between native and built-in since the Wine package includes both. I even see it in the source code here:

http://source.winehq.org/git/wine.git/t ... s/msvcp140

So I am assuming it is open source. Why the need to have duplicate versions of all of these dlls?

I understand the difference between what winetricks downloads (official dlls from Microsoft that are not open source, I did a sha256hash on them and they are different.) I'm talking about the ones included in the wine package and what makes "native" different from "build-in"?
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: What is the difference between native and build-in libra

Post by dimesio »

"Native" libraries are Windows libraries. "Builtin" libraries are Wine's versions. Wine does not include ANY native libraries. Many apps/games install native libraries on their own. Battle.net is one of them.
dbdaniel42
Newbie
Newbie
Posts: 2
Joined: Fri Sep 23, 2016 10:21 pm

Re: What is the difference between native and build-in libra

Post by dbdaniel42 »

dimesio wrote:"Native" libraries are Windows libraries. "Builtin" libraries are Wine's versions. Wine does not include ANY native libraries. Many apps/games install native libraries on their own. Battle.net is one of them.
I understand that but simply creating a new wine bottle with WINEPREFIX=/home/user/new-wine winecfg automatically puts a ton of DLLs in the windows/system32 folder before you even install any programs. Are those the "Builtin" Wine versions?
User avatar
dimesio
Moderator
Moderator
Posts: 13208
Joined: Tue Mar 25, 2008 10:30 pm

Re: What is the difference between native and build-in libra

Post by dimesio »

Those are dummy dlls needed to fool apps/games that refuse to start if they don't find a dll in the expected place. If you look at the file sizes, you will see that they are abnormally small.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: What is the difference between native and build-in libra

Post by Bob Wya »

This was previously discussed in a forum thread here...

Most of the code for these libraries is in the native ELF .so version of the shared libraries. Typically Wine native libraries are installed in:
/usr/lib{32,64}/wine/

The Windows PE shared libraries are just entry point shims (providing the various API calls that library or executable supplies). Typically installed in:
/usr/lib{32,64}/wine/fakedlls/

Bob
Locked