Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# dependencies
mdoc release 5.8.3
mdoc release 5.8.9
harfbuzz release 2.8.2
skia release m88
xunit release 2.4.1
Expand Down
94 changes: 56 additions & 38 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.3.2
#addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1

#tool nuget:?package=mdoc&version=5.8.3
#tool nuget:?package=mdoc&version=5.8.9
#tool nuget:?package=xunit.runner.console&version=2.4.1
#tool nuget:?package=vswhere&version=2.8.4

Expand Down Expand Up @@ -450,7 +450,7 @@ Task ("samples")
{ "xamarin.forms.windows", "x86" },
};

void BuildSample (FilePath sln)
void BuildSample (FilePath sln, bool dryrun)
{
var platform = sln.GetDirectory ().GetDirectoryName ().ToLower ();
var name = sln.GetFilenameWithoutExtension ();
Expand All @@ -470,12 +470,19 @@ Task ("samples")
buildPlatform = platformMatrix [platform];
}

Information ($"Building {sln} ({platform})...");

RunNuGetRestorePackagesConfig (sln);
RunMSBuild (sln, platform: buildPlatform);
if (dryrun) {
Information ($" BUILD {sln}");
} else {
Information ($"Building sample {sln} ({platform})...");
RunNuGetRestorePackagesConfig (sln);
RunMSBuild (sln, platform: buildPlatform);
}
} else {
Information ($"Skipping {sln} ({platform})...");
if (dryrun) {
Information ($" SKIP (NS) {sln} (not supported)");
} else {
Information ($"Skipping sample {sln} ({platform})...");
}
}
}

Expand Down Expand Up @@ -511,38 +518,49 @@ Task ("samples")
Information (" " + sln);
}

