Open TimZander opened 1 year ago
You can try to just add them into a folder next to the other binary folders and see if it gets picked up. If it does then we can add them into the nuget package. Last time I checked wkhtmltopdf didn't provide binaries specifically for Win or OSX ARM.
Thanks, I added the libwkhtmltox.dylib (from /usr/local/lib) to my bin output folder as follows: bin/Debug/net6.0/runtimes/osx-arm64/native/libwkhtmltox.dylib but I am still seeing the same exception I was seeing before I did that. I have the wkhtmltopdf binary working on my M2 mac, but either the lib is /usr/local/lib is not the correct dylib file or my application isn't picking up the dylib file. Maybe I don't have it in the correct location?
It looks like the dylib installed is x86_64 and not ARM64
timzander@Timothys-MacBook-Pro ~ % file /Users/timzander/Documents/BgvCore/BgvCore/SalesTrafficControl/Server/bin/Debug/net6.0/runtimes/osx-arm64/native/libwkhtmltox.dylib
/Users/timzander/Documents/BgvCore/BgvCore/SalesTrafficControl/Server/bin/Debug/net6.0/runtimes/osx-arm64/native/libwkhtmltox.dylib: Mach-O 64-bit dynamically linked shared library x86_64
timzander@Timothys-MacBook-Pro ~ % file /Users/timzander/Documents/BgvCore/BgvCore/SalesTrafficControl/Server/bin/Debug/net6.0/runtimes/osx-arm64/native/libwkhtmltox.dylib
/Users/timzander/Documents/BgvCore/BgvCore/SalesTrafficControl/Server/bin/Debug/net6.0/runtimes/osx-arm64/native/libwkhtmltox.dylib: Mach-O 64-bit dynamically linked shared library x86_64
timzander@Timothys-MacBook-Pro ~ % file /usr/local/lib/libwkhtmltox.dylib
/usr/local/lib/libwkhtmltox.dylib: Mach-O 64-bit dynamically linked shared library x86_64
I see, so the installation is using the x86_64 library? It's probably using emulation on ARM then. But if that's the case then it should pick up that file in the .NET project as well. Can you try to just copy the x86_64 MacOs library to the arm64 folder (I'm actually not sure what the folder name is, you may have to look at some probing logs to determine).
I would love to see OSX and Windows ARM binaries added here.
I was able to get wxhtmltopdf binary installed to my M2 mac with Brew, so likely should be able to extract or build the needed build for Mac on ARM. Can I help get these binaries included?