Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle libheif library in nuget package? #1

Closed
ziriax opened this issue Nov 4, 2020 · 4 comments
Closed

Bundle libheif library in nuget package? #1

ziriax opened this issue Nov 4, 2020 · 4 comments

Comments

@ziriax
Copy link

ziriax commented Nov 4, 2020

Thanks for this library! I actually started my own wrapper, using SharpGen to automatically generate most of the low-level API bindings, but you've tackled it the hard way, nice 👍

Do you have a reason (maybe licensing) not to bundle the native DLLs in the nuget package, as described here?

Would you accept a PR that does this?

PS: If you are interested in my project that uses SharpGen, I'll be happy to push it to GitHub

@0xC0000054
Copy link
Owner

0xC0000054 commented Nov 5, 2020

Do you have a reason (maybe licensing) not to bundle the native DLLs in the nuget package, as described here?

There are several reasons that the libheif DLLs are not bundled.

The main one is that it would force me to update the LibHeifSharp NuGet package when each new libheif version is released.
Most of the NuGet packages that have native dependencies place those dependencies in a separate NuGet package so that they can be serviced independently of the managed code that uses them.
Also, a NuGet package would not be required for any operating system that includes the latest version of libheif in the OS package manager, e.g. many Linux distributions.

Another is that users may want libheif to be build with different features, e.g. some users may want AVIF support or only need decoding.
The libheif build I use for testing only has HEVC decoding and encoding support.

It would make sense to have a libheif NuGet package for some platforms, e.g. a libheif.Windows NuGet package that provides the 32-bit and 64-bit DLLs.

Would you accept a PR that does this?

No, for the reasons stated above.

@ziriax
Copy link
Author

ziriax commented Nov 5, 2020

Thanks for the feedback.

Do you have any up-to-date instructions on how to build a version of libheif.dll on Windows that will work with your library then?

The libheif github page advises to use vcpkg, but that builds version 1.7, and your library needs 1.9.

I have not yet been able to build a version that works on Windows.

@ziriax
Copy link
Author

ziriax commented Nov 5, 2020

Found it, I had to apply this patch to build it.

@KWEngine
Copy link

@ziriax if I build the libheif.dll and copy it to my libheif-sharp vs solution directory, there still seem to be some dependencies missing. What binaries did you add in addition to the libheif.dll? I built it with MinSizeRel x64 settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants