winetricks icon indicating copy to clipboard operation
winetricks copied to clipboard

Media Foundation needs enhancements

Open Ahmed-E-86 opened this issue 6 years ago • 51 comments

When I try installing MF using Winetricks, it installs only mf.dll file (native, builtin), but some games needs more files like:

mferror.dll mfplat.dll mfreadwrite.dll msmpeg2adec.dll msmpeg2vdec.dll sqmapi.dll

You can get more information from this comment from a related issue: https://github.com/ValveSoftware/Proton/issues/1102#issuecomment-419678627

Ahmed-E-86 avatar Nov 12 '18 15:11 Ahmed-E-86

I've already tried to make winetricks PR, but I've failed to find KB update or other download containing this files. Original media foundation downloads contains delta files except for win10. But win10 versions do not works with wine.

lieff avatar Nov 12 '18 18:11 lieff

What if I changed Windows version to 10 from Wine configurations and tried win10 version of MF. Would that make any difference?

Ahmed-E-86 avatar Nov 12 '18 20:11 Ahmed-E-86

Nope, It uses functions unsupported by wine like RtwqUnlockWorkQueue.

lieff avatar Nov 12 '18 21:11 lieff

Any new news regarding MF?

Ahmed-E-86 avatar Dec 15 '18 14:12 Ahmed-E-86

I'm not aware of a download for it, so no.

austin987 avatar Dec 15 '18 16:12 austin987

https://github.com/jzengc/wine/tree/proton_3.16_mf

f0rmatme avatar Jan 25 '19 13:01 f0rmatme

@james-munson Thanks, but did you try it yourself?

Ahmed-E-86 avatar Jan 25 '19 14:01 Ahmed-E-86

Lutris seem to use win7-sp1 for extraction of the files -> https://lutris.net/games/install/10999/view . Maybe that could help.

Glog78 avatar Jan 25 '19 16:01 Glog78

So I added what I could from win7sp1, but still missing several. If you're affected, please test https://github.com/austin987/winetricks/commit/5d653bfd9f2282a1d77edd3e4ed71205be1c4894

austin987 avatar Feb 05 '19 08:02 austin987

There is one workaround works for some games like Danganronpa V3: Killing Harmony, Resident Evil 7 Biohazard, Resident Evil 2 Remake, and Darksiders Warmastered Edition.

So this MF workaround provides:

mf.dll mfplate.dll mfreadwrite.dll wmadmod.dll wmvdecod.dll

and there is another MF workaround provides:

mf.dll mferror mfplate.dll mfreadwrite.dll msmpeg2adec.dll msmpeg2vdec.dll sqmapi.dll

and there is also some registry files needs to be imported as well, and that works with other games like Shadows: Awakening, and Thronebreaker: The Witcher Tales ... etc

All the info are in this post >>> https://github.com/ValveSoftware/Proton/issues/1102#issuecomment-419678627

And someone upload a prefix for Thronebreaker: The Witcher Tales can be found here >>> https://github.com/doitsujin/dxvk/issues/728#issuecomment-434885586

And there is also some games that need MF + WMP, and WMP can only be installed in 32bit prefix.

All the list of games that requires MF, WMP, or quartz can be found here >>> https://github.com/ValveSoftware/Proton/issues/1464

Ahmed-E-86 avatar Feb 05 '19 14:02 Ahmed-E-86

So I added what I could from win7sp1, but still missing several. If you're affected, please test austin987@5d653bf

Is that commit in the main branch?

Ahmed-E-86 avatar Feb 05 '19 22:02 Ahmed-E-86

No, it's in a branch on my fork.

austin987 avatar Feb 05 '19 22:02 austin987

No, it's in a branch on my fork.

If I use git from terminal to download this branch what it will be?

Ahmed-E-86 avatar Feb 05 '19 22:02 Ahmed-E-86

https://raw.githubusercontent.com/austin987/winetricks/5d653bfd9f2282a1d77edd3e4ed71205be1c4894/src/winetricks

austin987 avatar Feb 05 '19 22:02 austin987

It doesn't has these files:

msmpeg2adec.dll msmpeg2vdec.dll mferror

Ahmed-E-86 avatar Feb 05 '19 23:02 Ahmed-E-86

Yes, that's noted in the commit. Those are in win7sp1, or anywhere else public I found.

austin987 avatar Feb 06 '19 01:02 austin987

Please pardon me. I have worked it for a day to publish this. https://gist.github.com/yooohoohello/fde4f9ed6aafc96a32c0d2739389ea7f

yooohoohello avatar Jul 24 '19 11:07 yooohoohello

@austin987 It would be somewhat heavy handed, but you can likely extract the necessary DLLs from one of Microsoft’s Windows 10 developer VM downloads:

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

A Windows 10 ISO download might also work.

