OSVR-Core icon indicating copy to clipboard operation
OSVR-Core copied to clipboard

DLL files should have version resources

Open rpavlik opened this issue 10 years ago • 4 comments
trafficstars

We're computing the version from Git - we should be generating a resource file (for Windows) that actually uses that version to put Windows-suitable version info in the dll files, if for no other reason than disambiguation.

I consider this a bug because they're not really "good" dlls without this metadata.

rpavlik avatar May 11 '15 15:05 rpavlik

The resources files should be generated by CMake from the known version information acquired from Git - the version string should contain the "git describe" version including the commit hash.

References:

  • http://stackoverflow.com/questions/6693100/how-to-generate-windows-dll-versioning-information-with-cmake
  • https://msdn.microsoft.com/en-us/library/windows/desktop/aa381058%28v=vs.85%29.aspx
  • https://github.com/OSVR/OSVR-Core/blob/master/cmake-local/Version.cmake

rpavlik avatar Jun 05 '15 13:06 rpavlik

This also has benefit for the users that can determine the version of the plugins either directly or through some configuration utility

VRguy avatar Jul 01 '15 14:07 VRguy

Yes - was working on this Monday, trying to get it done for the updated Unity plugin release. I have it mostly done, just troubleshooting why rc.exe (in visual studio) generates corrupted resources but windres.exe (in gcc/mingw) generates correct resources from the same input, or rather/at least, how I can work around it.

rpavlik avatar Jul 01 '15 14:07 rpavlik

A clue - we could try #pragma code_page(65001) to tell it the file is utf-8

rpavlik avatar Mar 25 '16 20:03 rpavlik