libgit2 / libgit2sharp.nativebinaries

MIT License
28 stars 62 forks source link

Include all platform binaries #13

Closed bording closed 9 years ago

bording commented 9 years ago

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.

This addresses the primary issue discussed in #9

bording commented 9 years ago

@nulltoken An interesting side effect of this change is that LibGit2Sharp's build.libgit2sharp.sh no longer needs LD_LIBRARY_PATH set at all. Once a version of the nuget package with these changes is being used in the main repo, I'll fix that up too.

bording commented 9 years ago

One other thing I wanted to point out, I didn't change the path of windows binaries at all with this.

This does have the unfortunate side effect of making the NativeBinaries folder have the follwowing subfolders:

It would be nice to move those into a windows subfolder, but I know that would require changes in the LibGit2Sharp code, so I'm not sure it's worth bothering with.

nulltoken commented 9 years ago

:heart_eyes: :bangbang:

nulltoken commented 9 years ago

@bording The only drawback, so far, I can think of is that now the build fails when it cannot finds the Mac OS X or Linux binaries. This is actually quite cumbersome when testing a new libgit2 upgrade.

Previously my flow was

Thoughts?

bording commented 9 years ago

Ah, yeah I didn't think about it from the testing perspective when you have an incomplete, windows-only test package.

I think I can add some exists conditions around the includes, so it will only try if the files exist.

If for some reason that doesn't work, then perhaps some sort of "skipunix" msbuild property you could set when using the test package?