forked from metin-server/m2dev-client-src
check latest files removed
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
#include "StdAfx.h"
|
||||
#if defined(CHECK_LATEST_DATA_FILES)
|
||||
#include "CheckLatestFiles.h"
|
||||
#include "resource.h"
|
||||
|
||||
static struct SCHECKFILELIST
|
||||
{
|
||||
LPCSTR szFileName;
|
||||
DWORD dwCRC32;
|
||||
ULONGLONG ullSize;
|
||||
} s_astCRC32FileList[] = {
|
||||
#include "CRC32_inc.h"
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static bool gs_bQuit = false;
|
||||
|
||||
bool CheckLatestFiles_PollEvent( void )
|
||||
{
|
||||
return gs_bQuit;
|
||||
}
|
||||
|
||||
// 데이타 파일 CRC32 값 검사하기
|
||||
bool CheckFileCRC32( LPCSTR szFileName, DWORD dwCRC32 )
|
||||
{
|
||||
char szMessage[256];
|
||||
|
||||
if (_access( szFileName, 4 ) != 0) {
|
||||
_snprintf(szMessage, sizeof(szMessage)/sizeof(szMessage[0])-1, ApplicationStringTable_GetStringz(IDS_ERR_CANNOT_READ_FILE, "ERR_CANNOT_READ_FILE"), szFileName);
|
||||
ApplicationSetErrorString(szMessage);
|
||||
return false;
|
||||
}
|
||||
DWORD dwLocalCRC32 = GetFileCRC32(szFileName);
|
||||
|
||||
if (dwCRC32 != dwLocalCRC32) {
|
||||
_snprintf(szMessage, sizeof(szMessage)/sizeof(szMessage[0])-1, ApplicationStringTable_GetStringz(IDS_ERR_NOT_LATEST_FILE, "ERR_NOT_LATEST_FILE"), szFileName);
|
||||
ApplicationSetErrorString(szMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
UINT CALLBACK CheckLatestFilesEntry(void * pThis)
|
||||
{
|
||||
::Sleep( 500 );
|
||||
for( int i=0; s_astCRC32FileList[i].szFileName != NULL; i++ ) {
|
||||
if (false == CheckFileCRC32(s_astCRC32FileList[i].szFileName, s_astCRC32FileList[i].dwCRC32)) {
|
||||
gs_bQuit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CheckLatestFiles( void )
|
||||
{
|
||||
unsigned int uThreadID = 0;
|
||||
|
||||
HANDLE hThread = (HANDLE) _beginthreadex(NULL, 0, CheckLatestFilesEntry, NULL, 0, &uThreadID);
|
||||
::SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(CHECK_LATEST_DATA_FILES)
|
||||
bool CheckLatestFiles( void );
|
||||
bool CheckLatestFiles_PollEvent( void );
|
||||
#endif
|
||||
@@ -1,5 +1,2 @@
|
||||
#define LOCALE_SERVICE_EUROPE // 유럽
|
||||
|
||||
#define LSS_SECURITY_KEY "1234abcd5678efgh"
|
||||
|
||||
#define CHECK_LATEST_DATA_FILES
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
#define LOCALE_SERVICE_EUROPE // 유럽
|
||||
|
||||
//#define CHECK_LATEST_DATA_FILES
|
||||
|
||||
#define LSS_SECURITY_KEY "1234abcd5678efgh"
|
||||
|
||||
#define ENABLE_COSTUME_SYSTEM
|
||||
|
||||
#define ENABLE_ENERGY_SYSTEM
|
||||
|
||||
#define ENABLE_DRAGON_SOUL_SYSTEM
|
||||
#define ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#define LOCALE_SERVICE_WE_JAPAN // World Edition(유럽 버젼) 버젼의 일본
|
||||
#define LOCALE_SERVICE_EUROPE // 유럽
|
||||
|
||||
#define LSS_SECURITY_KEY "1234abcd5678efgh"
|
||||
|
||||
#define CHECK_LATEST_DATA_FILES
|
||||
|
||||
#define ENABLE_COSTUME_SYSTEM
|
||||
#define ENABLE_ENERGY_SYSTEM
|
||||
#define USE_OPENID
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "PythonCharacterManager.h"
|
||||
|
||||
#include "ProcessScanner.h"
|
||||
#include "CheckLatestFiles.h"
|
||||
|
||||
extern void GrannyCreateSharedDeformBuffer();
|
||||
extern void GrannyDestroySharedDeformBuffer();
|
||||
@@ -259,11 +258,6 @@ void CPythonApplication::SkipRenderBuffering(DWORD dwSleepMSec)
|
||||
|
||||
bool CPythonApplication::Process()
|
||||
{
|
||||
#if defined(CHECK_LATEST_DATA_FILES)
|
||||
if (CheckLatestFiles_PollEvent())
|
||||
return false;
|
||||
#endif
|
||||
|
||||
ELTimer_SetFrameMSec();
|
||||
|
||||
// m_Profiler.Clear();
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include "eterLib/Util.h"
|
||||
#include "eterBase/CPostIt.h"
|
||||
|
||||
#include "CheckLatestFiles.h"
|
||||
|
||||
extern "C" {
|
||||
extern int _fltused;
|
||||
volatile int _AVOID_FLOATING_POINT_LIBRARY_BUG = _fltused;
|
||||
@@ -492,11 +490,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||
LocaleService_LoadConfig("config/locale.cfg");
|
||||
SetDefaultCodePage(LocaleService_GetCodePage());
|
||||
|
||||
#if defined(CHECK_LATEST_DATA_FILES)
|
||||
if (!CheckLatestFiles())
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
bool bQuit = false;
|
||||
bool bAuthKeyChecked = false; //OpenID 버전에서 인증키가 들어왔는지 알기 위한 인자.
|
||||
int nArgc = 0;
|
||||
|
||||
Reference in New Issue
Block a user