libtiff.net icon indicating copy to clipboard operation
libtiff.net copied to clipboard

Does not build on Mac

Open bgulanowski opened this issue 3 years ago • 3 comments

.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:

  • vbscript
  • command.com/exe
  • wscript
  • cscript

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 avatar Aug 16 '22 00:08 bgulanowski

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 avatar Aug 16 '22 01:08 bgulanowski

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.

bgulanowski avatar Aug 16 '22 01:08 bgulanowski

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.

Bobrovsky avatar Aug 16 '22 03:08 Bobrovsky