diff options
author | Naios <naios-dev@live.de> | 2016-06-15 19:58:21 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-06-15 19:58:21 +0200 |
commit | afa0bac669ac787e6bd35273c967a58b3e4e2196 (patch) | |
tree | 363356bbb05ea3f4704578addf67e4cdc0a8c3cb /src/common/GitRevision.cpp | |
parent | 781d713835a5cf89b3edac76d6490bae7f3ccd8f (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
Diffstat (limited to 'src/common/GitRevision.cpp')
-rw-r--r-- | src/common/GitRevision.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
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() |