Skip to content

Commit

Permalink
Update to Maui Preview 11 (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow authored Dec 15, 2021
1 parent 3c721d2 commit 8f9781d
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion VERSIONS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ System.IO.UnmanagedMemoryStream release 4.3.0
System.Drawing.Common release 4.5.1
SharpVk release 0.4.2
Uno.UI release 3.7.6
Microsoft.WindowsAppSDK release 1.0.0-preview3
Microsoft.WindowsAppSDK release 1.0.0
Microsoft.Maui.Graphics release 6.0.101-preview.9.512
Microsoft.Windows.SDK.NET.Ref release 10.0.18362.18
Microsoft.AspNetCore.Components.Web release 6.0.0
Expand Down
11 changes: 8 additions & 3 deletions samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@
</ItemGroup>

<ItemGroup>
<!--<Reference Include="..\..\..\..\binding\SkiaSharp\bin\Debug\netstandard2.0\SkiaSharp.dll" />
<Reference Include="..\..\..\..\source\SkiaSharp.Views.Maui\SkiaSharp.Views.Maui.Controls.Compatibility\bin\Debug\net6.0-windows10.0.19041\SkiaSharp.Views.Maui.Controls.Compatibility.dll" />
<Reference Include="..\..\..\..\source\SkiaSharp.Views.Maui\SkiaSharp.Views.Maui.Controls\bin\Debug\net6.0-windows10.0.19041\SkiaSharp.Views.Maui.Controls.dll" />
<Reference Include="..\..\..\..\source\SkiaSharp.Views.Maui\SkiaSharp.Views.Maui.Core\bin\Debug\net6.0-windows10.0.19041\SkiaSharp.Views.Maui.Core.dll" />
<Reference Include="..\..\..\..\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\bin\Debug\net5.0-windows10.0.18362\SkiaSharp.Views.Windows.dll" />-->
<ProjectReference Include="..\..\..\..\binding\SkiaSharp\SkiaSharp.csproj" />
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views.Maui\SkiaSharp.Views.Maui.Controls.Compatibility\SkiaSharp.Views.Maui.Controls.Compatibility.csproj" />
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views.Maui\SkiaSharp.Views.Maui.Controls\SkiaSharp.Views.Maui.Controls.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.29-preview3" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.30" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
Expand All @@ -45,7 +50,7 @@

<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>

<Import Project="..\..\..\..\output\SkiaSharp\nuget\build\$(TargetFramework)\SkiaSharp.Local.targets" Condition="Exists('..\..\..\..\output\SkiaSharp\nuget\build\$(TargetFramework)\SkiaSharp.Local.targets')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.18" TargetingPackVersion="10.0.19041.18" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[1.0.0-preview3]">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[1.0.0]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.18" TargetingPackVersion="10.0.19041.18" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>

Expand Down
7 changes: 0 additions & 7 deletions samples/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<Project>

<!-- HACK: Do not copy the native bootstrap files -->
<Target Name="_RemoveWasdkBootstrapDll" BeforeTargets="ResolveReferences">
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)%(Extension)' == 'Microsoft.WindowsAppRuntime.Bootstrap.dll'" />
</ItemGroup>
</Target>

</Project>
2 changes: 1 addition & 1 deletion scripts/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ variables:
DOTNET_VERSION_PREVIOUS: 3.1.413
DOTNET_VERSION: 5.0.401
DOTNET_VERSION_PREVIEW: 6.0.100
DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.101/preview.10.json'
DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.101/preview.11.json'
VS_VERSION_PREVIEW: 17/release
CONFIGURATION: 'Release'
VM_IMAGE_WINDOWS: windows-2022
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Platform;
using SkiaSharp.Views.Maui.Platform;

using SKFormsView = SkiaSharp.Views.Maui.Controls.SKCanvasView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Platform;
using SkiaSharp.Views.Android;
using SkiaSharp.Views.Maui.Platform;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackagingGroup>SkiaSharp.Views.WinUI</PackagingGroup>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\binding\SkiaSharp\SkiaSharp.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using CoreGraphics;
using Foundation;
using ObjCRuntime;

#if __TVOS__
namespace SkiaSharp.Views.tvOS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using UIKit;
using ObjCRuntime;

#if __TVOS__
namespace SkiaSharp.Views.tvOS
Expand All @@ -15,14 +16,14 @@ public static class iOSExtensions

public static SKColor ToSKColor(this UIColor color)
{
System.nfloat r, g, b, a;
nfloat r, g, b, a;
color.GetRGBA(out r, out g, out b, out a);
return new SKColor((byte)(r * 255), (byte)(g * 255), (byte)(b * 255), (byte)(a * 255));
}

public static SKColorF ToSKColorF(this UIColor color)
{
System.nfloat r, g, b, a;
nfloat r, g, b, a;
color.GetRGBA(out r, out g, out b, out a);
return new SKColorF((float)r, (float)g, (float)b, (float)a);
}
Expand Down
8 changes: 5 additions & 3 deletions source/SkiaSharp.Views/SkiaSharp.Views.Mac/MacExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using AppKit;
using System;
using AppKit;
using CoreGraphics;
using ObjCRuntime;

namespace SkiaSharp.Views.Mac
{
Expand All @@ -9,14 +11,14 @@ public static class MacExtensions

public static SKColor ToSKColor(this NSColor color)
{
System.nfloat r, g, b, a;
nfloat r, g, b, a;
color.GetRgba(out r, out g, out b, out a);
return new SKColor((byte)(r * 255), (byte)(g * 255), (byte)(b * 255), (byte)(a * 255));
}

public static SKColorF ToSKColorF(this NSColor color)
{
System.nfloat r, g, b, a;
nfloat r, g, b, a;
color.GetRgba(out r, out g, out b, out a);
return new SKColorF((float)r, (float)g, (float)b, (float)a);
}
Expand Down

0 comments on commit 8f9781d

Please sign in to comment.