aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/ace/config-macros.h6
-rw-r--r--externals/ace/config.h1
-rw-r--r--src/genrevision/genrevision.cpp55
-rw-r--r--src/server/authserver/CMakeLists.txt6
-rw-r--r--src/server/authserver/Main.cpp3
-rw-r--r--src/server/collision/CMakeLists.txt6
-rw-r--r--src/server/game/CMakeLists.txt6
-rw-r--r--src/server/game/Chat/Commands/Level0.cpp4
-rw-r--r--src/server/game/Chat/Commands/Level3.cpp1
-rw-r--r--src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp3
-rw-r--r--src/server/game/World/World.cpp3
-rw-r--r--src/server/scripts/CMakeLists.txt2
-rw-r--r--src/server/shared/CMakeLists.txt6
-rw-r--r--src/server/shared/Debugging/WheatyExceptionReport.cpp5
-rw-r--r--src/server/shared/SystemConfig.h49
-rw-r--r--src/server/worldserver/CMakeLists.txt6
-rw-r--r--src/server/worldserver/Master.cpp3
17 files changed, 93 insertions, 72 deletions
diff --git a/externals/ace/config-macros.h b/externals/ace/config-macros.h
index 96a385e31a1..6820fc351d9 100644
--- a/externals/ace/config-macros.h
+++ b/externals/ace/config-macros.h
@@ -21,7 +21,11 @@
#ifndef ACE_CONFIG_MACROS_H
#define ACE_CONFIG_MACROS_H
-#include "ace/config.h"
+#ifdef _WIN32
+ #include "ace/config-win32.h"
+#else
+ #include "ace/config.h"
+#endif
#include "ace/Version.h"
#include "ace/Versioned_Namespace.h"
diff --git a/externals/ace/config.h b/externals/ace/config.h
deleted file mode 100644
index d3408e611cb..00000000000
--- a/externals/ace/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "ace/config-win32.h" \ No newline at end of file
diff --git a/src/genrevision/genrevision.cpp b/src/genrevision/genrevision.cpp
index 371262175d2..937810908ff 100644
--- a/src/genrevision/genrevision.cpp
+++ b/src/genrevision/genrevision.cpp
@@ -299,56 +299,26 @@ bool extractDataFromArchive(std::string filename, std::string path, bool url, Ra
std::string generateHeader(char const* rev_str, char const* date_str, char const* time_str, char const* hash_str)
{
std::ostringstream newData;
- newData << "/*" << std::endl;
- newData << " * This is an autogenerated header - direct modifications to this file is NOT recommended." << std::endl;
- newData << " * Any changes will be overwritten on next revision change or rebuild." << std::endl;
- newData << " */" << std::endl;
- newData << std::endl;
newData << "#ifndef __REVISION_H__" << std::endl;
newData << "#define __REVISION_H__" << std::endl;
- newData << std::endl;
- newData << "#include \"Define.h\"" << std::endl;
- newData << std::endl;
- newData << "#define _PACKAGENAME \"TrinityCore\"" << std::endl;
- newData << "#define _CODENAME \"LONG_COLD_WINTER\"" << std::endl;
- newData << std::endl;
- newData << "#if TRINITY_ENDIAN == TRINITY_BIGENDIAN" << std::endl;
- newData << " #define _ENDIAN_STRING \"big-endian\"" << std::endl;
- newData << "#else" << std::endl;
- newData << " #define _ENDIAN_STRING \"little-endian\"" << std::endl;
- newData << "#endif" << std::endl;
- newData << std::endl;
- newData << "#define _BUILD_DIRECTIVE \"" << build_directive << "\"" << std::endl;
- newData << std::endl;
- newData << "#define _REVISION \"" << rev_str << "\"" << std::endl;
- newData << "#define _HASH \"" << hash_str << "\"" << std::endl;
- newData << "#define _REVISION_DATE \"" << date_str << "\"" << std::endl;
- newData << "#define _REVISION_TIME \"" << time_str << "\""<< std::endl;
- newData << std::endl;
- newData << "#if PLATFORM == PLATFORM_WINDOWS" << std::endl;
- newData << " #ifdef _WIN64" << std::endl;
- newData << " #define _FULLVERSION _PACKAGENAME \" Rev. " << rev_str << "/" << hash_str << " (" << build_directive << ") (Win64,\" _ENDIAN_STRING \")\"" << std::endl;
- newData << " #else" << std::endl;
- newData << " #define _FULLVERSION _PACKAGENAME \" Rev. " << rev_str << "/" << hash_str << " (" << build_directive << ") (Win32,\" _ENDIAN_STRING \")\"" << std::endl;
- newData << " #endif" << std::endl;
- newData << "#else" << std::endl;
- newData << " #define _FULLVERSION _PACKAGENAME \" Rev. " << rev_str << "/" << hash_str << " (" << build_directive << ") (Unix,\" _ENDIAN_STRING \")\"" << std::endl;
- newData << "#endif" << std::endl;
- newData << std::endl;
+ newData << " #define _BUILD_DIRECTIVE \"" << build_directive << "\"" << std::endl;
+ newData << " #define _REVISION \"" << rev_str << "\"" << std::endl;
+ newData << " #define _HASH \"" << hash_str << "\"" << std::endl;
+ newData << " #define _REVISION_DATE \"" << date_str << "\"" << std::endl;
+ newData << " #define _REVISION_TIME \"" << time_str << "\""<< std::endl;
if (!strcmp(rev_str,"Archive") || !strcmp(rev_str,"*"))
{
- newData << "#define FILEVER 0,0,0,0"<< std::endl;
- newData << "#define PRODUCTVER 0,0,0,0"<< std::endl;
+ newData << " #define FILEVER 0,0,0,0"<< std::endl;
+ newData << " #define PRODUCTVER 0,0,0,0"<< std::endl;
}
else
{
- newData << "#define FILEVER 0,0," << rev_str << ",0"<< std::endl;
- newData << "#define PRODUCTVER 0,0," << rev_str << ",0"<< std::endl;
+ newData << " #define FILEVER 0,0," << rev_str << ",0"<< std::endl;
+ newData << " #define PRODUCTVER 0,0," << rev_str << ",0"<< std::endl;
}
- newData << "#define STRFILEVER \"0, 0, " << rev_str << ", " << hash_str << "\""<< std::endl;
- newData << "#define STRPRODUCTVER \"0, 0, " << rev_str << ", " << hash_str << "\""<< std::endl;
- newData << std::endl;
- newData << "#endif /* __REVISION_H__ */" << std::endl;
+ newData << " #define STRFILEVER \"0, 0, " << rev_str << ", " << hash_str << "\""<< std::endl;
+ newData << " #define STRPRODUCTVER \"0, 0, " << rev_str << ", " << hash_str << "\""<< std::endl;
+ newData << "#endif // __REVISION_H__" << std::endl;
return newData.str();
}
@@ -537,3 +507,4 @@ int main(int argc, char **argv)
return 0;
}
+
diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt
index f3bfcdb78a1..17e5fd08450 100644
--- a/src/server/authserver/CMakeLists.txt
+++ b/src/server/authserver/CMakeLists.txt
@@ -31,9 +31,6 @@ set(authserver_SRCS
endif()
include_directories(
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Database
@@ -46,6 +43,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/authserver/Authentication
${CMAKE_SOURCE_DIR}/src/server/authserver/Realms
${CMAKE_SOURCE_DIR}/src/server/authserver/Server
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
)
set(authserver_LINK_FLAGS "")
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index db597055d0b..88a98cd6cdb 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -22,14 +22,13 @@
/// @{
/// \file
-#include "revision.h"
-
#include "Common.h"
#include "Database/DatabaseEnv.h"
#include "Database/PreparedStatements.h"
#include "Configuration/Config.h"
#include "Log.h"
+#include "SystemConfig.h"
#include "Util.h"
#include "SignalHandler.h"
#include "RealmList.h"
diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt
index 034daf09553..18d45074e98 100644
--- a/src/server/collision/CMakeLists.txt
+++ b/src/server/collision/CMakeLists.txt
@@ -21,9 +21,6 @@ set(collision_STAT_SRCS
)
include_directories(
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/externals/g3dlite
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
@@ -34,6 +31,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/collision/Maps
${CMAKE_SOURCE_DIR}/src/server/collision/Models
${CMAKE_BINARY_DIR}
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
)
add_library(collision STATIC ${collision_STAT_SRCS})
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index 3ab856cfb97..54b9ee59215 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -96,9 +96,6 @@ if(MSVC)
endif()
include_directories(
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/externals/mersennetwister
${CMAKE_SOURCE_DIR}/externals/zlib
@@ -185,6 +182,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
)
add_library(game STATIC ${game_STAT_SRCS})
diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp
index d322af5e943..6e4e969e017 100644
--- a/src/server/game/Chat/Commands/Level0.cpp
+++ b/src/server/game/Chat/Commands/Level0.cpp
@@ -18,8 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "revision.h"
-
#include "Common.h"
#include "DatabaseEnv.h"
#include "World.h"
@@ -29,6 +27,8 @@
#include "ObjectAccessor.h"
#include "Language.h"
#include "AccountMgr.h"
+#include "SystemConfig.h"
+#include "revision.h"
#include "Util.h"
bool ChatHandler::HandleHelpCommand(const char* args)
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index ebb1b5d2130..b1eb5aac6fa 100644
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -44,6 +44,7 @@
#include "TargetedMovementGenerator.h"
#include "SkillDiscovery.h"
#include "SkillExtraItems.h"
+#include "SystemConfig.h"
#include "Config.h"
#include "Util.h"
#include "ItemEnchantmentMgr.h"
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index af4e6506f3a..f25dd5824dc 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -18,11 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "revision.h"
-
#include "Common.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
+#include "SystemConfig.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 874694b0c8a..0e5bd88fbb8 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -22,11 +22,10 @@
\ingroup world
*/
-#include "revision.h"
-
#include "Common.h"
#include "DatabaseEnv.h"
#include "Config.h"
+#include "SystemConfig.h"
#include "Log.h"
#include "Opcodes.h"
#include "WorldSession.h"
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index 9a198774d90..a5a36263ba2 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -51,7 +51,6 @@ endif()
message("-- Added Script Library to SCRIPTS lib")
include_directories(
- ${ACE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/externals/mersennetwister
${CMAKE_SOURCE_DIR}/externals/zlib
@@ -136,6 +135,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
+ ${ACE_INCLUDE_DIR}
${MYSQL_INCLUDE_DIR}
)
diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt
index cd053f35bbf..7768d890cf5 100644
--- a/src/server/shared/CMakeLists.txt
+++ b/src/server/shared/CMakeLists.txt
@@ -39,9 +39,6 @@ set(shared_STAT_SRCS
)
include_directories(
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/externals/mersennetwister
${CMAKE_SOURCE_DIR}/externals/SFMT
@@ -60,6 +57,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/shared/Threading
${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
)
diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp
index d230a209d2c..7a3eae0f408 100644
--- a/src/server/shared/Debugging/WheatyExceptionReport.cpp
+++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp
@@ -13,9 +13,10 @@
#include <stdio.h>
#include <tchar.h>
#define _NO_CVCONST_H
-#include "revision.h"
#include <dbghelp.h>
#include "WheatyExceptionReport.h"
+#include "SystemConfig.h"
+#include "revision.h"
#define CrashFolder _T("Crashes")
#pragma comment(linker, "/DEFAULTLIB:dbghelp.lib")
@@ -1037,4 +1038,4 @@ int __cdecl WheatyExceptionReport::_tprintf(const TCHAR * format, ...)
return retValue;
}
-#endif // _WIN32
+#endif // _WIN32 \ No newline at end of file
diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h
new file mode 100644
index 00000000000..e7ad68fe380
--- /dev/null
+++ b/src/server/shared/SystemConfig.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ *
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// THIS FILE IS DEPRECATED
+
+#ifndef TRINITY_SYSTEMCONFIG_H
+#define TRINITY_SYSTEMCONFIG_H
+
+#include "Define.h"
+#include "revision.h"
+
+#define _PACKAGENAME "TrinityCore "
+#define _CODENAME "LONG_COLD_WINTER"
+
+#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
+# define _ENDIAN_STRING "big-endian"
+#else
+# define _ENDIAN_STRING "little-endian"
+#endif
+
+#if PLATFORM == PLATFORM_WINDOWS
+# ifdef _WIN64
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Win64," _ENDIAN_STRING ")"
+# else
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Win32," _ENDIAN_STRING ")"
+# endif
+#else
+# define _FULLVERSION _PACKAGENAME "Rev: " _REVISION " " _BUILD_DIRECTIVE " Hash: " _HASH " (Unix," _ENDIAN_STRING ")"
+#endif
+#endif
+
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index d30d28f5b6f..e322ec31eaa 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -31,9 +31,6 @@ if( WIN32 )
endif()
include_directories(
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/externals/gsoap
${CMAKE_SOURCE_DIR}/externals/sockets/include
@@ -126,6 +123,9 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/worldserver/RemoteAccess
${CMAKE_SOURCE_DIR}/src/server/worldserver/TCSoap
${CMAKE_SOURCE_DIR}/src/server/worldserver/WorldThread
+ ${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
)
set(worldserver_LINK_FLAGS "")
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 42d188895ac..ce2f442fa8f 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -24,9 +24,8 @@
#include <ace/Sig_Handler.h>
-#include "revision.h"
-
#include "Common.h"
+#include "SystemConfig.h"
#include "SignalHandler.h"
#include "World.h"
#include "WorldRunnable.h"