55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
// SunUpdateAgent.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include <conio.h>
|
|
#include <SolarDump.h>
|
|
#include "SunUpdateAgent.h"
|
|
|
|
VOID SetTitle()
|
|
{
|
|
TCHAR szTitle[MAX_PATH];
|
|
_snprintf( szTitle, MAX_PATH, "SUN UpdateAgent : PROTOCOL VER[%d.%d.%d], BUILD VER[%d.%d.%d] ",
|
|
PROTOCOL_HIGH_VERSION_NO, PROTOCOL_MIDDLE_VERSION_NO, PROTOCOL_LOW_VERSION_NO,
|
|
BUILD_HIGH_VERSION_NO, BUILD_MIDDLE_VERSION_NO, BUILD_LOW_VERSION_NO );
|
|
|
|
SetConsoleTitle( szTitle );
|
|
}
|
|
|
|
BOOL InitLog()
|
|
{
|
|
g_pLog = new CBasicLog;
|
|
|
|
// 로그 초기화.
|
|
if( !g_pLog->Init( "./", "UpdateAgent" ) )
|
|
{
|
|
MessageBox( NULL, "LOG 모듈 초기화 실패", NULL, MB_OK );
|
|
return FALSE;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
int _tmain(int argc, _TCHAR* argv[])
|
|
{
|
|
SolarDump dump;
|
|
|
|
SetTitle();
|
|
if( !InitLog() ) return 0;
|
|
|
|
MSGOUT( "*** Start UpdateAgent *** ");
|
|
|
|
if( !SunUpdateAgent::Instance()->Init() )
|
|
MSGOUT( "초기화 실패" );
|
|
|
|
if( !SunUpdateAgent::Instance()->StartCheckGameServer() )
|
|
MSGOUT( "게임서버 체크 실패 " );
|
|
|
|
SunUpdateAgent::Instance()->Run();
|
|
SunUpdateAgent::Instance()->SetCheckThread( FALSE );
|
|
SunUpdateAgent::Instance()->Release();
|
|
|
|
return 0;
|
|
}
|
|
|