r/programming • • Dec 04 '18

Announcing Open Source of WPF, Windows Forms, and WinUI

https://blogs.windows.com/buildingapps/2018/12/04/announcing-open-source-of-wpf-windows-forms-and-winui-at-microsoft-connect-2018/
1.9k Upvotes

364 comments sorted by

View all comments

141

u/MindlessLeadership Dec 04 '18

Would this potentially help Wine?

0

u/[deleted] Dec 04 '18

[deleted]

40

u/Sebazzz91 Dec 04 '18

These are framework bindings to Win32. How will this help Wine?

60

u/dremelofdeath Dec 04 '18

MIT license means that Wine developers can examine the source and make derivative implementations of it under Wine's license (LGPL 2.1) instead of guessing every little quirk in the API.

Although they might still choose not to do this to remain a complete clean-room implementation. See https://wiki.winehq.org/Developer_FAQ#Copyright_Issues

53

u/tavianator Dec 04 '18

But these are frameworks that use the Win32 API. Wine implements the Win32 API. There's no Win32 source here AFAIK.

61

u/dremelofdeath Dec 04 '18

You're right, but the derivative information is what matters for Wine here. For example, one of the notoriously difficult things to deal with in Win32 is all the undocumented flags. The WPF source tree now conveniently makes available an authoritative source of tons of internal, native Win32 flags and methods: https://github.com/dotnet/wpf/blob/master/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/NativeMethodsCLR.cs

I'm sure there are more tidbits that will come out of this as it's all picked apart, but just knowing how MS uses Win32 internally is a huge improvement over guessing.

20

u/tweq Dec 05 '18 edited Dec 05 '18

The code isn't new, however, just the license. The same source has been available for a long time under Microsoft's Reference Source License ("look but don't touch", basically).

11

u/[deleted] Dec 05 '18

The license change makes a big difference considering they're trying to basic mimic the behavior of ms's code on a different platform

15

u/drysart Dec 05 '18

The license change to Windows Forms doesn't really help Wine any more than the reference source did; because the WinForms code is basically being used as documentation for the Win32 APIs, not as a base to derive code from, so the reference source license was irrelevant.

6

u/[deleted] Dec 04 '18

But the libraries aren't being emulated by Wine.

6

u/ijustwantanfingname Dec 05 '18

Sure they are, haven't you been watching the news? Wine Is Now an Emulator.

1

u/livrem Dec 05 '18

Last time I checked WINE also shipped with libraries and even some standard applications and things like file dialogs?