зеркало из https://github.com/mono/SkiaSharp.git
unifying the #define for Xamarin.Mac
This commit is contained in:
Родитель
4cbafc7b73
Коммит
360cbd48e6
|
@ -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
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;XAMARIN_MAC;</DefineConstants>
|
||||
<DefineConstants>DEBUG;__MACOS__;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<EnableCodeSigning>false</EnableCodeSigning>
|
||||
<EnablePackageSigning>false</EnablePackageSigning>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants>XAMARIN_MAC;</DefineConstants>
|
||||
<DefineConstants>__MACOS__;</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>__UNIFIED__;DEBUG;__MAC__</DefineConstants>
|
||||
<DefineConstants>__UNIFIED__;DEBUG;__MACOS__</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnableCodeSigning>false</EnableCodeSigning>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<DebugType></DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DefineConstants>__UNIFIED__;__MAC__</DefineConstants>
|
||||
<DefineConstants>__UNIFIED__;__MACOS__</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnableCodeSigning>true</EnableCodeSigning>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if __TVOS__ || __MAC__
|
||||
#if __TVOS__ || __MACOS__
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>__MAC__;__UNIFIED__;DEBUG;</DefineConstants>
|
||||
<DefineConstants>__MACOS__;__UNIFIED__;DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnableCodeSigning>false</EnableCodeSigning>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DefineConstants>__MAC__;__UNIFIED__;</DefineConstants>
|
||||
<DefineConstants>__MACOS__;__UNIFIED__;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnableCodeSigning>false</EnableCodeSigning>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
#if __IOS__ || __TVOS__
|
||||
using OpenTK.Graphics.ES20;
|
||||
#elif __MAC__ || __DESKTOP__
|
||||
#elif __MACOS__ || __DESKTOP__
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче