dotnet / android-libzipsharp

A managed wrapper (and then some) around libzip (https://libzip.org/)
MIT License
30 stars 12 forks source link

Use RuntimeInformation to determine the Processor architecture. #108

Closed dellis1972 closed 2 years ago

dellis1972 commented 2 years ago

See https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-6.0

Now that we ship an arm based native library on windows we need to be able to determine the underlying library to load. We can use the RuntimeInformation.ProcessArchitecture value to get this data.

Then based on that we can load from x86, x64 or arm64 subdirectories. Note we will still fallback to loading from the current directory , but the preference is to load from on of the architecture specific sub directories.