From b8d4ae5a7c01c0967088aee53c7d7ede12deecde Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Wed, 21 Aug 2019 15:54:14 +0100 Subject: [PATCH 1/2] Add git commit, original filename to DLL PE header Windows only --- code/res/assimp.rc | 4 ++-- revision.h.in | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/res/assimp.rc b/code/res/assimp.rc index 14ffdf4f5..daecf9cf5 100644 --- a/code/res/assimp.rc +++ b/code/res/assimp.rc @@ -52,8 +52,8 @@ BEGIN VALUE "FileDescription", "Open Asset Import Library" VALUE "FileVersion", VER_FILEVERSION VALUE "InternalName", "assimp " - VALUE "LegalCopyright", "Copyright (C) 2006-2010" - VALUE "OriginalFilename", "assimpNN.dll" + VALUE "LegalCopyright", "Copyright (C) 2006-2019" + VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR VALUE "ProductName", "Open Asset Import Library" VALUE "ProductVersion", VER_FILEVERSION_STR ,0 diff --git a/revision.h.in b/revision.h.in index 0ad58feb7..2be06c56b 100644 --- a/revision.h.in +++ b/revision.h.in @@ -13,6 +13,16 @@ #define STR(x) STR_HELP(x) #define VER_FILEVERSION VER_MAJOR,VER_MINOR,VER_PATCH,VER_BUILD +#if (GitVersion == 0) #define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) +#else +#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) " (Commit 0x@GIT_COMMIT_HASH@)" +#endif + +#ifdef NDEBUG +#define VER_ORIGINAL_FILENAME_STR "assimp@LIBRARY_SUFFIX@.dll" +#else +#define VER_ORIGINAL_FILENAME_STR "assimp@LIBRARY_SUFFIX@@CMAKE_DEBUG_POSTFIX@.dll" +#endif // NDEBUG #endif // ASSIMP_REVISION_H_INC From 0f6e95f19db4d981042504991ec924002f23b1c9 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Wed, 21 Aug 2019 16:07:51 +0100 Subject: [PATCH 2/2] Fix typo. githash canonically doesn't start 0x --- revision.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revision.h.in b/revision.h.in index 2be06c56b..6d09afbc6 100644 --- a/revision.h.in +++ b/revision.h.in @@ -16,7 +16,7 @@ #if (GitVersion == 0) #define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) #else -#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) " (Commit 0x@GIT_COMMIT_HASH@)" +#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) " (Commit @GIT_COMMIT_HASH@)" #endif #ifdef NDEBUG