aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-06-15 19:58:21 +0200
committerNaios <naios-dev@live.de>2016-06-23 22:24:52 +0200
commit185921dc2bee47fb174b5dc1de0e7a3d6c67aa38 (patch)
tree15076b222cef4c167e4b709444fc2c219c6950e9
parentfe2aed6047baa5871ab0840353a26cdd08d62f49 (diff)
Core/Common: Add the linkage type to the version string
* Add platform strings for intel and apple * Remove usage of underscore uppercase identifiers because those are reserved for the compiler. * Requested by Aokromes (cherry picked from commit afa0bac669ac787e6bd35273c967a58b3e4e2196)
-rw-r--r--src/common/GitRevision.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/common/GitRevision.cpp b/src/common/GitRevision.cpp
index 2162e36847f..702cd01d84b 100644
--- a/src/common/GitRevision.cpp
+++ b/src/common/GitRevision.cpp
@@ -41,19 +41,30 @@ char const* GitRevision::GetFullDatabase()
return _FULL_DATABASE;
}
-#define _PACKAGENAME "TrinityCore"
-
-char const* GitRevision::GetFullVersion()
-{
#if PLATFORM == PLATFORM_WINDOWS
-# ifdef _WIN64
- return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win64, " _BUILD_DIRECTIVE ")";
-# else
- return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win32, " _BUILD_DIRECTIVE ")";
-# endif
+# ifdef _WIN64
+# define TRINITY_PLATFORM_STR "Win64"
+# else
+# define TRINITY_PLATFORM_STR "Win32"
+# endif
+#elif PLATFORM == PLATFORM_APPLE
+# define TRINITY_PLATFORM_STR "MacOSX"
+#elif PLATFORM == PLATFORM_INTEL
+# define TRINITY_PLATFORM_STR "Intel"
+#else // PLATFORM_UNIX
+# define TRINITY_PLATFORM_STR "Unix"
+#endif
+
+#ifndef TRINITY_API_USE_DYNAMIC_LINKING
+# define TRINITY_LINKAGE_TYPE_STR "Static"
#else
- return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Unix, " _BUILD_DIRECTIVE ")";
+# define TRINITY_LINKAGE_TYPE_STR "Dynamic"
#endif
+
+char const* GitRevision::GetFullVersion()
+{
+ return "TrinityCore rev. " VER_PRODUCTVERSION_STR
+ " (" TRINITY_PLATFORM_STR ", " _BUILD_DIRECTIVE ", " TRINITY_LINKAGE_TYPE_STR ")";
}
char const* GitRevision::GetCompanyNameStr()