* Renamed several VS projects and the executables they produce to reflect the new naming convention.
* Cleaned up some useless and redundant preprocessor definitions. * Fixed the win build so that it correctly uses the mysql lib it built from the sources. * Note that you still need to use 8615_mysql_openssl_libs.zip for the OpenSSL binaries. * Also note that Win x64 build from the existing VS files is still fubar (mysql lib...). --HG-- branch : trunk
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
# define _TRINITY_REALM_CONFIG "authserver.conf"
|
||||
#endif //_TRINITY_REALM_CONFIG
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include "ServiceWin32.h"
|
||||
char serviceName[] = "TrinityRealm";
|
||||
char serviceLongName[] = "Trinity realm service";
|
||||
@@ -92,7 +92,7 @@ void usage(const char *prog)
|
||||
{
|
||||
sLog.outString("Usage: \n %s [<options>]\n"
|
||||
" -c config_file use config_file as configuration file\n\r"
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
" Running as service functions:\n\r"
|
||||
" --service run as service\n\r"
|
||||
" -s install install service\n\r"
|
||||
@@ -122,7 +122,7 @@ extern int main(int argc, char **argv)
|
||||
cfg_file = argv[c];
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
////////////
|
||||
//Services//
|
||||
////////////
|
||||
@@ -243,7 +243,7 @@ extern int main(int argc, char **argv)
|
||||
#endif /* _WIN32 */();
|
||||
|
||||
///- Handle affinity for multiple processors and process priority on Windows
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
{
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
|
||||
@@ -315,7 +315,7 @@ extern int main(int argc, char **argv)
|
||||
sLog.outDetail("Ping MySQL to keep connection alive");
|
||||
LoginDatabase.Query("SELECT 1 FROM realmlist LIMIT 1");
|
||||
}
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (m_ServiceStatus == 0) stopEvent = true;
|
||||
while (m_ServiceStatus == 2) Sleep(1000);
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "DBCStores.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define DO_SCRIPTS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -769,14 +769,14 @@ namespace Trinity
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
template<> inline void Visit(CorpseMapType &) {}
|
||||
template<> inline void Visit(GameObjectMapType &) {}
|
||||
template<> inline void Visit(DynamicObjectMapType &) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
template<> inline void SpellNotifierCreatureAndPlayer::Visit(CorpseMapType&) {}
|
||||
template<> inline void SpellNotifierCreatureAndPlayer::Visit(GameObjectMapType&) {}
|
||||
template<> inline void SpellNotifierCreatureAndPlayer::Visit(DynamicObjectMapType&) {}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define PLATFORM_APPLE 2
|
||||
#define PLATFORM_INTEL 3
|
||||
|
||||
// must be first (win 64 also define WIN32)
|
||||
// must be first (win 64 also define _WIN32)
|
||||
#if defined( _WIN64 )
|
||||
# define PLATFORM PLATFORM_WINDOWS
|
||||
#elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
|
||||
|
||||
@@ -113,7 +113,7 @@ bool Database::Initialize(const char *infoString)
|
||||
database = *iter++;
|
||||
|
||||
mysql_options(mysqlInit, MYSQL_SET_CHARSET_NAME, "utf8");
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (host==".") // named pipe use option (Windows)
|
||||
{
|
||||
unsigned int opt = MYSQL_PROTOCOL_PIPE;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "ace/Thread_Mutex.h"
|
||||
#include "ace/Guard_T.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define FD_SETSIZE 1024
|
||||
#include <winsock2.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "Field.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define FD_SETSIZE 1024
|
||||
#include <winsock2.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#ifndef _WIN32_SERVICE_
|
||||
#define _WIN32_SERVICE_
|
||||
|
||||
@@ -27,5 +27,5 @@ bool WinServiceUninstall();
|
||||
bool WinServiceRun();
|
||||
|
||||
#endif // _WIN32_SERVICE_
|
||||
#endif // WIN32
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ uint32 CreatePIDFile(const std::string& filename)
|
||||
if (pid_file == NULL)
|
||||
return 0;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
DWORD pid = GetCurrentProcessId();
|
||||
#else
|
||||
pid_t pid = getpid();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
# define _TRINITY_CORE_CONFIG "worldserver.conf"
|
||||
#endif //_TRINITY_CORE_CONFIG
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include "ServiceWin32.h"
|
||||
char serviceName[] = "TrinityCore";
|
||||
char serviceLongName[] = "Trinity core service";
|
||||
@@ -62,7 +62,7 @@ void usage(const char *prog)
|
||||
{
|
||||
sLog.outString("Usage: \n %s [<options>]\n"
|
||||
" -c config_file use config_file as configuration file\n\r"
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
" Running as service functions:\n\r"
|
||||
" --service run as service\n\r"
|
||||
" -s install install service\n\r"
|
||||
@@ -91,7 +91,7 @@ extern int main(int argc, char **argv)
|
||||
cfg_file = argv[c];
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
////////////
|
||||
//Services//
|
||||
////////////
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "ListenSocket.h"
|
||||
#include "BigNumber.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include "ServiceWin32.h"
|
||||
extern int m_ServiceStatus;
|
||||
#endif
|
||||
@@ -285,7 +285,7 @@ int Master::Run()
|
||||
|
||||
ACE_Based::Thread* cliThread = NULL;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (sConfig.GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/)
|
||||
#else
|
||||
if (sConfig.GetBoolDefault("Console.Enable", true))
|
||||
@@ -298,7 +298,7 @@ int Master::Run()
|
||||
ACE_Based::Thread rar_thread(new RARunnable);
|
||||
|
||||
///- Handle affinity for multiple processors and process priority on Windows
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
{
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
|
||||
@@ -386,7 +386,7 @@ int Master::Run()
|
||||
|
||||
if (cliThread)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
// this only way to terminate CLI thread exist at Win32 (alt. way exist only in Windows Vista API)
|
||||
//_exit(1);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#define WORLD_SLEEP_CONST 50
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include "ServiceWin32.h"
|
||||
extern int m_ServiceStatus;
|
||||
#endif
|
||||
@@ -76,7 +76,7 @@ void WorldRunnable::run()
|
||||
else
|
||||
prevSleepTime = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE);
|
||||
while (m_ServiceStatus == 2) Sleep(1000);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user