BitMiracle / libtiff.net

.NET version of LibTiff library made by Bit Miracle and contributors
http://bitmiracle.com/libtiff/
Other
242 stars 119 forks source link

Does not build on Mac #90

Open bgulanowski opened 2 years ago

bgulanowski commented 2 years ago

.Net is cross platform. Visual Studio has existed on macOS for years, and is slowing gaining more features.

However, these tools do not, and probably never will, exist on macOS:

It seems like, because of libtiff's dependencies on Windows-specific scripting tools, it cannot be built on macOS. I assume it also cannot be built on Linux, either with MSBuild or mono/xbuild.

If there is a way to make it work, please provide documentation.

bgulanowski commented 2 years ago

The PreBuildEvent step that updates the version number based on the number of git commits seems straightforward. I can temporarily disable it and do the work manually.

But the PostBuildEvent that replaces strings in the target xml file is beyond my MSBuild knowledge to replicate. I mean, I can execute a manual find/replace using any of a number of tools, but I have no idea what the purpose of that step is, and how to verify if the results were correct.

bgulanowski commented 2 years ago

I am hoping to use the code in a Unity project. I think I will copy the source files I need directly into my Unity project, instead of trying to build a library.

Bobrovsky commented 2 years ago

We do not support anything except Windows as a build environment. You or anyone else is encouraged to fix this and provide a pull request.

The PostBuildEvent makes changes to XML documentation output. Without the changes the XML documentation file can not be properly processed by Sandcastle Help File Builder tool. You could probably disable the PostBuildEvent event if you are not going to build the documentation.

The recommended approach, however, is to use a pre-built NuGet in your project. You can also directly include the code of the library in your project.