twain / twain-dsm

TWAIN Data Source Manager
140 stars 55 forks source link

Please don't use PostBuildEvent in VS projects for copying headers to pub directory #6

Open mikekaganski opened 6 years ago

mikekaganski commented 6 years ago

The MSVC projects contain a call to PostBuildEvent.bat that copies twain.h to %ProjectDir%..\pub\include\twain. This has two drawbacks:

  1. The header is absent in the said directory until the project is built. If we fetch twain-dsm to use the header (like when building for Win32, which has its built-in dll, so we don't want to build the dll ourselves), we would need to use the header from %ProjectDir%..\src, and that defeats the very idea of that directory.
  2. The .bat is absent in release tarballs. That makes use of the project files impossible without patching.

Please consider placing the header to a dedicated directory aside from src instead, and let both your code, and external users to use it from that place directly.