Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Sourcing Update #2554

Open
vatsan-madhavan opened this issue Feb 12, 2020 · 14 comments
Open

Open Sourcing Update #2554

vatsan-madhavan opened this issue Feb 12, 2020 · 14 comments
Labels

Comments

@vatsan-madhavan
Copy link
Member

@vatsan-madhavan vatsan-madhavan commented Feb 12, 2020

We are happy to announce that we are open sourcing (#2553) native components in WPF – wpfgfx_cor3.dll and penimc_cor3.dll. With this, we have completed all planned open-sourcing work for WPF on .NET Core.

PresentationNative_cor3.dll and a small library used by wpfgfx_cor3.dll (bilinearspan.lib) contain proprietary content and are not being open sourced.

These sources have gone through extensive preparatory work – for e.g., sanitizing them to remove content that is not suitable for open-sourcing (e.g., internal-bug database references, user names etc.) of which there were several thousands of instances, identifying and excluding proprietary IP, and security cleanup (for which we used Semmle – please check it out at https://www.semmle.com).

In addition to this news, we have been making continuous improvements to .NET Core 3.1. You can see information about .NET Core January 2020 update here (dotnet/core#4119), and the February 2020 update will be out soon this month.

Cheers!
WPF Team
@dotnet/wpf-developers

@wjk

This comment has been minimized.

Copy link
Contributor

@wjk wjk commented Feb 12, 2020

Question for you. I understand PresentationNative has a dummy project file that extracts the prebuilt DLL from a NuGet package. AFAICT, there is no such mechanism for bilinearspan.lib. wpfgfx.vcxproj contains a direct ProjectReference to bilinearspan.vcxproj, which is of course missing. As such, this project cannot be built outside of Microsoft currently. Are there any plans to fix this, so that wpfgfx can be successfully built from source modulo this one file? Thanks!

@vatsan-madhavan

This comment has been minimized.

Copy link
Member Author

@vatsan-madhavan vatsan-madhavan commented Feb 12, 2020

There are build targets in place that transparently supply missing ProjectRefereces from prebuilt-libs or DLL’s. Wpfgfx Is designed to be buildable by anyone, and you should be able to do so right away.

@yekanchi

This comment has been minimized.

Copy link

@yekanchi yekanchi commented Feb 12, 2020

Is there any plan to open source (buildable of course!) components like Rehosted Workflow Desinger which are actually a presentation layer for workflows in wpf?

@rladuca

This comment has been minimized.

Copy link
Member

@rladuca rladuca commented Feb 12, 2020

@richlander Can you help answer @yekanchi ?

@rladuca

This comment has been minimized.

Copy link
Member

@rladuca rladuca commented Feb 12, 2020

@wjk Take a look at:

<Target Name="EnsureWpfProjectReference"

and then:

Name="ResolveMicrosoftDotNetWpfDncEngReferencesForCpp"

That should give you the basic idea of how the ProjectReference replacements work.

@cbaysinger

This comment has been minimized.

Copy link

@cbaysinger cbaysinger commented Feb 12, 2020

@jtbrower

This comment has been minimized.

Copy link

@jtbrower jtbrower commented Feb 12, 2020

Excellent, I love seeing any and all effort put in towards WPF improvements, including open sourcing it. Thank you for your efforts.

@SariDev

This comment has been minimized.

Copy link

@SariDev SariDev commented Feb 13, 2020

Congratulations!
It's great to see that WPF all open-sourcing work have been accomplished.

If I remember it correctly the initial goals of this repo were:

  • Open sourcing WPF
  • Writing tests and publishing them here
  • Fixing critical bugs while doing this

Is this project now in a state were feature suggestions from the community will be tackled for the .NET Core / WPF 5.0 release?

I would like to see an update for the WPF Roadmap and see what the WPF team is planning for V5.0 and if the community can collaborate with the team for V5.0 (new features, fixes, suggestions...).

The readme.md's status section would also need an update.

@Ruedii

This comment has been minimized.

Copy link

@Ruedii Ruedii commented Feb 14, 2020

Is there a way those remaining proprietary libraries can be blobed as included Restricted Freeware binaries to assist porting efforts?

Also is there any way the API documentation of the said binaries could be released so an alternative implementation can be written@

Finally is there a way that the Windows version of .Net, and it's remaining proprietary components have it's license adjusted to permit running under non-Microsoft platforms,.so it can be used in Binary form as Freeware for porting stacks.

@weltkante

This comment has been minimized.

Copy link

@weltkante weltkante commented Feb 25, 2020

@Ruedii what exactly do you mean? They are already distributed as binary blobs through a nuget archive downloaded during the build. However those DLL and lib are native code not .NET, it doesn't run on non-windows platforms in the first place - you'll have to replace them with a ported implementation just like you have to replace DirectX or HWND usage with ported implementations. Note that .NET Core on Linux/Mac doesn't even have the concept of C++ mixed mode assemblies so porting those parts requires rewriting them anyways.

For what its worth bilinearspan.lib has a corresponding source file so I don't know exactly why its distributed as a blob (maybe its a specially optimized version they distribute) - so this leaves only PresentationNative which isn't open sourced, and you'll just have to treat it like porting DirectX and HWND usage.

Yes, having the API to PresentationNative.dll documented would be "nice to have", but honestly its just text layout and you most likely won't want to reimplement the API anyways. I already looked at it and the API is highly coupled to the implementation, what you'll want to do is replace the text layout logic in C# to use a different library instead of reimplementing the PresentationNative API for the text layout engine.

@miloush

This comment has been minimized.

Copy link

@miloush miloush commented Feb 25, 2020

For what it's worth I believe the text layout is long overdue a major update anyway to bring it on par with latest DirectWrite (languages support, vertical text, color fonts, math etc.), so perhaps there is an opportunity there for having this bit replaced with open source.

I agree with @weltkante though that that would be of little help with running it on other platforms.

@vatsan-madhavan

This comment has been minimized.

Copy link
Member Author

@vatsan-madhavan vatsan-madhavan commented Feb 25, 2020

Is there a way those remaining proprietary libraries can be blobed as included Restricted Freeware binaries to assist porting efforts?

We will research this and get back to you 😄. I honestly don't know the answer, but I suspect that we'll figure this out as part of dotnet/core#2955.

bring it on par with latest DirectWrite (languages support, vertical text, color fonts, math etc.),

A lot of this can be done in DirectWriteForwarder + PresentationCore. What's in PresentationNative has to do with logical layout of lines, grids etc. I'm not saying that the latter is uninteresting or unimportant - just that there are a great many things related to text rendering can be improved now and PresentationNative (i.e. lack of its sources) would probably not hinder these improvements.

having the API to PresentationNative.dll documented would be "nice to have"

Apologies for being being the bearer of a "no" answer again about this 😞, but I'm afraid that PresentationNative related documentation is not something we expect to put out.

@rladuca

This comment has been minimized.

Copy link
Member

@rladuca rladuca commented Feb 25, 2020

A lot of this can be done in DirectWriteForwarder + PresentationCore.

Also in WpfGfx_cor3, see #2025.

@taylorann913

This comment has been minimized.

Copy link

@taylorann913 taylorann913 commented Feb 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.