Buildsystem/Linux: Deprecate and remove use of FindTermcap.cmake - it was only used as a solution for older CentOS versions
Core/Genrevision: Move defines from SystemConfig.h file into into revision.h (might need a rename now?) and delete it. This should remove the infamous "rebuild all of game plzkthx"-symptom when upgrading to newer revisions. --HG-- branch : trunk
This commit is contained in:
+14
-15
@@ -43,22 +43,14 @@ endif()
|
||||
include(CheckIncludeFiles)
|
||||
include(cmake/FindPlatform.cmake)
|
||||
include(cmake/FindPCHSupport.cmake)
|
||||
|
||||
if(WIN32)
|
||||
set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/externals)
|
||||
endif()
|
||||
|
||||
include(cmake/FindACE.cmake)
|
||||
include(cmake/FindMySQL.cmake)
|
||||
include(cmake/FindOpenSSL.cmake)
|
||||
|
||||
#
|
||||
# *nix-specific packages ( zlib and bzip2 libraries will be built from sourcetree on WIN32-platforms)
|
||||
#
|
||||
|
||||
if( UNIX )
|
||||
include(cmake/FindReadline.cmake)
|
||||
include(cmake/FindTermcap.cmake)
|
||||
include(FindZLIB)
|
||||
include(FindBZip2)
|
||||
endif()
|
||||
@@ -82,7 +74,7 @@ endif()
|
||||
option(SERVERS "Build worldserver and authserver" 1)
|
||||
option(SCRIPTS "Build worldserver with scripts included" 1)
|
||||
option(TOOLS "Build map/vmap extraction/assembler tools" 0)
|
||||
option(DEBUG "Build worldserver with additional debug-code included" 0)
|
||||
option(COREDEBUG "Build worldserver with additional debug-code included" 0)
|
||||
option(SCRIPTPCH "Use precompiled headers when compiling scripts project" 1)
|
||||
option(GAMEPCH "Use precompiled headers when compiling game project" 1)
|
||||
option(SQL "Copy SQL files during installation" 0)
|
||||
@@ -117,10 +109,10 @@ endif()
|
||||
#endif()
|
||||
|
||||
#
|
||||
# Handle debugmode compiles (this will require further work for proper WIN32-setups)
|
||||
# Handle core debugmode compilation (this will require further work for proper WIN32-setups)
|
||||
#
|
||||
|
||||
if( DEBUG )
|
||||
if( COREDEBUG )
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
@@ -170,13 +162,20 @@ execute_process(
|
||||
OUTPUT_VARIABLE HG_REVISION
|
||||
)
|
||||
|
||||
if(DEFINED NOPCH)
|
||||
set(SCRIPTPCH 0)
|
||||
set(GAMEPCH 0)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Output some generic information about the core and buildtype chosen
|
||||
#
|
||||
|
||||
message("")
|
||||
message("* TrinityCore revision : ${HG_REVISION}")
|
||||
message("* Build binaries in : ${CMAKE_BUILD_TYPE} mode")
|
||||
if( UNIX )
|
||||
message("* Build binaries in : ${CMAKE_BUILD_TYPE} mode")
|
||||
endif()
|
||||
message("")
|
||||
|
||||
#
|
||||
@@ -226,14 +225,14 @@ else()
|
||||
message("* Build map/vmap tools : No (default)")
|
||||
endif()
|
||||
|
||||
if( DEBUG )
|
||||
message("* Build in debug-mode : Yes")
|
||||
if( COREDEBUG )
|
||||
message("* Use coreside debug : Yes")
|
||||
add_definitions(-DTRINITY_DEBUG)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-g)
|
||||
endif()
|
||||
else()
|
||||
message("* Build in debug-mode : No (default)")
|
||||
message("* Use coreside debug : No (default)")
|
||||
endif()
|
||||
|
||||
if( WARNINGS )
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# find Terrmcap (terminal input library) includes and library
|
||||
#
|
||||
# TERMCAP_INCLUDE_DIR - where the directory containing the TERMCAP headers can be found
|
||||
# TERMCAP_LIBRARY - full path to the TERMCAP library
|
||||
# TERMCAP_FOUND - TRUE if TERMCAP was found
|
||||
|
||||
MACRO(FIND_TERMCAP)
|
||||
|
||||
FIND_PATH(TERMCAP_INCLUDE_DIR termcap.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(TERMCAP_LIBRARY NAMES termcap PATH
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
IF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
|
||||
SET(TERMCAP_FOUND TRUE)
|
||||
MESSAGE(STATUS "Found GNU termcap: ${TERMCAP_LIBRARY}")
|
||||
MESSAGE(STATUS "Include dir is: ${TERMCAP_INCLUDE_DIR}")
|
||||
INCLUDE_DIRECTORIES(${TERMCAP_INCLUDE_DIR})
|
||||
ELSE (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
|
||||
SET(TERMCAP_FOUND FALSE)
|
||||
MESSAGE(FATAL_ERROR "Could not find GNU termcap")
|
||||
ENDIF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY)
|
||||
|
||||
ENDMACRO(FIND_TERMCAP)
|
||||
@@ -299,26 +299,56 @@ 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 << " #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;
|
||||
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;
|
||||
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 << "#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 << std::endl;
|
||||
newData << "#endif /* __REVISION_H__ */" << std::endl;
|
||||
|
||||
return newData.str();
|
||||
}
|
||||
@@ -507,4 +537,3 @@ int main(int argc, char **argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
/// @{
|
||||
/// \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"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "World.h"
|
||||
@@ -27,8 +29,6 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Language.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "SystemConfig.h"
|
||||
#include "revision.h"
|
||||
#include "Util.h"
|
||||
|
||||
bool ChatHandler::HandleHelpCommand(const char* args)
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "TargetedMovementGenerator.h"
|
||||
#include "SkillDiscovery.h"
|
||||
#include "SkillExtraItems.h"
|
||||
#include "SystemConfig.h"
|
||||
#include "Config.h"
|
||||
#include "Util.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
* 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"
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
\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"
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
#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")
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
|
||||
#include <ace/Sig_Handler.h>
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "SystemConfig.h"
|
||||
#include "SignalHandler.h"
|
||||
#include "World.h"
|
||||
#include "WorldRunnable.h"
|
||||
|
||||
Reference in New Issue
Block a user