Skip to content

Commit

Permalink
Use a build properties file instead of custom build actions to copy n…
Browse files Browse the repository at this point in the history
…ative binaries
  • Loading branch information
sharwell committed Sep 19, 2014
1 parent f3a6b7e commit bf93cba
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ _ReSharper*/
LibGit2Sharp/Core/UniqueIdentifier.cs

!Lib/NativeBinaries/*/*.pdb
!nuget.package/build/
_NCrunch_LibGit2Sharp/
26 changes: 26 additions & 0 deletions UpdateLibgit2ToSha.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,32 @@ namespace LibGit2Sharp.Core
sc -Encoding ASCII (Join-Path $libgit2sharpDirectory "Libgit2sharp\Core\NativeDllName.cs") $dllNameClass
sc -Encoding ASCII (Join-Path $libgit2sharpDirectory "Libgit2sharp\libgit2_hash.txt") $sha

$buildProperties = @"
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="`$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\$binaryFilename.dll">
<Link>NativeBinaries\amd64\$binaryFilename.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="`$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\$binaryFilename.pdb">
<Link>NativeBinaries\amd64\$binaryFilename.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="`$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\$binaryFilename.dll">
<Link>NativeBinaries\x86\$binaryFilename.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="`$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\$binaryFilename.pdb">
<Link>NativeBinaries\x86\$binaryFilename.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
"@

sc -Encoding UTF8 (Join-Path $libgit2sharpDirectory "nuget.package\build\LibGit2Sharp.props") $buildProperties

Write-Output "Done!"
}
exit
2 changes: 1 addition & 1 deletion nuget.package/LibGit2Sharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<file src="..\README.md" target="App_Readme\LibGit2Sharp.README.md" />
<file src="..\LICENSE.md" target="App_Readme\LibGit2Sharp.LICENSE.md" />
<file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
<file src="..\nuget.package\Tools\*.*" target="Tools" />
<file src="..\nuget.package\build\*.*" target="build\net40" />
<file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
</files>
</package>
13 changes: 0 additions & 13 deletions nuget.package/Tools/GetLibGit2SharpPostBuildCmd.ps1

This file was deleted.

11 changes: 0 additions & 11 deletions nuget.package/Tools/install.ps1

This file was deleted.

9 changes: 0 additions & 9 deletions nuget.package/Tools/uninstall.ps1

This file was deleted.

21 changes: 21 additions & 0 deletions nuget.package/build/LibGit2Sharp.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-69db893.dll">
<Link>NativeBinaries\amd64\git2-69db893.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-69db893.pdb">
<Link>NativeBinaries\amd64\git2-69db893.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-69db893.dll">
<Link>NativeBinaries\x86\git2-69db893.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-69db893.pdb">
<Link>NativeBinaries\x86\git2-69db893.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

0 comments on commit bf93cba

Please sign in to comment.