From 360cbd48e6727625e9191d0aa228d231cd5598ef Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Mon, 19 Sep 2016 22:20:20 +0200 Subject: [PATCH] unifying the #define for Xamarin.Mac --- binding/Binding/SkiaApi.cs | 2 +- binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj | 4 ++-- .../SkiaSharpSample.MacSample.csproj | 4 ++-- samples/SkiaSharpSample.Platform.Shared/PCLStorageCompat.cs | 2 +- .../SkiaSharpSample.Platform.Shared/SamplesInitializer.cs | 6 +++--- source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKDrawable.cs | 2 +- .../SkiaSharp.Views.Mac/SkiaSharp.Views.Mac.csproj | 4 ++-- .../SkiaSharp.Views/SkiaSharp.Views.OpenTK/SKGLDrawable.cs | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/binding/Binding/SkiaApi.cs b/binding/Binding/SkiaApi.cs index 40f0dc00..0abe3762 100755 --- a/binding/Binding/SkiaApi.cs +++ b/binding/Binding/SkiaApi.cs @@ -59,7 +59,7 @@ namespace SkiaSharp private const string SKIA = "@rpath/libSkiaSharp.framework/libSkiaSharp"; #elif __ANDROID__ private const string SKIA = "libSkiaSharp.so"; -#elif XAMARIN_MAC +#elif __MACOS__ private const string SKIA = "libSkiaSharp.dylib"; #elif DESKTOP private const string SKIA = "libSkiaSharp.dll"; // redirected using .dll.config to 'libSkiaSharp.dylib' on OS X diff --git a/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj b/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj index 9b85ceba..d6dc25ee 100644 --- a/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj +++ b/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj @@ -19,7 +19,7 @@ full false bin\Debug - DEBUG;XAMARIN_MAC; + DEBUG;__MACOS__; prompt 4 false @@ -46,7 +46,7 @@ false false true - XAMARIN_MAC; + __MACOS__; diff --git a/samples/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample.csproj b/samples/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample.csproj index 84881ea8..27966db2 100644 --- a/samples/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample.csproj +++ b/samples/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample/SkiaSharpSample.MacSample.csproj @@ -17,7 +17,7 @@ full false bin\Debug - __UNIFIED__;DEBUG;__MAC__ + __UNIFIED__;DEBUG;__MACOS__ prompt 4 false @@ -35,7 +35,7 @@ true bin\Release - __UNIFIED__;__MAC__ + __UNIFIED__;__MACOS__ prompt 4 true diff --git a/samples/SkiaSharpSample.Platform.Shared/PCLStorageCompat.cs b/samples/SkiaSharpSample.Platform.Shared/PCLStorageCompat.cs index 0b8c355d..a9eea4dc 100644 --- a/samples/SkiaSharpSample.Platform.Shared/PCLStorageCompat.cs +++ b/samples/SkiaSharpSample.Platform.Shared/PCLStorageCompat.cs @@ -1,4 +1,4 @@ -#if __TVOS__ || __MAC__ +#if __TVOS__ || __MACOS__ using System; using System.IO; using System.Threading.Tasks; diff --git a/samples/SkiaSharpSample.Platform.Shared/SamplesInitializer.cs b/samples/SkiaSharpSample.Platform.Shared/SamplesInitializer.cs index 2f56977e..bee61f48 100644 --- a/samples/SkiaSharpSample.Platform.Shared/SamplesInitializer.cs +++ b/samples/SkiaSharpSample.Platform.Shared/SamplesInitializer.cs @@ -4,7 +4,7 @@ using System.IO; using Windows.ApplicationModel; using Windows.Storage; using Windows.System; -#elif __MAC__ +#elif __MACOS__ using System.IO; using AppKit; using Foundation; @@ -31,7 +31,7 @@ namespace SkiaSharpSample #if WINDOWS_UWP var pkg = Package.Current.InstalledLocation.Path; var path = Path.Combine(pkg, "Assets", "Media", fontName); -#elif __IOS__ || __TVOS__ || __MAC__ +#elif __IOS__ || __TVOS__ || __MACOS__ var path = NSBundle.MainBundle.PathForResource(Path.GetFileNameWithoutExtension(fontName), Path.GetExtension(fontName)); #elif __ANDROID__ var path = Path.Combine(Application.Context.CacheDir.AbsolutePath, fontName); @@ -50,7 +50,7 @@ namespace SkiaSharpSample #if WINDOWS_UWP var file = await StorageFile.GetFileFromPathAsync(path); await Launcher.LaunchFileAsync(file); -#elif __MAC__ +#elif __MACOS__ if (!NSWorkspace.SharedWorkspace.OpenFile(path)) { var alert = new NSAlert(); diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKDrawable.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKDrawable.cs index 1b09507f..d808221c 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKDrawable.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Apple/SKDrawable.cs @@ -54,7 +54,7 @@ namespace SkiaSharp.Views // draw the image ctx.DrawImage(viewBounds, image); ctx.RestoreState(); -#elif __MAC__ +#elif __MACOS__ // draw the image ctx.DrawImage(viewBounds, image); #else diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SkiaSharp.Views.Mac.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SkiaSharp.Views.Mac.csproj index ebcf7287..a121828c 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SkiaSharp.Views.Mac.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SkiaSharp.Views.Mac.csproj @@ -21,7 +21,7 @@ full false bin\Debug - __MAC__;__UNIFIED__;DEBUG; + __MACOS__;__UNIFIED__;DEBUG; prompt 4 false @@ -38,7 +38,7 @@ true bin\Release - __MAC__;__UNIFIED__; + __MACOS__;__UNIFIED__; prompt 4 false diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.OpenTK/SKGLDrawable.cs b/source/SkiaSharp.Views/SkiaSharp.Views.OpenTK/SKGLDrawable.cs index d4199a56..12c78479 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.OpenTK/SKGLDrawable.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.OpenTK/SKGLDrawable.cs @@ -1,7 +1,7 @@ using System; #if __IOS__ || __TVOS__ using OpenTK.Graphics.ES20; -#elif __MAC__ || __DESKTOP__ +#elif __MACOS__ || __DESKTOP__ using OpenTK.Graphics.OpenGL; #endif