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

Add WinUI support #2042

Merged
merged 33 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e1302ea
Added Uno.WinUI views and samples
anpin Feb 20, 2022
bf9323c
Skipping unmanged builds in CI
anpin Feb 21, 2022
c1817a3
Update azure-pipelines.yml
anpin Feb 23, 2022
50c9174
bumped Uno.WinUI to 4.1.9
anpin Apr 5, 2022
8dcbe5e
Removed unnecessary nuget configs
anpin Apr 7, 2022
8cac409
Delete NuGet.config
mattleibow Apr 9, 2022
8a2485e
misc adjustments
jeromelaban May 13, 2022
cbb577b
chore: Adjust catalyst build
jeromelaban May 14, 2022
6392ec8
chore: Add WinUI nuspec, adjust build and versions
jeromelaban May 17, 2022
aca094d
chore: Adjust for netstandad2.0 fallback
jeromelaban May 18, 2022
81fede9
chore: Remove unused global.json file
jeromelaban May 18, 2022
2fe7b3d
chore: Add comment in conditional compilation exclusion
jeromelaban May 18, 2022
dc14474
chore: Adjust for missing reference package
jeromelaban May 19, 2022
5dcf4f9
chore: Add missing projects from platform specific projects
jeromelaban May 19, 2022
a240eaa
chore: Adjust projects list for macOS
jeromelaban May 19, 2022
ab645bd
chore: Adjust nuspec
jeromelaban May 19, 2022
6624012
chore: Adjust namespace for uno.winui
jeromelaban May 19, 2022
13d901b
chore: Restore original wasm sample
jeromelaban May 21, 2022
91e8eab
chore: Add linux/mac specific projects
jeromelaban May 21, 2022
05ea73d
chore: Adjust linux winui
jeromelaban May 21, 2022
1e6facf
chore: Use net5 for linux build
jeromelaban May 21, 2022
d249e3e
chore: Adjust wasm sample
jeromelaban May 21, 2022
531d2ed
chore: Adjust wasm winui
jeromelaban May 21, 2022
1502c21
chore: Force uno sourcegen
jeromelaban May 21, 2022
45c98bb
chore: Adjust package name to match WinUI
jeromelaban May 21, 2022
1739443
chore: remove unused ifdef
jeromelaban May 21, 2022
37e12d0
chore: adjust winui ifdef
jeromelaban May 21, 2022
849fd33
chore: Don't update docs
jeromelaban May 21, 2022
59ac886
chore: Adjust reference build
jeromelaban May 22, 2022
0f5aed8
chore: Adjust samples references
jeromelaban May 22, 2022
afbb8fe
chore: Adjust AOT requirement, adjust langversion
jeromelaban May 22, 2022
edf021d
chore: Remove mobile targets from mac sample solutions
jeromelaban May 26, 2022
60f4c09
ci: Adjust for mac build
jeromelaban May 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -89,6 +89,7 @@ var TRACKED_NUGETS = new Dictionary<string, Version> {
{ "SkiaSharp.Views.Forms.WPF", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Forms.GTK", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Uno", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Uno.WinUI", new Version (1, 57, 0) },
{ "SkiaSharp.Views.WinUI", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Maui.Core", new Version (1, 57, 0) },
{ "SkiaSharp.Views.Maui.Controls", new Version (1, 57, 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>
jeromelaban marked this conversation as resolved.
Show resolved Hide resolved
<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