From 2da16660fa41a17665a8d8ae6d9acd9b33357de2 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Sat, 27 Jun 2015 20:33:35 -0400 Subject: [PATCH] Include all platform binaries This change to the props file will make the native binaries for all platforms be copied into the NativeBinaries folder regardless of which platform you are building on. The new LibGit2Sharp.dll.config will ensure that mono can find the linux and osx binaries when the are in the NativeBinaries folder. --- UpdateLibgit2ToSha.ps1 | 23 +++++++++++++------ .../build/LibGit2Sharp.NativeBinaries.props | 14 +++++------ nuget.package/libgit2/LibGit2Sharp.dll.config | 4 ++++ 3 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 nuget.package/libgit2/LibGit2Sharp.dll.config diff --git a/UpdateLibgit2ToSha.ps1 b/UpdateLibgit2ToSha.ps1 index 75f03cfc..75b7702b 100644 --- a/UpdateLibgit2ToSha.ps1 +++ b/UpdateLibgit2ToSha.ps1 @@ -91,7 +91,7 @@ Push-Location $libgit2Directory - + NativeBinaries\amd64\$binaryFilename.dll PreserveNewest @@ -108,16 +108,16 @@ Push-Location $libgit2Directory NativeBinaries\x86\$binaryFilename.pdb PreserveNewest - - - lib$binaryFilename.dylib + NativeBinaries\osx\lib$binaryFilename.dylib PreserveNewest - - - lib$binaryFilename.so + NativeBinaries\linux\amd64\lib$binaryFilename.so + PreserveNewest + + + LibGit2Sharp.dll.config PreserveNewest @@ -126,6 +126,15 @@ Push-Location $libgit2Directory sc -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\build\LibGit2Sharp.NativeBinaries.props") $buildProperties + $dllConfig = @" + + + + +"@ + + sc -Encoding UTF8 (Join-Path $projectDirectory "nuget.package\libgit2\LibGit2Sharp.dll.config") $dllConfig + Write-Output "Done!" } exit diff --git a/nuget.package/build/LibGit2Sharp.NativeBinaries.props b/nuget.package/build/LibGit2Sharp.NativeBinaries.props index aa3d401b..64cef23a 100644 --- a/nuget.package/build/LibGit2Sharp.NativeBinaries.props +++ b/nuget.package/build/LibGit2Sharp.NativeBinaries.props @@ -3,7 +3,7 @@ - + NativeBinaries\amd64\git2-a56db99.dll PreserveNewest @@ -20,16 +20,16 @@ NativeBinaries\x86\git2-a56db99.pdb PreserveNewest - - - libgit2-a56db99.dylib + NativeBinaries\osx\libgit2-a56db99.dylib PreserveNewest - - - libgit2-a56db99.so + NativeBinaries\linux\amd64\libgit2-a56db99.so + PreserveNewest + + + LibGit2Sharp.dll.config PreserveNewest diff --git a/nuget.package/libgit2/LibGit2Sharp.dll.config b/nuget.package/libgit2/LibGit2Sharp.dll.config new file mode 100644 index 00000000..1d6e5eee --- /dev/null +++ b/nuget.package/libgit2/LibGit2Sharp.dll.config @@ -0,0 +1,4 @@ + + + +