Skip to content

Commit

Permalink
Include packages for x86/x64 onigwrap.dll, and dynamic binding betwee…
Browse files Browse the repository at this point in the history
…n them #51
  • Loading branch information
Andrew1Medvedev committed Jun 9, 2023
1 parent 69baf3a commit a50198b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
14 changes: 14 additions & 0 deletions build/CopyNativeLibraries.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(TargetFramework)' == '' Or '$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<None Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\onigwrap-x64.dll">
<Link>onigwrap-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)..\runtimes\win-x86\native\onigwrap-x86.dll">
<Link>onigwrap-x86.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</None>
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions build/TextMateSharp.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\CopyNativeLibraries.targets" />
</Project>
10 changes: 9 additions & 1 deletion src/TextMateSharp/TextMateSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down Expand Up @@ -76,6 +76,14 @@ TextMateSharp uses a wrapper around Oniguruma regex engine. Read below to learn
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
</ItemGroup>
<ItemGroup>
<Content Pack="True"
PackagePath="build"
Include="..\..\build\CopyNativeLibraries.targets" />
<Content Pack="True"
PackagePath="build"
Include="..\..\build\TextMateSharp.targets" />
</ItemGroup>
<Import Project="..\..\build\SourceLink.props" />
<Import Project="..\..\build\Directory.Build.props" />
</Project>

0 comments on commit a50198b

Please sign in to comment.