Skip to content

Commit

Permalink
Prepare 1.1.0-rc2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed May 19, 2019
1 parent b370e6d commit 7d86ee5
Show file tree
Hide file tree
Showing 37 changed files with 249 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: csharp

mono: none

dotnet: 2.2.203
dotnet: 2.2.204

env:
global:
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ All notable changes to NetVips will be documented in this file. See [here](CHANG

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0-rc1] - 2019-05-04
## [1.1.0-rc2] - 2019-05-19
### Added
- A new [NetVips.Native](https://www.nuget.org/packages/NetVips.Native/) package containing the pre-compiled libvips binaries for Linux, macOS and Windows ([#21](https://github.com/kleisauke/net-vips/issues/21)).
- Changes to the [NetVips.Native.*](https://www.nuget.org/packages?q=id%3ANetVips.Native) packages will be documented [here](CHANGELOG.native.md).
- Add `Base.GetSuffixes()` to get a list of all the filename suffixes supported by libvips ([libvips/ruby-vips#186](https://github.com/libvips/ruby-vips/issues/186)).
- Add `NetVips.GetSuffixes()` to get a list of all the filename suffixes supported by libvips ([libvips/ruby-vips#186](https://github.com/libvips/ruby-vips/issues/186)).
- Add support for progress feedback (`image.SetProgress()`) and signal handling (`image.SignalConnect()`) ([#31](https://github.com/kleisauke/net-vips/issues/31)).
- Add `image.SetKill()` and `image.IsKilled()` ([#31](https://github.com/kleisauke/net-vips/issues/31), [libvips/libvips@91d0e7e](https://github.com/libvips/libvips/commit/91d0e7e3d06fe6293f8e7513f30fd21585ea4305)).
- Add `NetVips.ProfileSet()`, `NetVips.VectorSet()`, `NetVips.ConcurrencySet()` and `NetVips.ConcurrencyGet()` utilities.

### Changed
- Improve memory management ([#26](https://github.com/kleisauke/net-vips/issues/26)).
- The bundled libvips Windows binaries were moved to the [NetVips.Native](https://www.nuget.org/packages/NetVips.Native/) package.
- Update the [NetVips.Benchmarks](https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks).
- The overloadable operators `==` and `!=` have been changed to `Equal` and `NotEqual` to avoid conflicts with `null` checks.
- Some methods are overloaded instead of defining the parameters as `object` type.
- The base class was renamed from `Base` to `NetVips` to comply with the C# code conventions.
- The `Operation.VipsCacheSet*` utilities has been moved to `NetVips.CacheSet*`.

### Removed
- The `UseGlobalLibvips` property since the bundled libvips binaries were moved to the [NetVips.Native](https://www.nuget.org/packages/NetVips.Native/) package.
Expand Down Expand Up @@ -85,7 +88,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Added
- First release!

[1.1.0-rc1]: https://github.com/kleisauke/net-vips/compare/v1.0.7...v1.1.0-rc1
[1.1.0-rc2]: https://github.com/kleisauke/net-vips/compare/v1.0.7...v1.1.0-rc2
[1.0.7]: https://github.com/kleisauke/net-vips/compare/v1.0.6...v1.0.7
[1.0.6]: https://github.com/kleisauke/net-vips/compare/v1.0.5...v1.0.6
[1.0.5]: https://github.com/kleisauke/net-vips/compare/v1.0.4...v1.0.5
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To test your install, try this test program:
```csharp
if (ModuleInitializer.VipsInitialized)
{
Console.WriteLine($"Inited libvips {Base.Version(0)}.{Base.Version(1)}.{Base.Version(2)}");
Console.WriteLine($"Inited libvips {NetVips.Version(0)}.{NetVips.Version(1)}.{NetVips.Version(2)}");
}
else
{
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://github.com/appveyor/ci/issues/2907
image: Visual Studio 2019 Preview

# Version format
Expand Down
1 change: 0 additions & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using static Nuke.Common.Tools.NuGet.NuGetTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;

[CheckBuildProjectConfigurations]
[UnsetVisualStudioEnvironmentVariables]
partial class Build : NukeBuild
{
Expand Down
7 changes: 5 additions & 2 deletions build/NetVips.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGet.CommandLine" Version="4.9.4" />
<PackageReference Include="Nuke.Common" Version="0.19.1" />
<PackageReference Include="NuGet.CommandLine" Version="5.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nuke.Common" Version="0.19.2" />
<PackageReference Include="SharpZipLib" Version="1.1.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<BuildNumber Condition="'$(APPVEYOR_BUILD_NUMBER)' != ''">$(APPVEYOR_BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber>

<PrereleaseLabel>-rc1</PrereleaseLabel>
<PrereleaseLabel>-rc2</PrereleaseLabel>
<PrereleaseLabel Condition="'$(APPVEYOR_BUILD_NUMBER)' != ''">-develop</PrereleaseLabel>

<PrereleaseLabelConstants></PrereleaseLabelConstants>
Expand Down
3 changes: 3 additions & 0 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if ! type docker > /dev/null; then
exit 1
fi

# Ensure latest .NET Core SDK
docker pull mcr.microsoft.com/dotnet/core/sdk:2.2-stretch

# Create a machine image with all the required build tools pre-installed
docker build . -t netvips

Expand Down
2 changes: 1 addition & 1 deletion documentation/NetVips.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="docfx.console" Version="2.42.0">
<PackageReference Include="docfx.console" Version="2.42.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion samples/NetVips.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void Main(string[] args)
return;
}

Console.WriteLine($"libvips {Base.Version(0)}.{Base.Version(1)}.{Base.Version(2)}");
Console.WriteLine($"libvips {NetVips.Version(0)}.{NetVips.Version(1)}.{NetVips.Version(2)}");

Console.WriteLine(
$"Type a number (1-{_samples.Count}) to execute a sample of your choice. Press <Enter> or type 'Q' to quit.");
Expand Down
4 changes: 2 additions & 2 deletions samples/NetVips.Samples/Samples/LeakTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public class LeakTest : ISample
/// <returns>Result.</returns>
public string Execute(string[] args)
{
Base.LeakSet(true);
NetVips.LeakSet(true);

Operation.VipsCacheSetMax(0);
NetVips.CacheSetMax(0);

var imageBytes = File.ReadAllBytes(Filename);

Expand Down
2 changes: 1 addition & 1 deletion src/NetVips/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NetVips
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using NetVips.Internal;
using global::NetVips.Internal;

/// <summary>
/// Useful extension methods that we use in our codebase.
Expand Down
2 changes: 1 addition & 1 deletion src/NetVips/GObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace NetVips
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using NetVips.Internal;
using global::NetVips.Internal;

/// <summary>
/// Manage <see cref="Internal.GObject"/> lifetime.
Expand Down
36 changes: 18 additions & 18 deletions src/NetVips/GValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NetVips
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using NetVips.Internal;
using global::NetVips.Internal;

/// <summary>
/// Wrap <see cref="Internal.GValue"/> in a C# class.
Expand Down Expand Up @@ -84,32 +84,32 @@ public class GValue : IDisposable
/// <summary>
/// The fundamental type for VipsImage.
/// </summary>
public static readonly IntPtr ImageType = Base.TypeFromName("VipsImage");
public static readonly IntPtr ImageType = NetVips.TypeFromName("VipsImage");

/// <summary>
/// The fundamental type for VipsArrayInt.
/// </summary>
public static readonly IntPtr ArrayIntType = Base.TypeFromName("VipsArrayInt");
public static readonly IntPtr ArrayIntType = NetVips.TypeFromName("VipsArrayInt");

/// <summary>
/// The fundamental type for VipsArrayDouble.
/// </summary>
public static readonly IntPtr ArrayDoubleType = Base.TypeFromName("VipsArrayDouble");
public static readonly IntPtr ArrayDoubleType = NetVips.TypeFromName("VipsArrayDouble");

/// <summary>
/// The fundamental type for VipsArrayImage.
/// </summary>
public static readonly IntPtr ArrayImageType = Base.TypeFromName("VipsArrayImage");
public static readonly IntPtr ArrayImageType = NetVips.TypeFromName("VipsArrayImage");

/// <summary>
/// The fundamental type for VipsRefString.
/// </summary>
public static readonly IntPtr RefStrType = Base.TypeFromName("VipsRefString");
public static readonly IntPtr RefStrType = NetVips.TypeFromName("VipsRefString");

/// <summary>
/// The fundamental type for VipsBlob.
/// </summary>
public static readonly IntPtr BlobType = Base.TypeFromName("VipsBlob");
public static readonly IntPtr BlobType = NetVips.TypeFromName("VipsBlob");

/// <summary>
/// The fundamental type for VipsBandFormat. See <see cref="Enums.BandFormat"/>.
Expand All @@ -129,12 +129,12 @@ public class GValue : IDisposable
static GValue()
{
Vips.BandFormatGetType();
BandFormatType = Base.TypeFromName("VipsBandFormat");
BandFormatType = NetVips.TypeFromName("VipsBandFormat");

if (Base.AtLeastLibvips(8, 6))
if (NetVips.AtLeastLibvips(8, 6))
{
Vips.BlendModeGetType();
BlendModeType = Base.TypeFromName("VipsBlendMode");
BlendModeType = NetVips.TypeFromName("VipsBlendMode");
}
}

Expand Down Expand Up @@ -296,7 +296,7 @@ public void Set(object value)
if (!(value is GObject gObject))
{
throw new Exception(
$"unsupported value type {value.GetType()} for gtype {Base.TypeName(gtype)}");
$"unsupported value type {value.GetType()} for gtype {NetVips.TypeName(gtype)}");
}

Internal.GValue.SetObject(ref Struct, gObject);
Expand All @@ -322,7 +322,7 @@ public void Set(object value)
break;
default:
throw new Exception(
$"unsupported value type {value.GetType()} for gtype {Base.TypeName(gtype)}");
$"unsupported value type {value.GetType()} for gtype {NetVips.TypeName(gtype)}");
}

VipsValue.SetArrayInt(ref Struct, integers, integers.Length);
Expand All @@ -348,7 +348,7 @@ public void Set(object value)
break;
default:
throw new Exception(
$"unsupported value type {value.GetType()} for gtype {Base.TypeName(gtype)}");
$"unsupported value type {value.GetType()} for gtype {NetVips.TypeName(gtype)}");
}

VipsValue.SetArrayDouble(ref Struct, doubles, doubles.Length);
Expand All @@ -358,7 +358,7 @@ public void Set(object value)
if (!(value is Image[] images))
{
throw new Exception(
$"unsupported value type {value.GetType()} for gtype {Base.TypeName(gtype)}");
$"unsupported value type {value.GetType()} for gtype {NetVips.TypeName(gtype)}");
}

var size = images.Length;
Expand Down Expand Up @@ -390,7 +390,7 @@ public void Set(object value)
break;
default:
throw new Exception(
$"unsupported value type {value.GetType()} for gtype {Base.TypeName(gtype)}");
$"unsupported value type {value.GetType()} for gtype {NetVips.TypeName(gtype)}");
}

// We need to set the blob to a copy of the string that vips
Expand All @@ -403,7 +403,7 @@ public void Set(object value)
GC.AddMemoryPressure(memory.Length);
_memoryPressure = memory.Length;

if (Base.AtLeastLibvips(8, 6))
if (NetVips.AtLeastLibvips(8, 6))
{
VipsValue.SetBlobFree(ref Struct, ptr, (ulong)memory.Length);
}
Expand All @@ -422,7 +422,7 @@ int FreeFn(IntPtr a, IntPtr b)
else
{
throw new Exception(
$"unsupported gtype for set {Base.TypeName(gtype)}, fundamental {Base.TypeName(fundamental)}, value type {value.GetType()}");
$"unsupported gtype for set {NetVips.TypeName(gtype)}, fundamental {NetVips.TypeName(fundamental)}, value type {value.GetType()}");
}
}

Expand Down Expand Up @@ -527,7 +527,7 @@ public object Get()
}
else
{
throw new Exception($"unsupported gtype for get {Base.TypeName(gtype)}");
throw new Exception($"unsupported gtype for get {NetVips.TypeName(gtype)}");
}

return result;
Expand Down
14 changes: 7 additions & 7 deletions src/NetVips/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace NetVips
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using NetVips.Internal;
using global::NetVips.Internal;
using SMath = System.Math;

/// <summary>
Expand Down Expand Up @@ -706,7 +706,7 @@ public override IntPtr GetTypeOf(string name)
{
// on libvips before 8.5, property types must be fetched separately,
// since built-in enums were reported as ints
if (!Base.AtLeastLibvips(8, 5))
if (!NetVips.AtLeastLibvips(8, 5))
{
var gtype = base.GetTypeOf(name);
if (gtype != IntPtr.Zero)
Expand Down Expand Up @@ -756,7 +756,7 @@ public override object Get(string name)

// with old libvips, we must fetch properties (as opposed to
// metadata) via VipsObject
if (!Base.AtLeastLibvips(8, 5))
if (!NetVips.AtLeastLibvips(8, 5))
{
var gtype = base.GetTypeOf(name);
if (gtype != IntPtr.Zero)
Expand All @@ -783,7 +783,7 @@ public override object Get(string name)
/// <returns>An array of strings or <see langword="null" />.</returns>
public string[] GetFields()
{
if (!Base.AtLeastLibvips(8, 5))
if (!NetVips.AtLeastLibvips(8, 5))
{
return null;
}
Expand Down Expand Up @@ -1375,7 +1375,7 @@ public double[] MinPos()
public bool HasAlpha()
{
// use `vips_image_hasalpha` on libvips >= 8.5.
if (Base.AtLeastLibvips(8, 5))
if (NetVips.AtLeastLibvips(8, 5))
{
return VipsImage.HasAlpha(this) == 1;
}
Expand All @@ -1399,7 +1399,7 @@ public bool HasAlpha()
/// otherwise, <see langword="false" />.</returns>
public bool IsKilled()
{
if (!Base.AtLeastLibvips(8, 8))
if (!NetVips.AtLeastLibvips(8, 8))
{
return false;
}
Expand All @@ -1416,7 +1416,7 @@ public bool IsKilled()
/// <param name="kill">The kill state.</param>
public void SetKill(bool kill)
{
if (!Base.AtLeastLibvips(8, 8))
if (!NetVips.AtLeastLibvips(8, 8))
{
return;
}
Expand Down
13 changes: 7 additions & 6 deletions src/NetVips/Internal/GLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ namespace NetVips.Internal
using System;
using System.Runtime.InteropServices;
using System.Security;
using NetVips.Interop;
using global::NetVips.Interop;
using LogLevelFlags = global::NetVips.Enums.LogLevelFlags;

internal static class GLib
{
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void LogFuncNative(IntPtr logDomain, NetVips.Enums.LogLevelFlags flags, IntPtr message,
internal delegate void LogFuncNative(IntPtr logDomain, LogLevelFlags flags, IntPtr message,
IntPtr userData);

[SuppressUnmanagedCodeSecurity]
Expand All @@ -22,7 +23,7 @@ internal delegate void LogFuncNative(IntPtr logDomain, NetVips.Enums.LogLevelFla
[SuppressUnmanagedCodeSecurity]
[DllImport(Libraries.GLib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "g_log_set_handler")]
internal static extern uint GLogSetHandler([MarshalAs(UnmanagedType.LPStr)] string logDomain,
NetVips.Enums.LogLevelFlags flags, LogFuncNative logFunc, IntPtr userData);
LogLevelFlags flags, LogFuncNative logFunc, IntPtr userData);

[SuppressUnmanagedCodeSecurity]
[DllImport(Libraries.GLib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "g_log_remove_handler")]
Expand All @@ -31,11 +32,11 @@ internal static extern void

[SuppressUnmanagedCodeSecurity]
[DllImport(Libraries.GLib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "g_log_set_always_fatal")]
internal static extern NetVips.Enums.LogLevelFlags GLogSetAlwaysFatal(NetVips.Enums.LogLevelFlags fatalMask);
internal static extern LogLevelFlags GLogSetAlwaysFatal(LogLevelFlags fatalMask);

[SuppressUnmanagedCodeSecurity]
[DllImport(Libraries.GLib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "g_log_set_fatal_mask")]
internal static extern NetVips.Enums.LogLevelFlags GLogSetFatalMask(
[MarshalAs(UnmanagedType.LPStr)] string logDomain, NetVips.Enums.LogLevelFlags fatalMask);
internal static extern LogLevelFlags GLogSetFatalMask(
[MarshalAs(UnmanagedType.LPStr)] string logDomain, LogLevelFlags fatalMask);
}
}
Loading

0 comments on commit 7d86ee5

Please sign in to comment.