ryao avatar Sep 14 '19 15:09 ryao

@ryao speaking of VMs, there are Win7 & Win8.1 VMs on https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

develop7 avatar Sep 14 '19 21:09 develop7

TheOuterWorlds just spits mfplat.dll.MFGetConfigurationDWORD unimplemented function error.

jarrard avatar Oct 25 '19 09:10 jarrard

@jarrard could you try installing mf using:

https://github.com/Kreytricks/kreytricks/commit/11eb449f820b137410132e982fcdbf96683f539d

Kreyren avatar Oct 25 '19 10:10 Kreyren

@jarrard also make a winebug and attach a full log if mfplat.dll.MFGetConfigurationDWORD is not already reported for referenced wineapp

Kreyren avatar Oct 25 '19 10:10 Kreyren

No, it is not a valid upstream bug.

austin987 avatar Oct 25 '19 11:10 austin987

@jarrard could you try installing mf using:

Kreytricks@11eb449

I used this url which installs MF correctly and works for TOW. https://github.com/z0z0z/mf-install

jarrard avatar Oct 26 '19 04:10 jarrard

No, it is not a valid upstream bug.

@austin987 elaborate? afaik wine has mfplat and based on provided info it lacks mfplat.dll.MFGetConfigurationDWORD

@jarrard

I used this url which installs MF correctly and works for TOW. https://github.com/z0z0z/mf-install

could you try provided MR too? It has z0z0z's mirror implemented and is fetching the libraries from M$ files that we can download and cabextract.

Kreyren avatar Oct 26 '19 04:10 Kreyren

could you try provided MR too?

To be honest I don't really know how to use that modified code with winetricks. Manually edit the winetricks script file?

jarrard avatar Oct 26 '19 04:10 jarrard

@jarrard referencing https://github.com/Winetricks/winetricks/wiki/How-to-make-a-side-fork

ping me on irc.freenode.net as kreyren if you need a help + testing is appreciated

Kreyren avatar Oct 26 '19 05:10 Kreyren

afaik wine has mfplat and based on provided info it lacks mfplat.dll.MFGetConfigurationDWORD

When trying to play Catherine Classic, I get a crash with an error about that symbol being missing even though I'm using mf-installcab or kreytricks. mf-install doesn't make it crash but it doesn't fix the game either. Am I doing something wrong or is this just a game that these fixes don't cover?

chewi avatar Oct 26 '19 12:10 chewi

For reference: https://bugs.winehq.org/show_bug.cgi?id=47758

The mixture of native and builtin doesn't work. If the problem is introduced by native components, it's generally not a Wine bug, particularly when you've overridden this many dlls.

Anyway, if you're using native mfplat.dll, by definition it can't be a Wine bug. It's a bug in the dlls themselves, or more likely, a sign that they can't be made to work on Wine standalone. Much like overriding IE dlls is hard and never quite worked properly, compared to something like vcrun*, which Microsoft explicitly made available as a standalone component.

austin987 avatar Oct 26 '19 15:10 austin987

DISCLAIMER: I'm not sure what i'm doing, trying to share my results so take that with a grain of salt since my results should be verified.

@chewi

I get a crash with an error about that symbol being missing even though I'm using mf-installcab or kreytricks. mf-install doesn't make it crash but it doesn't fix the game either.

I'm not sure why but z0z0z's script seems to have different outcome from my kreytricks implementation even when i'm sure that i've done the same thing as z0z0z so you might want to try that.. I guess that some combination of these libs (since my implementation is trying to extract them from M$ installers) or by using winetricks changes something in the result.

The results on my end were that z0z0z's script made wineapp working where my patch didn't. (thanks for testing though, i'm investigating why atm)

z0z0z's repo: https://github.com/z0z0z/mf-install

EDIT: For these libraries upstream states that these are grabbed from M$ where i don't have reliable way to check what the libraries are actually doing, waiting for WhiteHat to check them

Also lutris seems to provide different mfplat.dll which shasum doesn't match the one that we have available so it may be some winelib with a hack?

Ping @tannisroot requesting more info ^


@austin987

Anyway, if you're using native mfplat.dll, by definition it can't be a Wine bug. It's a bug in the dlls themselves, or more likely, a sign that they can't be made to work on Wine standalone.

Based on my testing it seems that wineapps that require mf also need much more then just mfplat where it seems that wine doesn't have stubs to capture which functions are called. (Makng the debugging harder)

I tried to export mfplat only and disable other mf-related libraries which just results in no output from wine and then trying to capture which makes the difference, but so far i spent 5 hours on it and got nowhere unless all libs are used.


As a sidenote winedevs that i've talked to seems to believe that this should be fixed in mono where some bug for tracking this should be made since it can be anything from small patch to a large hell (based on info that i've gathered)

Kreyren avatar Oct 26 '19 17:10 Kreyren