foreach (var sln in solutions) {
// might have been deleted due to a platform build and cleanup
if (!FileExists (sln))
continue;

var name = sln.GetFilenameWithoutExtension ();
var slnPlatform = name.GetExtension ();

if (string.IsNullOrEmpty (slnPlatform)) {
// this is the main solution
var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln");
if (!variants.Any ()) {
// there is no platform variant
BuildSample (sln);
// delete the built sample
CleanDirectories (sln.GetDirectory ().FullPath);
} else {
// skip as there is a platform variant
}
} else {
// this is a platform variant
slnPlatform = slnPlatform.ToLower ();
var shouldBuild =
(isLinux && slnPlatform == ".linux") ||
(isMac && slnPlatform == ".mac") ||
(isWin && slnPlatform == ".windows");
if (shouldBuild) {
BuildSample (sln);
// delete the built sample
CleanDirectories (sln.GetDirectory ().FullPath);
foreach (var dryrun in new [] { true, false }) {
if (dryrun)
Information ("Sample builds:");

foreach (var sln in solutions) {
// might have been deleted due to a platform build and cleanup
if (!FileExists (sln))
continue;

var name = sln.GetFilenameWithoutExtension ();
var slnPlatform = name.GetExtension ();

if (string.IsNullOrEmpty (slnPlatform)) {
// this is the main solution
var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln");
if (!variants.Any ()) {
// there is no platform variant
BuildSample (sln, dryrun);
// delete the built sample
if (!dryrun)
CleanDirectories (sln.GetDirectory ().FullPath);
} else {
// skip as there is a platform variant
if (dryrun)
Information ($" SKIP (PS) {sln} (has platform specific)");
}
} else {
// skip this as this is not the correct platform
// this is a platform variant
slnPlatform = slnPlatform.ToLower ();
var shouldBuild =
(isLinux && slnPlatform == ".linux") ||
(isMac && slnPlatform == ".mac") ||
(isWin && slnPlatform == ".windows");
if (shouldBuild) {
BuildSample (sln, dryrun);
// delete the built sample
if (!dryrun)
CleanDirectories (sln.GetDirectory ().FullPath);
} else {
// skip this as this is not the correct platform
if (dryrun)
Information ($" SKIP (AP) {sln} (has alternate platform)");
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion cake/UpdateDocs.cake
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ void CopyChangelogs (DirectoryPath diffRoot, string id, string version)

dllName += ".breaking";
}
var changelogPath = (FilePath)$"./logs/changelogs/{id}/{version}/{dllName}.md";
var changelogPath = (FilePath)$"./changelogs/{id}/{version}/{dllName}.md";
EnsureDirectoryExists (changelogPath.GetDirectory ());
CopyFile (file, changelogPath);
var changelogOutputPath = (FilePath)$"./output/logs/changelogs/{id}/{version}/{dllName}.md";
EnsureDirectoryExists (changelogOutputPath.GetDirectory ());
CopyFile (file, changelogOutputPath);
}
}
}
Expand Down
16 changes: 12 additions & 4 deletions cake/UtilsManaged.cake
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ string[] GetReferenceSearchPaths()
var refs = new List<string>();

if (IsRunningOnWindows()) {
var vs = VS_INSTALL ?? VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" });
var vs =
VS_INSTALL ??
VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }) ??
VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin", IncludePrerelease = true });
var referenceAssemblies = $"{vs}/Common7/IDE/ReferenceAssemblies/Microsoft/Framework";
var pf = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);

Expand All @@ -196,7 +199,6 @@ string[] GetReferenceSearchPaths()
refs.Add($"{pf}/Windows Kits/10/UnionMetadata/Facade");
refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.UniversalApiContract/1.0.0.0");
refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.FoundationContract/1.0.0.0");
refs.Add($"{pf}/GtkSharp/2.12/lib");
refs.Add($"{pf}/GtkSharp/2.12/lib/gtk-sharp-2.0");
refs.Add($"{vs}/Common7/IDE/PublicAssemblies");
} else {
Expand Down Expand Up @@ -237,7 +239,7 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
comparer.SearchPaths.AddRange(GetReferenceSearchPaths());
comparer.PackageCache = PACKAGE_CACHE_PATH.FullPath;

await AddDep("OpenTK.GLControl", "NET40");
await AddDep("OpenTK.GLControl", "NET20");
await AddDep("Tizen.NET", "netstandard2.0");
await AddDep("Xamarin.Forms", "netstandard2.0");
await AddDep("Xamarin.Forms", "MonoAndroid90");
Expand All @@ -253,7 +255,7 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
await AddDep("AtkSharp", "netstandard2.0");
await AddDep("System.Memory", "netstandard2.0");
await AddDep("Uno.UI", "netstandard2.0");
await AddDep("Uno.UI", "MonoAndroid90");
await AddDep("Uno.UI", "MonoAndroid10.0");
await AddDep("Uno.UI", "xamarinios10");
await AddDep("Uno.UI", "xamarinmac20");
await AddDep("Uno.UI", "UAP");
Expand All @@ -266,6 +268,12 @@ async Task<NuGetDiff> CreateNuGetDiffAsync()
await AddDep("Xamarin.Forms", "Xamarin.Mac", "reference");
await AddDep("Xamarin.Forms", "uap10.0", "reference");

Verbose("Added search paths:");
foreach (var path in comparer.SearchPaths) {
var found = GetFiles($"{path}/*.dll").Any() || GetFiles($"{path}/*.winmd").Any();
Verbose($" {(found ? " " : "!")} {path}");
}

return comparer;

async Task AddDep(string id, string platform, string type = "release")
Expand Down
5 changes: 5 additions & 0 deletions changelogs/HarfBuzzSharp/2.8.2/HarfBuzzSharp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# API diff: HarfBuzzSharp.dll

## HarfBuzzSharp.dll

> No changes.
103 changes: 103 additions & 0 deletions changelogs/SkiaSharp.Views.Blazor/2.88.0/SkiaSharp.Views.Blazor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# API diff: SkiaSharp.Views.Blazor.dll

## SkiaSharp.Views.Blazor.dll

> Assembly Version Changed: 2.88.0.0 vs 0.0.0.0

### New Namespace SkiaSharp.Views.Blazor

#### New Type: SkiaSharp.Views.Blazor.SKCanvasView

```csharp
public class SKCanvasView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable {
// constructors
public SKCanvasView ();
// properties
public System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> AdditionalAttributes { get; set; }
public bool EnableRenderLoop { get; set; }
public bool IgnorePixelScaling { get; set; }
public System.Action<SKPaintSurfaceEventArgs> OnPaintSurface { get; set; }
// methods
protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder);
public virtual void Dispose ();
public void Invalidate ();
protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender);
}
```

#### New Type: SkiaSharp.Views.Blazor.SKGLView

```csharp
public class SKGLView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable {
// constructors
public SKGLView ();
// properties
public System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object> AdditionalAttributes { get; set; }
public bool EnableRenderLoop { get; set; }
public bool IgnorePixelScaling { get; set; }
public System.Action<SKPaintGLSurfaceEventArgs> OnPaintSurface { get; set; }
// methods
protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder);
public virtual void Dispose ();
public void Invalidate ();
protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender);
}
```

#### New Type: SkiaSharp.Views.Blazor.SKPaintGLSurfaceEventArgs

```csharp
public class SKPaintGLSurfaceEventArgs : System.EventArgs {
// constructors
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget);
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType);
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info);
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
// properties
public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; }
public SkiaSharp.SKColorType ColorType { get; }
public SkiaSharp.SKImageInfo Info { get; }
public SkiaSharp.GRSurfaceOrigin Origin { get; }
public SkiaSharp.SKImageInfo RawInfo { get; }
public SkiaSharp.SKSurface Surface { get; }
}
```

#### New Type: SkiaSharp.Views.Blazor.SKPaintSurfaceEventArgs

```csharp
public class SKPaintSurfaceEventArgs : System.EventArgs {
// constructors
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info);
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
// properties
public SkiaSharp.SKImageInfo Info { get; }
public SkiaSharp.SKImageInfo RawInfo { get; }
public SkiaSharp.SKSurface Surface { get; }
}
```

### New Namespace SkiaSharp.Views.Blazor.Internal

#### New Type: SkiaSharp.Views.Blazor.Internal.ActionHelper

```csharp
public class ActionHelper {
// constructors
public ActionHelper (System.Action action);
// methods
public void Invoke ();
}
```

#### New Type: SkiaSharp.Views.Blazor.Internal.FloatFloatActionHelper

```csharp
public class FloatFloatActionHelper {
// constructors
public FloatFloatActionHelper (System.Action<System.Single,System.Single> action);
// methods
public void Invoke (float width, float height);
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,42 @@

### Namespace SkiaSharp.Views.Desktop

#### Type Changed: SkiaSharp.Views.Desktop.Extensions
#### Type Changed: SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs

Added methods:
Obsoleted constructors:

```diff
[Obsolete ()]
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo);
```

Added constructors:

```csharp
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info);
public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
```

Added properties:

```csharp
public SkiaSharp.SKImageInfo Info { get; }
public SkiaSharp.SKImageInfo RawInfo { get; }
```


#### Type Changed: SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs

Added constructor:

```csharp
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
```

Added property:

```csharp
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKBitmap skiaBitmap);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKImage skiaImage);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPixmap pixmap);
public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPicture picture, SkiaSharp.SKSizeI dimensions);
public static SkiaSharp.SKBitmap ToSKBitmap (this System.Drawing.Bitmap bitmap);
public static SkiaSharp.SKImage ToSKImage (this System.Drawing.Bitmap bitmap);
public static void ToSKPixmap (this System.Drawing.Bitmap bitmap, SkiaSharp.SKPixmap pixmap);
public SkiaSharp.SKImageInfo RawInfo { get; }
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,21 @@

> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0

### Namespace SkiaSharp.Views.Forms

#### Type Changed: SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs

Added constructor:

```csharp
public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo);
```

Added property:

```csharp
public SkiaSharp.SKImageInfo RawInfo { get; }
```



Loading