On 6/23/21 7:37 AM, RĂ©mi Bernon wrote:
I'm sending this as an RFC for now as there's been some discussion already about how to handle PE dependencies. I think the approach I'm taking here, by including FAudio headers directly in the source and loading it dynamically is the easiest way, and the least disruptive for building and running Wine, if not the cleanest. All the other solutions have higher friction, either on third party packages, or on the system distribution.
I don't think this is a very good idea, for several reasons:
* firstly, it's a huge amount of imported code;
* secondly, the headers can easily change in the near future (and FAudio has usually taken a loose approach to compatibility);
* thirdly, at least some distributions actually explicitly don't like this [1].
As I've said, I think it's past time we ask distributions what they actually want, and work with them accordingly. My guess is it'll be some variation of pkg-config.
Upstream FAudio now has a pure Win32 backend, which makes it much easier to build as PE. This was never a requirement, and this series should work too with the SDL2 backend, as it tries to load Wine Mono SDL2 and FAudio as a fallback after trying from the prefix system libraries.
It could help the transition though, and is going to be required anyway to support WMA decoding. Right now, with or without the Win32 backend, this would also introduce a functional regression as although supported by the new FAudio Win32 backend, it also depends on the WMA decoder MF transform to be implemented, which isn't the case yet in Wine.
What if Wine is built without MinGW? Do we care about that case? If we don't care about it for XAudio, what about other libraries?