From e8740fb2e125b308493aeab49ddd7b0cc6a53c97 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 3 Sep 2024 12:06:16 +0200 Subject: Core/Misc: CompilerDefs/GitRevision improvements * Removed INTEL as a separate platform (it does not belong there) * Removed BORLAND from known compilers list (it was never supported) * Simplified TRINITY_PLATFORM_WINDOWS detection (_WIN32 is always defined) * Rename revision_data.h macros that begin with a underscore * Added processor architecture to --version string * Added Linux distribution name to .server debug * Fixed some revision_data.h macros missing/wrong values when regenerated during compilation * Removed manual adding of _WIN64 macro from cmake (it is predefined internally by compiler) --- revision_data.h.in.cmake | 74 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 20 deletions(-) (limited to 'revision_data.h.in.cmake') diff --git a/revision_data.h.in.cmake b/revision_data.h.in.cmake index ddc4d0594f5..3a991fcde1d 100644 --- a/revision_data.h.in.cmake +++ b/revision_data.h.in.cmake @@ -1,20 +1,54 @@ -#ifndef __REVISION_DATA_H__ -#define __REVISION_DATA_H__ - #define _HASH "@rev_hash@" - #define _DATE "@rev_date@" - #define _BRANCH "@rev_branch@" - #define _CMAKE_COMMAND R"(@CMAKE_COMMAND@)" - #define _CMAKE_VERSION R"(@CMAKE_VERSION@)" - #define _CMAKE_HOST_SYSTEM R"(@CMAKE_HOST_SYSTEM_NAME@ @CMAKE_HOST_SYSTEM_VERSION@)" - #define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)" - #define _BUILD_DIRECTORY R"(@BUILDDIR@)" - #define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)" - #define _FULL_DATABASE "TDB_full_world_1102.24091_2024_09_03.sql" - #define _HOTFIXES_DATABASE "TDB_full_hotfixes_1102.24091_2024_09_03.sql" - #define VER_COMPANYNAME_STR "TrinityCore Developers" - #define VER_LEGALCOPYRIGHT_STR "(c)2008-@rev_year@ TrinityCore" - #define VER_FILEVERSION 0,0,0 - #define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)" - #define VER_PRODUCTVERSION VER_FILEVERSION - #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR -#endif // __REVISION_DATA_H__ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef TRINITYCORE_REVISION_DATA_H +#define TRINITYCORE_REVISION_DATA_H + +// Git commit information +#define TRINITY_GIT_COMMIT_HASH "@rev_hash@" +#define TRINITY_GIT_COMMIT_DATE "@rev_date@" +#define TRINITY_GIT_COMMIT_BRANCH R"(@rev_branch@)" + +// Build OS information +#define TRINITY_BUILD_HOST_SYSTEM R"(@TRINITY_BUILD_HOST_SYSTEM@)" +#define TRINITY_BUILD_HOST_SYSTEM_VERSION R"(@TRINITY_BUILD_HOST_SYSTEM_RELEASE@)" +#cmakedefine TRINITY_BUILD_HOST_DISTRO_NAME R"(@TRINITY_BUILD_HOST_DISTRO_NAME@)" +#cmakedefine TRINITY_BUILD_HOST_DISTRO_VERSION_ID R"(@TRINITY_BUILD_HOST_DISTRO_VERSION_ID@)" + +// Build target information +#define TRINITY_BUILD_PROCESSOR R"(@CMAKE_SYSTEM_PROCESSOR@)" + +// CMake build information +#define TRINITY_BUILD_CMAKE_COMMAND R"(@CMAKE_COMMAND@)" +#define TRINITY_BUILD_CMAKE_VERSION R"(@CMAKE_VERSION@)" +#define TRINITY_BUILD_CMAKE_SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)" +#define TRINITY_BUILD_CMAKE_BUILD_DIRECTORY R"(@BUILDDIR@)" + +// Database updater base information +#define DATABASE_MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)" +#define DATABASE_FULL_DATABASE "TDB_full_world_1102.24091_2024_09_03.sql" +#define DATABASE_HOTFIXES_DATABASE "TDB_full_hotfixes_1102.24091_2024_09_03.sql" + +// Windows resource defines +#define VER_COMPANYNAME_STR "TrinityCore Developers" +#define VER_LEGALCOPYRIGHT_STR "(c)2008-@rev_year@ TrinityCore" +#define VER_FILEVERSION 0,0,0 +#define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)" +#define VER_PRODUCTVERSION VER_FILEVERSION +#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR + +#endif // TRINITYCORE_REVISION_DATA_H -- cgit v1.2.3