Skip to content

Commit

Permalink
Make sure ANGLE reaches the nugets (#2970)
Browse files Browse the repository at this point in the history
After #2950 landed, the native artifacts were not downloaded and included in the general native collection step.
  • Loading branch information
mattleibow authored Aug 16, 2024
1 parent 2961933 commit 054d48e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions binding/SkiaSharp/GRGlInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ private static GRGlInterface CreateGl ()

public static GRGlInterface CreateAngle ()
{
#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS) // a cross-platform TFM or windows-only
if (PlatformConfiguration.IsWindows) {
return CreateAngle (AngleLoader.GetProc);
} else {
// return null on non-DirectX platforms: everything except Windows
return null;
}
#else
return null;
#endif
}

// Create* (assemble)
Expand Down Expand Up @@ -112,6 +116,7 @@ internal static GRGlInterface GetObject (IntPtr handle) =>

//

#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS)
private static class AngleLoader
{
private static readonly IntPtr libEGL;
Expand Down Expand Up @@ -175,6 +180,7 @@ public static IntPtr GetProc (string name)
return proc;
}
}
#endif

#if __TIZEN__
private class EvasGlLoader
Expand Down
3 changes: 3 additions & 0 deletions scripts/azure-templates-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ stages:
- name: native_winui_x86_windows
- name: native_winui_x64_windows
- name: native_winui_arm64_windows
- name: native_winui_angle_x86_windows
- name: native_winui_angle_x64_windows
- name: native_winui_angle_arm64_windows
# Nano Server
- name: native_win32_x64_nanoserver_windows
# iOS
Expand Down
4 changes: 4 additions & 0 deletions source/SkiaSharp.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-'))">
<DefineConstants>$(DefineConstants);NETPLATFORM</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DependsOnNETStandard>true</DependsOnNETStandard>
</PropertyGroup>
Expand Down

0 comments on commit 054d48e

Please sign in to comment.