mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 04:42:10 +01:00
Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)
This commit is contained in:
@@ -45,7 +45,7 @@ namespace fs = boost::filesystem;
|
||||
# define _TRINITY_BNET_CONFIG "bnetserver.conf"
|
||||
#endif
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
#include "ServiceWin32.h"
|
||||
char serviceName[] = "bnetserver";
|
||||
char serviceLongName[] = "TrinityCore bnet service";
|
||||
@@ -88,7 +88,7 @@ int main(int argc, char** argv)
|
||||
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
if (configService.compare("install") == 0)
|
||||
return WinServiceInstall() ? 0 : 1;
|
||||
else if (configService.compare("uninstall") == 0)
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// Set signal handlers
|
||||
boost::asio::signal_set signals(*_ioService, SIGINT, SIGTERM);
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
signals.add(SIGBREAK);
|
||||
#endif
|
||||
signals.async_wait(SignalHandler);
|
||||
@@ -198,7 +198,7 @@ int main(int argc, char** argv)
|
||||
_banExpiryCheckTimer->expires_from_now(boost::posix_time::seconds(_banExpiryCheckInterval));
|
||||
_banExpiryCheckTimer->async_wait(BanExpiryHandler);
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
if (m_ServiceStatus != -1)
|
||||
{
|
||||
_serviceStatusWatchTimer = new boost::asio::deadline_timer(*_ioService);
|
||||
@@ -289,7 +289,7 @@ void BanExpiryHandler(boost::system::error_code const& error)
|
||||
}
|
||||
}
|
||||
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
void ServiceStatusWatcher(boost::system::error_code const& error)
|
||||
{
|
||||
if (!error)
|
||||
@@ -319,7 +319,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s
|
||||
("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_BNET_CONFIG)),
|
||||
"use <arg> as configuration file")
|
||||
;
|
||||
#if PLATFORM == PLATFORM_WINDOWS
|
||||
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
|
||||
options_description win("Windows platform specific options");
|
||||
win.add_options()
|
||||
("service,s", value<std::string>(&configService)->default_value(""), "Windows service options: [install | uninstall]")
|
||||
|
||||
Reference in New Issue
Block a user