Skip to content

Commit

Permalink
Add WinUI support (#2042)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavel Anpin <[email protected]>
Co-authored-by: Jerome Laban <[email protected]>
  • Loading branch information
3 people committed May 27, 2022
1 parent 65f7e05 commit 7b3e8f3
Show file tree
Hide file tree
Showing 286 changed files with 7,615 additions and 41 deletions.
2 changes: 2 additions & 0 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ System.IO.UnmanagedMemoryStream release 4.3.0
System.Drawing.Common release 4.5.1
SharpVk release 0.4.2
Uno.UI release 4.0.8
Uno.WinUI release 4.0.13
Microsoft.WindowsAppSDK release 1.0.3
Microsoft.Maui.Graphics release 6.0.300-rc.2.1310
Microsoft.Windows.SDK.NET.Ref release 10.0.18362.22
Expand Down Expand Up @@ -75,6 +76,7 @@ SkiaSharp.Views.Forms nuget 2.88.1
SkiaSharp.Views.Forms.WPF nuget 2.88.1
SkiaSharp.Views.Forms.GTK nuget 2.88.1
SkiaSharp.Views.Uno nuget 2.88.1
SkiaSharp.Views.Uno.WinUI nuget 2.88.1
SkiaSharp.Views.WinUI nuget 2.88.1
SkiaSharp.Views.Maui.Core nuget 2.88.1
SkiaSharp.Views.Maui.Controls nuget 2.88.1
Expand Down
1 change: 1 addition & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ var TRACKED_NUGETS = new Dictionary<string, Version> {
{ "SkiaSharp.Views.Forms.WPF", new Version (1, 60, 0) },
{ "SkiaSharp.Views.Forms.GTK", new Version (1, 60, 0) },
{ "SkiaSharp.Views.Uno", new Version (1, 60, 0) },
{ "SkiaSharp.Views.Uno.WinUI", new Version (1, 60, 0) },
{ "SkiaSharp.Views.WinUI", new Version (1, 60, 0) },
{ "SkiaSharp.Views.Maui.Core", new Version (1, 60, 0) },
{ "SkiaSharp.Views.Maui.Controls", new Version (1, 60, 0) },
Expand Down
2 changes: 1 addition & 1 deletion cake/UpdateDocs.cake
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Task ("docs-update-frameworks")
var monikers = new List<string> ();
foreach (var id in TRACKED_NUGETS.Keys) {
// skip doc generation for Uno, this is the same as UWP and it is not needed
if (id.StartsWith ("SkiaSharp.Views.Uno"))
if (id.StartsWith ("SkiaSharp.Views.Uno") || id.StartsWith ("SkiaSharp.Views.Uno.WinUI") )
continue;
// skip doc generation for NativeAssets as that has nothing but a native binary
if (id.Contains ("NativeAssets"))
Expand Down
95 changes: 95 additions & 0 deletions nuget/SkiaSharp.Views.Uno.WinUI.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>

<!-- package -->
<id>SkiaSharp.Views.Uno.WinUI</id>
<title>SkiaSharp for Uno Platform</title>
<version>1.0.0</version>
<description>
SkiaSharp for Uno Platform is a set of views that can be used to draw on the screen.
</description>
<summary>
SkiaSharp for Uno Platform is a set of views that can be used to draw on the screen.
</summary>
<releaseNotes>
Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.
</releaseNotes>
<projectUrl>https://go.microsoft.com/fwlink/?linkid=868515</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?linkid=2130524</iconUrl>
<tags>ui uno xamarin graphics ios android catalyst windows winui macos cross-platform skiasharp</tags>

<!-- legal -->
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=868514</licenseUrl>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>

<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
<dependency id="SkiaSharp.NativeAssets.WebAssembly" version="1.0.0" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
</group>
<group targetFramework="net6.0-macos12.1">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
</group>
<group targetFramework="net5.0-windows10.0.18362">
<dependency id="Uno.WinUI" version="1.0.0" />
<dependency id="SkiaSharp" version="1.0.0" />
<dependency id="SkiaSharp.Views" version="1.0.0" />
</group>
</dependencies>

</metadata>
<files>

<!-- SkiaSharp.Views.Windows.dll -->
<file src="lib/netstandard2.0/SkiaSharp.Views.Windows.dll" />
<file src="lib/netstandard2.0/SkiaSharp.Views.Windows.pdb" />
<file src="lib/netstandard2.0/SkiaSharp.Views.Windows.xml" />
<file src="uno-runtime/webassembly/SkiaSharp.Views.Windows.dll" />
<file src="uno-runtime/webassembly/SkiaSharp.Views.Windows.pdb" />
<file src="uno-runtime/webassembly/SkiaSharp.Views.Windows.xml" />
<file src="uno-runtime/skia/SkiaSharp.Views.Windows.dll" />
<file src="uno-runtime/skia/SkiaSharp.Views.Windows.pdb" />
<file src="uno-runtime/skia/SkiaSharp.Views.Windows.xml" />
<file platform="windows" src="lib/net6.0-android/SkiaSharp.Views.Windows.dll" target="lib/net6.0-android3.0/SkiaSharp.Views.Windows.dll"/>
<file platform="windows" src="lib/net6.0-android/SkiaSharp.Views.Windows.pdb" target="lib/net6.0-android3.0/SkiaSharp.Views.Windows.pdb"/>
<file platform="windows" src="lib/net6.0-android/SkiaSharp.Views.Windows.xml" target="lib/net6.0-android3.0/SkiaSharp.Views.Windows.xml"/>
<file platform="windows" src="lib/net6.0-ios/SkiaSharp.Views.Windows.dll" target="lib/net6.0-ios13.6/SkiaSharp.Views.Windows.dll"/>
<file platform="windows" src="lib/net6.0-ios/SkiaSharp.Views.Windows.pdb" target="lib/net6.0-ios13.6/SkiaSharp.Views.Windows.pdb"/>
<file platform="windows" src="lib/net6.0-ios/SkiaSharp.Views.Windows.xml" target="lib/net6.0-ios13.6/SkiaSharp.Views.Windows.xml"/>
<file platform="windows" src="lib/net6.0-macos/SkiaSharp.Views.Windows.dll" target="lib/net6.0-macos12.1/SkiaSharp.Views.Windows.dll"/>
<file platform="windows" src="lib/net6.0-macos/SkiaSharp.Views.Windows.pdb" target="lib/net6.0-macos12.1/SkiaSharp.Views.Windows.pdb"/>
<file platform="windows" src="lib/net6.0-macos/SkiaSharp.Views.Windows.xml" target="lib/net6.0-macos12.1/SkiaSharp.Views.Windows.xml"/>
<file platform="windows" src="lib/net6.0-maccatalyst/SkiaSharp.Views.Windows.dll" target="lib/net6.0-maccatalyst13.5/SkiaSharp.Views.Windows.dll"/>
<file platform="windows" src="lib/net6.0-maccatalyst/SkiaSharp.Views.Windows.pdb" target="lib/net6.0-maccatalyst13.5/SkiaSharp.Views.Windows.pdb"/>
<file platform="windows" src="lib/net6.0-maccatalyst/SkiaSharp.Views.Windows.xml" target="lib/net6.0-maccatalyst13.5/SkiaSharp.Views.Windows.xml"/>

<!-- Fallback to avoid netstandard2.0 to be used incorrectly and cause hard to troubleshoot build errors -->
<file src="_._" target="lib/net5.0-windows10.0.18362/_._" />

<!-- the build bits -->
<file src="build/netstandard2.0/SkiaSharp.Views.Uno.WinUI.targets" />
<file src="build/netstandard2.0/SkiaSharp.Views.Uno.WinUI.targets" target="buildTransitive/netstandard2.0/SkiaSharp.Views.Uno.WinUI.targets" />

<!-- legal -->
<file src="LICENSE.txt" />

</files>
</package>
97 changes: 97 additions & 0 deletions samples/Basic/Uno.WinUI/.vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.Runtime.3.1",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.VisualStudio.Component.DockerTools",
"Microsoft.NetCore.Component.Web",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.VisualStudio.Component.TypeScript.4.0",
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
"Microsoft.VisualStudio.Component.JavaScript.Diagnostics",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.TextTemplating",
"Component.Microsoft.VisualStudio.RazorExtension",
"Microsoft.VisualStudio.Component.IISExpress",
"Microsoft.VisualStudio.Component.SQL.ADAL",
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
"Microsoft.VisualStudio.Component.Common.Azure.Tools",
"Microsoft.VisualStudio.Component.SQL.CLR",
"Microsoft.VisualStudio.Component.MSODBC.SQL",
"Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils",
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
"Microsoft.VisualStudio.Component.SQL.SSDT",
"Microsoft.VisualStudio.Component.SQL.DataSources",
"Component.Microsoft.Web.LibraryManager",
"Microsoft.VisualStudio.ComponentGroup.Web",
"Microsoft.VisualStudio.Component.Web",
"Microsoft.VisualStudio.Component.IntelliCode",
"Component.Microsoft.VisualStudio.LiveShare",
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
"Component.Microsoft.VisualStudio.Web.AzureFunctions",
"Microsoft.VisualStudio.ComponentGroup.AzureFunctions",
"Microsoft.VisualStudio.Component.Azure.Compute.Emulator",
"Microsoft.VisualStudio.Component.Azure.Storage.Emulator",
"Microsoft.VisualStudio.Component.Azure.ClientLibs",
"Microsoft.VisualStudio.Component.Azure.AuthoringTools",
"Microsoft.VisualStudio.Component.CloudExplorer",
"Microsoft.VisualStudio.ComponentGroup.Web.CloudTools",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.VisualStudio.Component.EntityFramework",
"Microsoft.VisualStudio.Component.AspNet45",
"Microsoft.VisualStudio.Component.AppInsights.Tools",
"Microsoft.VisualStudio.Component.WebDeploy",
"Microsoft.VisualStudio.Component.Wcf.Tooling",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites",
"Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools",
"Microsoft.VisualStudio.Component.Azure.Waverton",
"Microsoft.Component.Azure.DataLake.Tools",
"Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools",
"Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools",
"Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools",
"Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices",
"Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools",
"Microsoft.VisualStudio.Workload.Azure",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Graphics.Tools",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.ComponentGroup.Blend",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.Component.PortableLibrary",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.Component.NetFX.Native",
"Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard",
"Microsoft.VisualStudio.Component.Graphics",
"Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin",
"Microsoft.VisualStudio.ComponentGroup.UWP.Support",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
"Microsoft.VisualStudio.ComponentGroup.UWP.VC",
"Microsoft.VisualStudio.Workload.Universal",
"Component.OpenJDK",
"Microsoft.VisualStudio.Component.MonoDebugger",
"Microsoft.VisualStudio.Component.Merq",
"Component.Xamarin.RemotedSimulator",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine",
"Component.Xamarin",
"Component.Android.SDK28",
"Microsoft.VisualStudio.Workload.NetCrossPlat",
"Microsoft.VisualStudio.Workload.NetCoreTools",
"Microsoft.VisualStudio.ComponentGroup.Maui.All",
]
}
14 changes: 14 additions & 0 deletions samples/Basic/Uno.WinUI/SkiaSharpSample-vsmac.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"solution": {
"path": "SkiaSharpSample.sln",
"projects": [
"SkiaSharpSample.Shared\\SkiaSharpSample.Shared.shproj",

"SkiaSharpSample.Mobile\\SkiaSharpSample.Mobile.csproj",

"SkiaSharpSample.Wasm\\SkiaSharpSample.Wasm.csproj",

"SkiaSharpSample.Skia.Gtk\\SkiaSharpSample.Skia.Gtk.csproj",
]
}
}
Loading

0 comments on commit 7b3e8f3

Please sign in to comment.