6 changed files with 187 additions and 162 deletions
@ -1,31 +1,31 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<CastXmlPath>/usr/local/bin/castxml</CastXmlPath> |
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
|||
<SharpGenGeneratedCodeFolder>$(MSBuildThisFileDirectory)/Generated</SharpGenGeneratedCodeFolder> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<PackageReference Include="SharpGenTools.Sdk" Version="1.1.2" PrivateAssets="all" /> |
|||
<PackageReference Include="SharpGen.Runtime.Com" Version="1.1.0" /> |
|||
<PackageReference Include="Avalonia" Version="0.6.2-build6362-beta" /> |
|||
<SharpGenMapping Include="Mappings.xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Remove="Generated\LocalInterop.cs" /> |
|||
<Compile Remove="Generated\Structures.cs" /> |
|||
<Compile Remove="Generated\Functions.cs" /> |
|||
<Compile Remove="Generated\Interfaces.cs" /> |
|||
<Compile Remove="Generated\LocalInterop.cs" /> |
|||
<Compile Remove="Generated\Structures.cs" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup Condition="'$(Configuration)' == 'Release'"> |
|||
<Content Include="../../Build/Products/Release/libAvalonia.Native.OSX.dylib"> |
|||
<PackagePath>runtimes/osx/native/libAvaloniaNative.dylib</PackagePath> |
|||
<Pack>true</Pack> |
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|||
</Content> |
|||
</ItemGroup> |
|||
</Project> |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<CastXmlPath Condition="Exists('/usr/bin/castxml')">/usr/bin/castxml</CastXmlPath> |
|||
<CastXmlPath Condition="Exists('/usr/local/bin/castxml')">/usr/local/bin/castxml</CastXmlPath> |
|||
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
|||
<SharpGenGeneratedCodeFolder>$(MSBuildThisFileDirectory)/Generated</SharpGenGeneratedCodeFolder> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<PackageReference Include="SharpGenTools.Sdk" Version="1.1.2" PrivateAssets="all" /> |
|||
<PackageReference Include="SharpGen.Runtime.Com" Version="1.1.0" /> |
|||
<SharpGenMapping Include="Mappings.xml" /> |
|||
<ProjectReference Include="..\Avalonia.Base\Avalonia.Base.csproj" /> |
|||
<ProjectReference Include="..\Avalonia.Controls\Avalonia.Controls.csproj" /> |
|||
<ProjectReference Include="..\Avalonia.Input\Avalonia.Input.csproj" /> |
|||
<ProjectReference Include="..\Avalonia.Interactivity\Avalonia.Interactivity.csproj" /> |
|||
<ProjectReference Include="..\Avalonia.OpenGL\Avalonia.OpenGL.csproj" /> |
|||
<ProjectReference Include="..\Avalonia.Visuals\Avalonia.Visuals.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
|
|||
<ItemGroup Condition="'$(Configuration)' == 'Release'"> |
|||
<Content Include="../../Build/Products/Release/libAvalonia.Native.OSX.dylib"> |
|||
<PackagePath>runtimes/osx/native/libAvaloniaNative.dylib</PackagePath> |
|||
<Pack>true</Pack> |
|||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
|||
</Content> |
|||
</ItemGroup> |
|||
</Project> |
|||
|
|||
@ -1,29 +1,29 @@ |
|||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System; |
|||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Native; |
|||
|
|||
namespace Avalonia |
|||
|
|||
namespace Avalonia |
|||
{ |
|||
public static class AvaloniaNativePlatformExtensions |
|||
public static class AvaloniaNativePlatformExtensions |
|||
{ |
|||
public static T UseAvaloniaNative<T>(this T builder, |
|||
string libraryPath = null, |
|||
string libraryPath = null, |
|||
Action<AvaloniaNativeOptions> configure = null) |
|||
where T : AppBuilderBase<T>, new() |
|||
{ |
|||
where T : AppBuilderBase<T>, new() |
|||
{ |
|||
if (libraryPath == null) |
|||
{ |
|||
builder.UseWindowingSubsystem(() => AvaloniaNativePlatform.Initialize(configure)); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
builder.UseWindowingSubsystem(() => AvaloniaNativePlatform.Initialize(libraryPath, configure)); |
|||
} |
|||
|
|||
return builder; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
return builder; |
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue