From afa0bac669ac787e6bd35273c967a58b3e4e2196 Mon Sep 17 00:00:00 2001 From: Naios Date: Wed, 15 Jun 2016 19:58:21 +0200 Subject: 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 --- src/common/GitRevision.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'src/common/GitRevision.cpp') diff --git a/src/common/GitRevision.cpp b/src/common/GitRevision.cpp index 2b4537db448..1f4c28cd310 100644 --- a/src/common/GitRevision.cpp +++ b/src/common/GitRevision.cpp @@ -46,19 +46,30 @@ char const* GitRevision::GetHotfixesDatabase() return _HOTFIXES_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() -- cgit v1.2.3