Merge pull request #662 from Sergio0694/dev/update-win2d

Update Win2D dependency, remove RID graph workaround
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2023-11-22 22:06:16 +01:00
コミット 47d4954878
6ファイル変更
+24 -33

検索条件に一致するファイルはありません

+22 -10
ファイルの表示
@@ -261,19 +261,20 @@ jobs:
path: samples\ComputeSharp.SwapChain.Cli\bin\Release\net8.0\win-x64\publish\computesharp.cli.exe
if-no-files-found: error
# Also publish the Win2D sample (without NativeAOT, see https://github.com/dotnet/runtime/issues/84908)
# Also publish the Win2D sample (with R2R).
# Only doing this on x64 (to avoid a Roslyn issue).
- if: matrix.platform == 'x64'
name: Publish ComputeSharp.SwapChain.D2D1.Cli
name: Publish ComputeSharp.SwapChain.D2D1.Cli (R2R)
run: >
$env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_R2R='true';
$env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_AOT='false';
git clean -fdx;
msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish
/p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}}
/p:Configuration=Release /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}}
# Just like for the DX12 sample, run it on x64 to validate it works correctly.
# Temporarily disabled due to https://github.com/microsoft/Win2D/issues/935.
- if: false # matrix.platform == 'x64'
name: Run ComputeSharp.SwapChain.D2D1.Cli
# Just like for the DX12 sample, run it on x64 to validate it works correctly
- if: matrix.platform == 'x64'
name: Run ComputeSharp.SwapChain.D2D1.Cli (R2R)
run: >
$process = (Start-Process samples\ComputeSharp.SwapChain.D2D1.Cli\bin\x64\Release\net8.0-windows10.0.22621\win-x64\publish\computesharp.d2d1.cli.exe -PassThru);
sleep -Seconds 2;
@@ -282,15 +283,26 @@ jobs:
if ($process.ExitCode -lt 0 -and $process.ExitCode -ne -1073741510) { throw $process.ExitCode; }
return $process.ExitCode;
# Publish the Win2D sample with NativeAOT (just verifying the build, can't run this yet, see above)
# Publish the Win2D sample again (with NativeAOT)
- if: matrix.platform == 'x64'
name: Publish ComputeSharp.SwapChain.D2D1.Cli with NativeAOT
name: Publish ComputeSharp.SwapChain.D2D1.Cli (NativeAOT)
run: >
$env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_R2R='false';
$env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_AOT='true';
git clean -fdx;
msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish
/p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}}
/p:Configuration=Release /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}}
# Verify that the Win2D NativeAOT sample also runs correctly
- if: matrix.platform == 'x64'
name: Run ComputeSharp.SwapChain.D2D1.Cli (NativeAOT)
run: >
$process = (Start-Process samples\ComputeSharp.SwapChain.D2D1.Cli\bin\x64\Release\net8.0-windows10.0.22621\win-x64\publish\computesharp.d2d1.cli.exe -PassThru);
sleep -Seconds 2;
$process.CloseMainWindow() | Out-Null;
$process.WaitForExit();
if ($process.ExitCode -lt 0 -and $process.ExitCode -ne -1073741510) { throw $process.ExitCode; }
return $process.ExitCode;
# Publish the native library as a NativeAOT shared library
- name: Publish ComputeSharp.NativeLibrary
-3
ファイルの表示
@@ -9,9 +9,6 @@
<NoWarn>$(NoWarn);IDE0065</NoWarn>
<AssemblyName>computesharp.d2d1.cli</AssemblyName>
<ApplicationIcon>..\..\assets\icon.ico</ApplicationIcon>
<!-- Temporary workaround for RID graph change in .NET 8 (see https://github.com/microsoft/Win2D/issues/935) -->
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
<PropertyGroup>
-12
ファイルの表示
@@ -9,9 +9,6 @@
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<!-- Temporary workaround for RID graph change in .NET 8 (see https://github.com/microsoft/Win2D/issues/935) -->
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
<ItemGroup>
@@ -32,15 +29,6 @@
</ItemGroup>
<ItemGroup>
<!--
The Win2D package is directly referenced as a temporary workaround for the native binaries
using the non-portable RID (ie. "win10-"). If this is only pulled in transitively by the
ComputeSharp.WinUI dependency, <UseRidGraph> will not actually work correctly. So, using
an explicit reference until Win2D is updated to use the portable RID instead (ie. "win-").
-->
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.1.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231008000" />
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.2.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Core" Version="7.1.2" />
+1 -1
ファイルの表示
@@ -25,7 +25,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.1.0" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.1.1" />
</ItemGroup>
<ItemGroup>
+1 -1
ファイルの表示
@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231008000" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
</ItemGroup>
<ItemGroup>
-6
ファイルの表示
@@ -9,9 +9,6 @@
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<!-- Temporary workaround for RID graph change in .NET 8 (see https://github.com/microsoft/Win2D/issues/935) -->
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
<PropertyGroup>
@@ -59,9 +56,6 @@
</ItemGroup>
<ItemGroup>
<!-- Temporary Win2D package reference (see notes in the WinUI sample app .csproj file) -->
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" ExcludeAssets="build" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />