Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
Tools/NeoPatchMaker/Common.h
Normal file
23
Tools/NeoPatchMaker/Common.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _COMMON_H_
|
||||
#define _COMMON_H_
|
||||
|
||||
#ifndef _QWORD_DEFINED
|
||||
#define _QWORD_DEFINED
|
||||
typedef __int64 QWORD, *LPQWORD;
|
||||
#endif
|
||||
|
||||
#define MAKEQWORD(a, b) \
|
||||
((QWORD)( ((QWORD) ((DWORD) (a))) << 32 | ((DWORD) (b))))
|
||||
|
||||
#define LODWORD(l) \
|
||||
((DWORD)(l))
|
||||
#define HIDWORD(l) \
|
||||
((DWORD)(((QWORD)(l) >> 32) & 0xFFFFFFFF))
|
||||
|
||||
// Read 4K of data at a time (used in the C++ streams, Win32 I/O, and assembly functions)
|
||||
#define MAX_BUFFER_SIZE 4096
|
||||
|
||||
// Map a "view" size of 10MB (used in the filemap function)
|
||||
#define MAX_VIEW_SIZE 10485760
|
||||
|
||||
#endif
|
||||
437
Tools/NeoPatchMaker/Crc32Static.cpp
Normal file
437
Tools/NeoPatchMaker/Crc32Static.cpp
Normal file
@@ -0,0 +1,437 @@
|
||||
#include "stdafx.h"
|
||||
#include "Crc32Static.h"
|
||||
//#include <fstream.h>
|
||||
|
||||
// Static CRC table
|
||||
DWORD CCrc32Static::s_arrdwCrc32Table[256] =
|
||||
{
|
||||
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
|
||||
0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
|
||||
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
|
||||
0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
|
||||
0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
|
||||
0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
|
||||
0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
|
||||
0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
|
||||
0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
|
||||
0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
|
||||
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
|
||||
0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
|
||||
0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
|
||||
0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
|
||||
0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
|
||||
0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
|
||||
|
||||
0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
|
||||
0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
|
||||
0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
|
||||
0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
|
||||
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
|
||||
0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
|
||||
0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
|
||||
0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
|
||||
0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
|
||||
0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
|
||||
0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
|
||||
0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
|
||||
0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
|
||||
0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
|
||||
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
|
||||
0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
|
||||
|
||||
0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
|
||||
0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
|
||||
0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
|
||||
0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
|
||||
0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
|
||||
0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
|
||||
0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
|
||||
0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
|
||||
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
|
||||
0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
|
||||
0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
|
||||
0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
|
||||
0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
|
||||
0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
|
||||
0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
|
||||
0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
|
||||
|
||||
0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
|
||||
0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
|
||||
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
|
||||
0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
|
||||
0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
|
||||
0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
|
||||
0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
|
||||
0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
|
||||
0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
|
||||
0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
|
||||
0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
|
||||
0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
|
||||
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
|
||||
0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
|
||||
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
|
||||
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,
|
||||
};
|
||||
|
||||
//***********************************************
|
||||
CCrc32Static::CCrc32Static()
|
||||
{
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
CCrc32Static::~CCrc32Static()
|
||||
{
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
inline void CCrc32Static::CalcCrc32(const BYTE byte, DWORD &dwCrc32)
|
||||
{
|
||||
dwCrc32 = ((dwCrc32) >> 8) ^ s_arrdwCrc32Table[(byte) ^ ((dwCrc32) & 0x000000FF)];
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
bool CCrc32Static::GetFileSizeQW(const HANDLE hFile, QWORD &qwSize)
|
||||
{
|
||||
_ASSERTE(hFile != INVALID_HANDLE_VALUE);
|
||||
|
||||
bool bSuccess = true;
|
||||
|
||||
try
|
||||
{
|
||||
DWORD dwLo = 0, dwHi = 0;
|
||||
dwLo = GetFileSize(hFile, &dwHi);
|
||||
|
||||
if(dwLo == INVALID_FILE_SIZE && GetLastError() != NO_ERROR)
|
||||
{
|
||||
bSuccess = false;
|
||||
qwSize = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
qwSize = MAKEQWORD(dwHi, dwLo);
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
DWORD CCrc32Static::StringCrc32(LPCTSTR szString, DWORD &dwCrc32)
|
||||
{
|
||||
_ASSERTE(szString);
|
||||
|
||||
DWORD dwErrorCode = NO_ERROR;
|
||||
|
||||
dwCrc32 = 0xFFFFFFFF;
|
||||
|
||||
try
|
||||
{
|
||||
while(*szString != _T('\0'))
|
||||
{
|
||||
CalcCrc32((BYTE)*szString, dwCrc32);
|
||||
szString++;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// An unknown exception happened
|
||||
dwErrorCode = ERROR_CRC;
|
||||
}
|
||||
|
||||
dwCrc32 = ~dwCrc32;
|
||||
|
||||
return dwErrorCode;
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
DWORD CCrc32Static::FileCrc32Streams(LPCTSTR szFilename, DWORD &dwCrc32)
|
||||
{
|
||||
/*
|
||||
#if UNICODE || _UNICODE
|
||||
return ERROR_NOT_SUPPORTED;
|
||||
#else
|
||||
_ASSERTE(szFilename);
|
||||
_ASSERTE(lstrlen(szFilename));
|
||||
|
||||
DWORD dwErrorCode = NO_ERROR;
|
||||
ifstream file;
|
||||
|
||||
dwCrc32 = 0xFFFFFFFF;
|
||||
|
||||
try
|
||||
{
|
||||
// Open the file
|
||||
file.open(szFilename, ios::in | ios::nocreate | ios::binary, filebuf::sh_read);
|
||||
|
||||
if(file.is_open())
|
||||
{
|
||||
char buffer[MAX_BUFFER_SIZE];
|
||||
int nLoop, nCount;
|
||||
nCount = file.read(buffer, sizeof(buffer)).gcount();
|
||||
while(nCount)
|
||||
{
|
||||
for(nLoop = 0; nLoop < nCount; nLoop++)
|
||||
CalcCrc32(buffer[nLoop], dwCrc32);
|
||||
nCount = file.read(buffer, sizeof(buffer)).gcount();
|
||||
}
|
||||
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// An unknown exception happened
|
||||
dwErrorCode = ERROR_CRC;
|
||||
}
|
||||
|
||||
if(file.is_open()) file.close();
|
||||
|
||||
dwCrc32 = ~dwCrc32;
|
||||
|
||||
return dwErrorCode;
|
||||
#endif
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
DWORD CCrc32Static::FileCrc32Win32(LPCTSTR szFilename, DWORD &dwCrc32)
|
||||
{
|
||||
_ASSERTE(szFilename);
|
||||
_ASSERTE(lstrlen(szFilename));
|
||||
|
||||
DWORD dwErrorCode = NO_ERROR;
|
||||
HANDLE hFile = NULL;
|
||||
|
||||
dwCrc32 = 0xFFFFFFFF;
|
||||
|
||||
try
|
||||
{
|
||||
// Open the file
|
||||
hFile = CreateFile(szFilename,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_SEQUENTIAL_SCAN,
|
||||
NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
dwErrorCode = GetLastError();
|
||||
else
|
||||
{
|
||||
BYTE buffer[MAX_BUFFER_SIZE];
|
||||
DWORD dwBytesRead, dwLoop;
|
||||
BOOL bSuccess = ReadFile(hFile, buffer, sizeof(buffer), &dwBytesRead, NULL);
|
||||
while(bSuccess && dwBytesRead)
|
||||
{
|
||||
for(dwLoop = 0; dwLoop < dwBytesRead; dwLoop++)
|
||||
CalcCrc32(buffer[dwLoop], dwCrc32);
|
||||
bSuccess = ReadFile(hFile, buffer, sizeof(buffer), &dwBytesRead, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// An unknown exception happened
|
||||
dwErrorCode = ERROR_CRC;
|
||||
}
|
||||
|
||||
if(hFile != NULL) CloseHandle(hFile);
|
||||
|
||||
dwCrc32 = ~dwCrc32;
|
||||
|
||||
return dwErrorCode;
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
DWORD CCrc32Static::FileCrc32Filemap(LPCTSTR szFilename, DWORD &dwCrc32)
|
||||
{
|
||||
_ASSERTE(szFilename);
|
||||
_ASSERTE(lstrlen(szFilename));
|
||||
|
||||
DWORD dwErrorCode = NO_ERROR;
|
||||
HANDLE hFile = NULL, hFilemap = NULL;
|
||||
|
||||
dwCrc32 = 0xFFFFFFFF;
|
||||
|
||||
try
|
||||
{
|
||||
// Open the file
|
||||
hFile = CreateFile(szFilename,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_SEQUENTIAL_SCAN,
|
||||
NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
dwErrorCode = GetLastError();
|
||||
else
|
||||
{
|
||||
QWORD qwFileSize = 0, qwFileOffset = 0;
|
||||
DWORD dwByteCount, dwViewSize;
|
||||
DWORD dwBaseAddress;
|
||||
|
||||
// Get the file size
|
||||
if(!GetFileSizeQW(hFile, qwFileSize))
|
||||
dwErrorCode = ERROR_BAD_LENGTH;
|
||||
else if(qwFileSize != 0) // We cannot CRC zero byte files
|
||||
{
|
||||
// Create the file mapping
|
||||
hFilemap = CreateFileMapping(hFile,
|
||||
NULL,
|
||||
PAGE_READONLY,
|
||||
0,
|
||||
0,
|
||||
NULL);
|
||||
if(hFilemap == NULL)
|
||||
dwErrorCode = GetLastError();
|
||||
else
|
||||
{
|
||||
LPBYTE pByte;
|
||||
|
||||
// Loop while we map a section of the file and CRC it
|
||||
while(qwFileSize > 0)
|
||||
{
|
||||
if(qwFileSize < MAX_VIEW_SIZE)
|
||||
dwViewSize = LODWORD(qwFileSize);
|
||||
else
|
||||
dwViewSize = MAX_VIEW_SIZE;
|
||||
|
||||
dwBaseAddress = (DWORD)MapViewOfFile(hFilemap,
|
||||
FILE_MAP_READ,
|
||||
HIDWORD(qwFileOffset),
|
||||
LODWORD(qwFileOffset),
|
||||
dwViewSize);
|
||||
|
||||
dwByteCount = dwViewSize;
|
||||
pByte = (LPBYTE)dwBaseAddress;
|
||||
while(dwByteCount-- > 0)
|
||||
{
|
||||
CalcCrc32(*pByte, dwCrc32);
|
||||
pByte++;
|
||||
}
|
||||
|
||||
UnmapViewOfFile((LPVOID)dwBaseAddress);
|
||||
qwFileOffset += dwViewSize;
|
||||
qwFileSize -= dwViewSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// An unknown exception happened
|
||||
dwErrorCode = ERROR_CRC;
|
||||
}
|
||||
|
||||
if(hFile != NULL) CloseHandle(hFile);
|
||||
if(hFilemap != NULL) CloseHandle(hFilemap);
|
||||
|
||||
dwCrc32 = ~dwCrc32;
|
||||
|
||||
return dwErrorCode;
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
DWORD CCrc32Static::FileCrc32Assembly(LPCTSTR szFilename, DWORD &dwCrc32)
|
||||
{
|
||||
_ASSERTE(szFilename);
|
||||
_ASSERTE(lstrlen(szFilename));
|
||||
|
||||
DWORD dwErrorCode = NO_ERROR;
|
||||
HANDLE hFile = NULL;
|
||||
|
||||
dwCrc32 = 0xFFFFFFFF;
|
||||
|
||||
try
|
||||
{
|
||||
// Open the file
|
||||
hFile = CreateFile(szFilename,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_SEQUENTIAL_SCAN,
|
||||
NULL);
|
||||
if(hFile == INVALID_HANDLE_VALUE)
|
||||
dwErrorCode = GetLastError();
|
||||
else
|
||||
{
|
||||
// There is a bug in the Microsoft compilers where inline assembly
|
||||
// code cannot access static member variables. This is a work around
|
||||
// for that bug. For more info see Knowledgebase article Q88092
|
||||
LPVOID ptrCrc32Table = &s_arrdwCrc32Table;
|
||||
|
||||
BYTE buffer[MAX_BUFFER_SIZE];
|
||||
DWORD dwBytesRead;
|
||||
BOOL bSuccess = ReadFile(hFile, buffer, sizeof(buffer), &dwBytesRead, NULL);
|
||||
while(bSuccess && dwBytesRead)
|
||||
{
|
||||
// Register use:
|
||||
// eax - CRC32 value
|
||||
// ebx - a lot of things
|
||||
// ecx - CRC32 value
|
||||
// edx - address of end of buffer
|
||||
// esi - address of start of buffer
|
||||
// edi - CRC32 table
|
||||
__asm
|
||||
{
|
||||
// Save the esi and edi registers
|
||||
push esi
|
||||
push edi
|
||||
|
||||
mov eax, dwCrc32 // Load the pointer to dwCrc32
|
||||
mov ecx, [eax] // Dereference the pointer to load dwCrc32
|
||||
|
||||
mov edi, ptrCrc32Table // Load the CRC32 table
|
||||
|
||||
lea esi, buffer // Load buffer
|
||||
mov ebx, dwBytesRead // Load dwBytesRead
|
||||
lea edx, [esi + ebx] // Calculate the end of the buffer
|
||||
|
||||
crc32loop:
|
||||
xor eax, eax // Clear the eax register
|
||||
mov bl, byte ptr [esi] // Load the current source byte
|
||||
|
||||
mov al, cl // Copy crc value into eax
|
||||
inc esi // Advance the source pointer
|
||||
|
||||
xor al, bl // Create the index into the CRC32 table
|
||||
shr ecx, 8
|
||||
|
||||
mov ebx, [edi + eax * 4] // Get the value out of the table
|
||||
xor ecx, ebx // xor with the current byte
|
||||
|
||||
cmp edx, esi // Have we reached the end of the buffer?
|
||||
jne crc32loop
|
||||
|
||||
// Restore the edi and esi registers
|
||||
pop edi
|
||||
pop esi
|
||||
|
||||
mov eax, dwCrc32 // Load the pointer to dwCrc32
|
||||
mov [eax], ecx // Write the result
|
||||
}
|
||||
bSuccess = ReadFile(hFile, buffer, sizeof(buffer), &dwBytesRead, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// An unknown exception happened
|
||||
dwErrorCode = ERROR_CRC;
|
||||
}
|
||||
|
||||
if(hFile != NULL) CloseHandle(hFile);
|
||||
|
||||
dwCrc32 = ~dwCrc32;
|
||||
|
||||
return dwErrorCode;
|
||||
}
|
||||
25
Tools/NeoPatchMaker/Crc32Static.h
Normal file
25
Tools/NeoPatchMaker/Crc32Static.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _CRC32STATIC_H_
|
||||
#define _CRC32STATIC_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
class CCrc32Static
|
||||
{
|
||||
public:
|
||||
CCrc32Static();
|
||||
virtual ~CCrc32Static();
|
||||
|
||||
static DWORD StringCrc32(LPCTSTR szString, DWORD &dwCrc32);
|
||||
static DWORD FileCrc32Streams(LPCTSTR szFilename, DWORD &dwCrc32);
|
||||
static DWORD FileCrc32Win32(LPCTSTR szFilename, DWORD &dwCrc32);
|
||||
static DWORD FileCrc32Filemap(LPCTSTR szFilename, DWORD &dwCrc32);
|
||||
static DWORD FileCrc32Assembly(LPCTSTR szFilename, DWORD &dwCrc32);
|
||||
|
||||
protected:
|
||||
static bool GetFileSizeQW(const HANDLE hFile, QWORD &qwSize);
|
||||
static inline void CalcCrc32(const BYTE byte, DWORD &dwCrc32);
|
||||
|
||||
static DWORD s_arrdwCrc32Table[256];
|
||||
};
|
||||
|
||||
#endif
|
||||
66
Tools/NeoPatchMaker/NeoPatchMaker.cpp
Normal file
66
Tools/NeoPatchMaker/NeoPatchMaker.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
// NeoPatchMaker.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "NeoPatchMaker.h"
|
||||
#include "NeoPatchMakerDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CNeoPatchMakerApp, CWinApp)
|
||||
//{{AFX_MSG_MAP(CNeoPatchMakerApp)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code!
|
||||
//}}AFX_MSG
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerApp construction
|
||||
|
||||
CNeoPatchMakerApp::CNeoPatchMakerApp()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// The one and only CNeoPatchMakerApp object
|
||||
|
||||
CNeoPatchMakerApp theApp;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerApp initialization
|
||||
|
||||
BOOL CNeoPatchMakerApp::InitInstance()
|
||||
{
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need.
|
||||
|
||||
CNeoPatchMakerDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
int nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with OK
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
||||
49
Tools/NeoPatchMaker/NeoPatchMaker.h
Normal file
49
Tools/NeoPatchMaker/NeoPatchMaker.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// NeoPatchMaker.h : main header file for the NEOPATCHMAKER application
|
||||
//
|
||||
|
||||
#if !defined(AFX_NEOPATCHMAKER_H__0C112C6D_C051_46F1_B1CF_D6A670B8A7E3__INCLUDED_)
|
||||
#define AFX_NEOPATCHMAKER_H__0C112C6D_C051_46F1_B1CF_D6A670B8A7E3__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerApp:
|
||||
// See NeoPatchMaker.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CNeoPatchMakerApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CNeoPatchMakerApp();
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CNeoPatchMakerApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
//{{AFX_MSG(CNeoPatchMakerApp)
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_NEOPATCHMAKER_H__0C112C6D_C051_46F1_B1CF_D6A670B8A7E3__INCLUDED_)
|
||||
257
Tools/NeoPatchMaker/NeoPatchMaker.rc
Normal file
257
Tools/NeoPatchMaker/NeoPatchMaker.rc
Normal file
@@ -0,0 +1,257 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 한국어 resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#endif //_WIN32\r\n"
|
||||
"#include ""res\\NeoPatchMaker.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""l.kor\\afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\NeoPatchMaker.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "NeoPatchMaker 정보"
|
||||
FONT 9, "굴림", 0, 0, 0x0
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "NeoPatchMaker 버전 2.1",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2008 Youxiland",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "확인",IDOK,178,7,50,14,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_NEOPATCHMAKER_DIALOG DIALOGEX 0, 0, 319, 429
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "NeoPatchMaker V2"
|
||||
FONT 9, "굴림", 0, 0, 0x1
|
||||
BEGIN
|
||||
CTEXT "구버전 패키지 위치",IDC_STATIC,7,28,77,13,
|
||||
SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_PACKAGE_LOCATION,87,28,93,13,ES_AUTOHSCROLL
|
||||
CTEXT "신버전 Client 위치",IDC_STATIC,7,45,77,13,
|
||||
SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_SRC_LOCATION,87,45,93,13,ES_AUTOHSCROLL
|
||||
CTEXT "신버전 패키지 저장위치",IDC_STATIC,7,61,77,13,
|
||||
SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_DEST_LOCATION,87,61,93,13,ES_AUTOHSCROLL
|
||||
CTEXT "새 패키지 버전",IDC_STATIC,7,78,77,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_VERSION,87,78,93,13,ES_AUTOHSCROLL
|
||||
CTEXT "패키지 최대크기",IDC_STATIC,7,95,77,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_PACKAGE_MAX_SIZE,87,95,93,13,ES_RIGHT |
|
||||
ES_AUTOHSCROLL
|
||||
GROUPBOX "FTP",IDC_STATIC,201,28,111,91
|
||||
CTEXT "주소",IDC_STATIC,206,40,21,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_FTP_ADDR,233,40,75,13,ES_AUTOHSCROLL
|
||||
CTEXT "Port",IDC_STATIC,206,57,21,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_FTP_PORT,233,57,75,13,ES_AUTOHSCROLL
|
||||
CTEXT "ID",IDC_STATIC,206,73,21,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_FTP_ACCOUNT,233,73,75,13,ES_AUTOHSCROLL
|
||||
CTEXT "PW",IDC_STATIC,206,90,21,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_FTP_PASSWORD,233,90,75,13,ES_AUTOHSCROLL
|
||||
CONTROL "Passive mode",IDC_CHECK_PASSIVE_MODE,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,214,107,61,9
|
||||
GROUPBOX "구버전 패키지 파일",IDC_STATIC,7,118,305,32
|
||||
CONTROL "없음(패키지 신규생성)",IDC_RADIO_SRC_TYPE_NONE,"Button",
|
||||
BS_AUTORADIOBUTTON | BS_FLAT | WS_GROUP,16,132,81,13
|
||||
CONTROL "로컬 디렉토리",IDC_RADIO_SRC_TYPE_LOCAL,"Button",
|
||||
BS_AUTORADIOBUTTON | BS_FLAT,117,132,81,13
|
||||
CONTROL "FTP",IDC_RADIO_SRC_TYPE_FTP,"Button",BS_AUTORADIOBUTTON |
|
||||
BS_FLAT,216,132,81,13
|
||||
GROUPBOX "신버전 패키지 파일",IDC_STATIC,7,160,305,32
|
||||
CONTROL "로컬 디렉토리",IDC_RADIO_DEST_TYPE_LOCAL,"Button",
|
||||
BS_AUTORADIOBUTTON | BS_FLAT | WS_GROUP,16,173,81,13
|
||||
CONTROL "FTP",IDC_RADIO_DEST_TYPE_FTP,"Button",
|
||||
BS_AUTORADIOBUTTON | BS_FLAT,117,173,81,13
|
||||
GROUPBOX "업데이트 대상 파일",IDC_STATIC,7,231,305,90
|
||||
CONTROL "List1",IDC_LIST_FILE,"SysListView32",LVS_REPORT |
|
||||
WS_BORDER | WS_TABSTOP,7,243,305,78
|
||||
EDITTEXT IDC_INFOVIEW,7,329,305,49,ES_MULTILINE | ES_AUTOHSCROLL |
|
||||
ES_READONLY | WS_VSCROLL | WS_HSCROLL
|
||||
PUSHBUTTON ">_<",IDC_BUTTON_GO,234,388,78,34
|
||||
PUSHBUTTON "...",IDC_BUTTON_BROWSE_PACKAGE_LOCATION,184,29,12,12
|
||||
PUSHBUTTON "...",IDC_BUTTON_BROWSE_SRC_LOCATION,184,46,12,12
|
||||
PUSHBUTTON "...",IDC_BUTTON_BROWSE_DEST_LOCATION,184,62,12,12
|
||||
CTEXT "KB",IDC_STATIC,184,95,12,13,SS_CENTERIMAGE
|
||||
CONTROL "부분파일만으로 작업",IDC_CHECK_PARTIAL_FILE_COMAPARE,
|
||||
"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,16,194,
|
||||
77,17
|
||||
CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",0x1,124,
|
||||
197,157,8
|
||||
CTEXT "버전확인",IDC_STATIC,7,11,77,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_PATCHINFO_VERSION,87,11,76,13,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
PUSHBUTTON "확인",IDC_BUTTON_CHECK_PATCHINFO_VERSION,166,11,30,12
|
||||
CONTROL "Notice 폴더를 포함",IDC_NOTICE_CHECK,"Button",
|
||||
BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,16,212,75,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041204B0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "NeoPatchMaker MFC 응용 프로그램"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "NeoPatchMaker"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2003"
|
||||
VALUE "OriginalFilename", "NeoPatchMaker.EXE"
|
||||
VALUE "ProductName", "NeoPatchMaker 응용 프로그램"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x412, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_NEOPATCHMAKER_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 312
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 422
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "NeoPatchMaker 정보(&A)..."
|
||||
END
|
||||
|
||||
#endif // 한국어 resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
#include "res\NeoPatchMaker.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "l.kor\afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
306
Tools/NeoPatchMaker/NeoPatchMaker.vcproj
Normal file
306
Tools/NeoPatchMaker/NeoPatchMaker.vcproj
Normal file
@@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="NeoPatchMaker"
|
||||
ProjectGUID="{4B42D536-47B0-4849-A87B-97FBB25CFB42}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\ZipArchive\Include,..\PatchCommon"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/NeoPatchMaker.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ZipArchive_MFCSTATIC_d.lib"
|
||||
OutputFile="Debug/NeoPatchMakerV2.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="../ZipArchive/Lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\Debug/NeoPatchMakerV2.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/NeoPatchMaker.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\ZipArchive\Include,..\PatchCommon"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Release/NeoPatchMaker.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ZipArchive_MFCSTATIC.lib"
|
||||
OutputFile="Release/NeoPatchMakerV2.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="../ZipArchive/Lib"
|
||||
ProgramDatabaseFile=".\Release/NeoPatchMakerV2.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/NeoPatchMaker.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="Crc32Static.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NeoPatchMaker.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NeoPatchMaker.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NeoPatchMakerDlg.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PatchMaker.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="Common.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Crc32Static.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NeoPatchMaker.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NeoPatchMakerDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PatchMaker.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
<File
|
||||
RelativePath="res\NeoPatchMaker.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\NeoPatchMaker.rc2">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="NeoPatchMaker.rc"/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
226
Tools/NeoPatchMaker/NeoPatchMaker.vcxproj
Normal file
226
Tools/NeoPatchMaker/NeoPatchMaker.vcxproj
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4B42D536-47B0-4849-A87B-97FBB25CFB42}</ProjectGuid>
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\ZipArchive\Include;..\PatchCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/NeoPatchMaker.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ZipArchive_MFCSTATIC_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>Debug/NeoPatchMakerV2.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>../ZipArchive/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/NeoPatchMakerV2.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/NeoPatchMaker.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\ZipArchive\Include;..\PatchCommon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\Release/NeoPatchMaker.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ZipArchive_MFCSTATIC.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>Release/NeoPatchMakerV2.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>../ZipArchive/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ProgramDatabaseFile>.\Release/NeoPatchMakerV2.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/NeoPatchMaker.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Crc32Static.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NeoPatchMaker.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NeoPatchMakerDlg.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PatchMaker.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StdAfx.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="NeoPatchMaker.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Common.h" />
|
||||
<ClInclude Include="Crc32Static.h" />
|
||||
<ClInclude Include="NeoPatchMaker.h" />
|
||||
<ClInclude Include="NeoPatchMakerDlg.h" />
|
||||
<ClInclude Include="PatchMaker.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="StdAfx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\NeoPatchMaker.ico" />
|
||||
<None Include="res\NeoPatchMaker.rc2" />
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PatchCommon\PatchCommon.vcxproj">
|
||||
<Project>{69c31401-5a6b-4288-9dd5-72566af594cd}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="NeoPatchMaker.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
71
Tools/NeoPatchMaker/NeoPatchMaker.vcxproj.filters
Normal file
71
Tools/NeoPatchMaker/NeoPatchMaker.vcxproj.filters
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{1b1afe1c-fb75-463d-85eb-9b205dc56b02}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c4f6dcc2-fe70-427e-9a95-9690cb594f58}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{7ce7245a-6610-4836-9c84-8c85bc6804c5}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Crc32Static.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NeoPatchMaker.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NeoPatchMakerDlg.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PatchMaker.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StdAfx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="NeoPatchMaker.rc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Crc32Static.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NeoPatchMaker.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NeoPatchMakerDlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PatchMaker.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="StdAfx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\NeoPatchMaker.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\NeoPatchMaker.rc2">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
350
Tools/NeoPatchMaker/NeoPatchMakerDlg.cpp
Normal file
350
Tools/NeoPatchMaker/NeoPatchMakerDlg.cpp
Normal file
@@ -0,0 +1,350 @@
|
||||
// NeoPatchMakerDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "NeoPatchMaker.h"
|
||||
#include "NeoPatchMakerDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAboutDlg dialog used for App About
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
// ClassWizard generated virtual function overrides
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerDlg dialog
|
||||
|
||||
CNeoPatchMakerDlg::CNeoPatchMakerDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CNeoPatchMakerDlg::IDD, pParent)
|
||||
, m_bCheckNotice(FALSE)
|
||||
{
|
||||
m_nDestType = -1;
|
||||
m_nSrcType = -1;
|
||||
m_strPackagePath = _T("");
|
||||
m_strSrcPath = _T("");
|
||||
m_dwMaxPackageSize = 0;
|
||||
m_dwUpdateVersion = 0;
|
||||
m_strFTPPassword = _T("");
|
||||
m_strFTPAddr = _T("");
|
||||
m_strFTPAccount = _T("");
|
||||
m_strDestPath = _T("");
|
||||
m_nFTPPort = 0;
|
||||
m_bPartialFileCompare = FALSE;
|
||||
m_bPassiveMode = FALSE;
|
||||
|
||||
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
|
||||
m_bBusy = false;
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
|
||||
DDX_Control(pDX, IDC_INFOVIEW, m_editInfoView);
|
||||
DDX_Radio(pDX, IDC_RADIO_DEST_TYPE_LOCAL, m_nDestType);
|
||||
DDX_Radio(pDX, IDC_RADIO_SRC_TYPE_NONE, m_nSrcType);
|
||||
DDX_Text(pDX, IDC_EDIT_PACKAGE_LOCATION, m_strPackagePath);
|
||||
DDX_Text(pDX, IDC_EDIT_SRC_LOCATION, m_strSrcPath);
|
||||
DDX_Text(pDX, IDC_EDIT_PACKAGE_MAX_SIZE, m_dwMaxPackageSize);
|
||||
DDV_MinMaxDWord(pDX, m_dwMaxPackageSize, 1, 100000);
|
||||
DDX_Text(pDX, IDC_EDIT_VERSION, m_dwUpdateVersion);
|
||||
DDV_MinMaxDWord(pDX, m_dwUpdateVersion, 100, 4294967295);
|
||||
DDX_Text(pDX, IDC_EDIT_FTP_PASSWORD, m_strFTPPassword);
|
||||
DDX_Text(pDX, IDC_EDIT_FTP_ADDR, m_strFTPAddr);
|
||||
DDX_Text(pDX, IDC_EDIT_FTP_ACCOUNT, m_strFTPAccount);
|
||||
DDX_Text(pDX, IDC_EDIT_DEST_LOCATION, m_strDestPath);
|
||||
DDX_Text(pDX, IDC_EDIT_FTP_PORT, m_nFTPPort);
|
||||
DDX_Check(pDX, IDC_CHECK_PARTIAL_FILE_COMAPARE, m_bPartialFileCompare);
|
||||
DDX_Check(pDX, IDC_CHECK_PASSIVE_MODE, m_bPassiveMode);
|
||||
DDX_Check(pDX, IDC_NOTICE_CHECK, m_bCheckNotice);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CNeoPatchMakerDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
ON_BN_CLICKED(IDC_BUTTON_GO, OnButtonGo)
|
||||
ON_WM_CLOSE()
|
||||
ON_BN_CLICKED(IDC_BUTTON_CHECK_PATCHINFO_VERSION, OnButtonCheckPatchinfoVersion)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerDlg message handlers
|
||||
|
||||
BOOL CNeoPatchMakerDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// Add "About..." menu item to system menu.
|
||||
|
||||
// IDM_ABOUTBOX must be in the system command range.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the icon for this dialog. The framework does this automatically
|
||||
// when the application's main window is not a dialog
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
LoadSettings();
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// If you add a minimize button to your dialog, you will need the code below
|
||||
// to draw the icon. For MFC applications using the document/view model,
|
||||
// this is automatically done for you by the framework.
|
||||
|
||||
void CNeoPatchMakerDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
|
||||
|
||||
// Center icon in client rectangle
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// Draw the icon
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// The system calls this to obtain the cursor to display while the user drags
|
||||
// the minimized window.
|
||||
HCURSOR CNeoPatchMakerDlg::OnQueryDragIcon()
|
||||
{
|
||||
return (HCURSOR) m_hIcon;
|
||||
}
|
||||
|
||||
|
||||
bool CNeoPatchMakerDlg::Go()
|
||||
{
|
||||
m_PatchMaker.SetPackageFilePath( m_strPackagePath );
|
||||
m_PatchMaker.SetLocalFilePath( m_strSrcPath );
|
||||
m_PatchMaker.SetDestFilePath( m_strDestPath );
|
||||
m_PatchMaker.SetPassiveMode( m_bPassiveMode );
|
||||
m_PatchMaker.SetCheckNoticeFolder( static_cast<bool>(m_bCheckNotice) );
|
||||
|
||||
FILE_LOCATION_TYPE flt;
|
||||
|
||||
switch( m_nSrcType )
|
||||
{
|
||||
case 0: flt = FILE_NONE; break;
|
||||
case 1: flt = FILE_ON_LOCAL; break;
|
||||
case 2: flt = FILE_ON_FTP; break;
|
||||
}
|
||||
m_PatchMaker.SetSourceType( flt );
|
||||
|
||||
switch( m_nDestType )
|
||||
{
|
||||
case 0: flt = FILE_ON_LOCAL; break;
|
||||
case 1: flt = FILE_ON_FTP; break;
|
||||
}
|
||||
m_PatchMaker.SetDestType( flt );
|
||||
|
||||
m_PatchMaker.SetPackageSize( m_dwMaxPackageSize * 1024 );
|
||||
m_PatchMaker.SetUpdateVersion( m_dwUpdateVersion );
|
||||
|
||||
m_PatchMaker.SetFTPServerAddr( m_strFTPAddr );
|
||||
m_PatchMaker.SetFTPAccount( m_strFTPAccount );
|
||||
m_PatchMaker.SetFTPPassword( m_strFTPPassword );
|
||||
m_PatchMaker.SetFTPPort( m_nFTPPort );
|
||||
m_PatchMaker.SetPartialFileCompare( static_cast<bool>(m_bPartialFileCompare) );
|
||||
|
||||
CWnd* pBtn = GetDlgItem( IDC_BUTTON_GO );
|
||||
pBtn->EnableWindow( FALSE );
|
||||
|
||||
m_PatchMaker.Go( (CEdit*)GetDlgItem(IDC_INFOVIEW) );
|
||||
|
||||
pBtn->EnableWindow( TRUE );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
UINT CNeoPatchMakerDlg::PatchMakeThread( LPVOID pParam )
|
||||
{
|
||||
CNeoPatchMakerDlg* pDlg = (CNeoPatchMakerDlg*)pParam;
|
||||
|
||||
pDlg->Go();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::OnButtonGo()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
//m_PatchMaker.Test();
|
||||
|
||||
UpdateData( TRUE );
|
||||
SaveSettings();
|
||||
|
||||
AfxBeginThread( PatchMakeThread, this );
|
||||
|
||||
//pBtn->EnableWindow( TRUE );
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::OnClose()
|
||||
{
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
UpdateData( TRUE );
|
||||
SaveSettings();
|
||||
|
||||
CDialog::OnClose();
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::LoadSettings()
|
||||
{
|
||||
CWinApp* pApp = AfxGetApp();
|
||||
m_strPackagePath = pApp->GetProfileString( "SETTING", "PACKAGE_FILE_PATH", "" );
|
||||
m_strSrcPath = pApp->GetProfileString( "SETTING", "SOURCE_FILE_PATH", "" );
|
||||
m_strDestPath = pApp->GetProfileString( "SETTING", "DEST_FILE_PATH", "" );
|
||||
m_nSrcType = pApp->GetProfileInt( "SETTING", "SOURCE_TYPE", 0 );
|
||||
m_nDestType = pApp->GetProfileInt( "SETTING", "DEST_TYPE", 0 );
|
||||
m_dwMaxPackageSize = pApp->GetProfileInt( "SETTING", "PACKAGE_SIZE", 1 );
|
||||
m_dwUpdateVersion = pApp->GetProfileInt( "SETTING", "UPDATE_VERSION", 100 );
|
||||
m_strFTPAddr = pApp->GetProfileString( "SETTING", "FTP_SERVER_ADDR", "" );
|
||||
m_strFTPAccount = pApp->GetProfileString( "SETTING", "FTP_ACCOUNT", "" );
|
||||
m_strFTPPassword = pApp->GetProfileString( "SETTING", "FTP_PASSWORD", "" );
|
||||
m_nFTPPort = pApp->GetProfileInt( "SETTING", "FTP_PORT", 21 );
|
||||
m_bPassiveMode = pApp->GetProfileInt( "SETTING", "PASSIVE_MODE", FALSE );
|
||||
|
||||
UpdateData( FALSE );
|
||||
}
|
||||
|
||||
|
||||
void CNeoPatchMakerDlg::SaveSettings()
|
||||
{
|
||||
UpdateData( TRUE );
|
||||
|
||||
CWinApp* pApp = AfxGetApp();
|
||||
pApp->WriteProfileString( "SETTING", "PACKAGE_FILE_PATH", m_strPackagePath );
|
||||
pApp->WriteProfileString( "SETTING", "SOURCE_FILE_PATH", m_strSrcPath );
|
||||
pApp->WriteProfileString( "SETTING", "DEST_FILE_PATH", m_strDestPath );
|
||||
pApp->WriteProfileInt( "SETTING", "SOURCE_TYPE", m_nSrcType );
|
||||
pApp->WriteProfileInt( "SETTING", "DEST_TYPE", m_nDestType );
|
||||
pApp->WriteProfileInt( "SETTING", "PACKAGE_SIZE", m_dwMaxPackageSize );
|
||||
pApp->WriteProfileInt( "SETTING", "UPDATE_VERSION", m_dwUpdateVersion );
|
||||
pApp->WriteProfileString( "SETTING", "FTP_SERVER_ADDR", m_strFTPAddr );
|
||||
pApp->WriteProfileString( "SETTING", "FTP_ACCOUNT", m_strFTPAccount );
|
||||
pApp->WriteProfileString( "SETTING", "FTP_PASSWORD", m_strFTPPassword );
|
||||
pApp->WriteProfileInt( "SETTING", "FTP_PORT", m_nFTPPort );
|
||||
pApp->WriteProfileInt( "SETTING", "PASSIVE_MODE", m_bPassiveMode );
|
||||
}
|
||||
|
||||
void CNeoPatchMakerDlg::OnButtonCheckPatchinfoVersion()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
UpdateData( TRUE );
|
||||
SaveSettings();
|
||||
|
||||
m_PatchMaker.SetPackageFilePath( m_strPackagePath );
|
||||
m_PatchMaker.SetLocalFilePath( m_strSrcPath );
|
||||
m_PatchMaker.SetDestFilePath( m_strDestPath );
|
||||
m_PatchMaker.SetPassiveMode( m_bPassiveMode );
|
||||
|
||||
FILE_LOCATION_TYPE flt;
|
||||
|
||||
switch( m_nSrcType )
|
||||
{
|
||||
case 0: flt = FILE_NONE; break;
|
||||
case 1: flt = FILE_ON_LOCAL; break;
|
||||
case 2: flt = FILE_ON_FTP; break;
|
||||
}
|
||||
m_PatchMaker.SetSourceType( flt );
|
||||
|
||||
switch( m_nSrcType )
|
||||
{
|
||||
case 0: flt = FILE_ON_LOCAL; break;
|
||||
case 1: flt = FILE_ON_FTP; break;
|
||||
}
|
||||
m_PatchMaker.SetDestType( flt );
|
||||
|
||||
m_PatchMaker.SetPackageSize( m_dwMaxPackageSize * 1024 );
|
||||
m_PatchMaker.SetUpdateVersion( m_dwUpdateVersion );
|
||||
|
||||
m_PatchMaker.SetFTPServerAddr( m_strFTPAddr );
|
||||
m_PatchMaker.SetFTPAccount( m_strFTPAccount );
|
||||
m_PatchMaker.SetFTPPassword( m_strFTPPassword );
|
||||
m_PatchMaker.SetFTPPort( m_nFTPPort );
|
||||
m_PatchMaker.SetPartialFileCompare( static_cast<bool>(m_bPartialFileCompare) );
|
||||
|
||||
|
||||
int nVersion = m_PatchMaker.GetPatchInfoVersion();
|
||||
|
||||
CString strTmp;
|
||||
strTmp.Format( "%d", nVersion );
|
||||
GetDlgItem( IDC_EDIT_PATCHINFO_VERSION )->SetWindowText( strTmp );
|
||||
}
|
||||
74
Tools/NeoPatchMaker/NeoPatchMakerDlg.h
Normal file
74
Tools/NeoPatchMaker/NeoPatchMakerDlg.h
Normal file
@@ -0,0 +1,74 @@
|
||||
// NeoPatchMakerDlg.h : header file
|
||||
//
|
||||
|
||||
#if !defined(AFX_NEOPATCHMAKERDLG_H__37125689_62B4_48D2_A7A0_A8643D280C66__INCLUDED_)
|
||||
#define AFX_NEOPATCHMAKERDLG_H__37125689_62B4_48D2_A7A0_A8643D280C66__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "PatchMaker.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNeoPatchMakerDlg dialog
|
||||
|
||||
class CNeoPatchMakerDlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CNeoPatchMakerDlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_NEOPATCHMAKER_DIALOG };
|
||||
CEdit m_editInfoView;
|
||||
int m_nDestType;
|
||||
int m_nSrcType;
|
||||
CString m_strPackagePath;
|
||||
CString m_strSrcPath;
|
||||
DWORD m_dwMaxPackageSize;
|
||||
DWORD m_dwUpdateVersion;
|
||||
CString m_strFTPPassword;
|
||||
CString m_strFTPAddr;
|
||||
CString m_strFTPAccount;
|
||||
CString m_strDestPath;
|
||||
int m_nFTPPort;
|
||||
BOOL m_bPartialFileCompare;
|
||||
BOOL m_bPassiveMode;
|
||||
BOOL m_bCheckNotice;
|
||||
|
||||
// ClassWizard generated virtual function overrides
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
bool Go();
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
CPatchMaker m_PatchMaker;
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
afx_msg void OnButtonGo();
|
||||
afx_msg void OnClose();
|
||||
afx_msg void OnButtonCheckPatchinfoVersion();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
bool m_bBusy;
|
||||
|
||||
void LoadSettings();
|
||||
void SaveSettings();
|
||||
|
||||
static UINT PatchMakeThread( LPVOID pParam );
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_NEOPATCHMAKERDLG_H__37125689_62B4_48D2_A7A0_A8643D280C66__INCLUDED_)
|
||||
780
Tools/NeoPatchMaker/PatchMaker.cpp
Normal file
780
Tools/NeoPatchMaker/PatchMaker.cpp
Normal file
@@ -0,0 +1,780 @@
|
||||
// PatchMaker.cpp: implementation of the CPatchMaker class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "NeoPatchMaker.h"
|
||||
#include "PatchMaker.h"
|
||||
#include "Crc32Static.h"
|
||||
#include "afxinet.h"
|
||||
#include "set"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[]=__FILE__;
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
CPatchMaker::CPatchMaker()
|
||||
{
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
}
|
||||
|
||||
CPatchMaker::~CPatchMaker()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool CPatchMaker::Go( CEdit* pEditOutput )
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 변수 초기화
|
||||
m_ZipArc.Close();
|
||||
m_arrIndexToUpdateLocalFile.RemoveAll();
|
||||
m_LocalPatchInfo.Reset();
|
||||
m_ServerPatchInfo.Reset();
|
||||
m_strCurrentNewPackageFileName = "";
|
||||
|
||||
m_astrFileNameWithSubDirExclusionList.RemoveAll();
|
||||
m_astrFileNameExclusionList.RemoveAll();
|
||||
m_astrSubDirExclusionList.RemoveAll();
|
||||
|
||||
m_ZipArc.SetCaseSensitivity( false );
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 초기값 설정(Test only)
|
||||
// m_dwPackageMaxSize = 500 * 1024; // 500kbytes, 0.5MB
|
||||
//
|
||||
// m_strPackageFilePath = "F:\\FilePatchTest\\";
|
||||
// m_strLocalFilePath = "F:\\RYL\\Risk Your Life (Test Server Version)\\";
|
||||
// m_strDestFilePath = "F:\\FilePatchTest\\modified\\";
|
||||
// m_SourceType = FILE_ON_LOCAL;
|
||||
// m_DestType = FILE_ON_LOCAL;
|
||||
// m_dwUpdateVersion = 352;
|
||||
//
|
||||
// m_strFTPServerAddr = "211.233.42.245";
|
||||
// m_strFTPAccount = "ryl";
|
||||
// m_strFTPPassword = "fldjzk!$";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// validity check (path seperator, FTP connectivity)
|
||||
pEditOutput->SetWindowText( "0. Check validity" );
|
||||
if( false == CheckValidity( pEditOutput ) )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Check validity)" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// server patch info 읽어들임
|
||||
m_PatchmakerState = PMS_LOAD_SERVER_PATCHINFO_LIST;
|
||||
pEditOutput->SetWindowText( "1. Loading previous version patchinfo list" );
|
||||
if( false == LoadServerPatchInfoList() )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Loading previous version patchinfo list)" );
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// local patch info 작성
|
||||
m_PatchmakerState = PMS_BUILD_LOCAL_PATCHINFO_LIST;
|
||||
pEditOutput->SetWindowText( "2. Building local patchinfo list" );
|
||||
if( false == BuildLocalPatchInfoList() )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Building local patchinfo list)" );
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 기존 패키지 내 파일 중 업데이트 할 파일 & 새로 패키지화되어야 할 파일 목록 작성
|
||||
m_PatchmakerState = PMS_COLLECT_UPDATE_FILE_LIST;
|
||||
pEditOutput->SetWindowText( "3. Compare & collecting update file list" );
|
||||
if( false == CollectUpdateFileList() )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Compare & collecting update file list)" );
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 패키지 파일 업데이트 & 신규 패키지 작성
|
||||
m_PatchmakerState = PMS_UPDATE_PACKAGE;
|
||||
pEditOutput->SetWindowText( "4. Updating & creating package(.zip) file" );
|
||||
if( false == UpdatePackage() )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Updating & creating package(.zip) file)" );
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// PatchInfo 파일 저장&압축
|
||||
m_PatchmakerState = PMS_UPDATE_PATCHINFO;
|
||||
pEditOutput->SetWindowText( "5. Updating patchinfo file" );
|
||||
if( false == UpdatePatchInfo() )
|
||||
{
|
||||
pEditOutput->SetWindowText( "Faild (Updating patchinfo file)" );
|
||||
m_PatchmakerState = PMS_IDLE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Clear
|
||||
pEditOutput->SetWindowText( "-- Finished --" );
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// validity check (path seperator, FTP connectivity)
|
||||
bool CPatchMaker::CheckValidity( CEdit* pEditOutput )
|
||||
{
|
||||
// 이전버전 패키지 디렉토리명 끝의 seperator 확인
|
||||
if( m_strPackageFilePath.GetLength() )
|
||||
{
|
||||
if( FILE_ON_FTP == m_SourceType )
|
||||
{
|
||||
if( m_strPackageFilePath.Right(1) != "/" )
|
||||
{
|
||||
m_strPackageFilePath += "/";
|
||||
}
|
||||
}
|
||||
|
||||
if( FILE_ON_LOCAL == m_SourceType )
|
||||
{
|
||||
if( m_strPackageFilePath.Right(1) != "\\" )
|
||||
{
|
||||
m_strPackageFilePath += "\\";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_strLocalFilePath.GetLength() )
|
||||
{
|
||||
if( m_strLocalFilePath.Right(1) != "\\" )
|
||||
{
|
||||
m_strLocalFilePath += "\\";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_strDestFilePath.GetLength() )
|
||||
{
|
||||
if( FILE_ON_FTP == m_DestType )
|
||||
{
|
||||
if( m_strDestFilePath.Right(1) != "/" )
|
||||
{
|
||||
m_strDestFilePath += "/";
|
||||
}
|
||||
}
|
||||
|
||||
if( FILE_ON_LOCAL == m_DestType )
|
||||
{
|
||||
if( m_strDestFilePath.Right(1) != "\\" )
|
||||
{
|
||||
m_strDestFilePath += "\\";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL bFTPSettingOK = TRUE;
|
||||
if( FILE_ON_FTP == m_SourceType )
|
||||
{
|
||||
CInternetSession isess;
|
||||
CFtpConnection* pFtp = isess.GetFtpConnection( m_strFTPServerAddr, m_strFTPAccount, m_strFTPPassword, m_nFTPPort, m_bPassiveMode );
|
||||
bFTPSettingOK = pFtp->SetCurrentDirectory( m_strPackageFilePath );
|
||||
pFtp->Close();
|
||||
isess.Close();
|
||||
}
|
||||
|
||||
if( FALSE == bFTPSettingOK )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// server patch info 읽어들임
|
||||
bool CPatchMaker::LoadServerPatchInfoList()
|
||||
{
|
||||
switch( m_SourceType )
|
||||
{
|
||||
case FILE_NONE:
|
||||
return true;
|
||||
break;
|
||||
|
||||
case FILE_ON_FTP:
|
||||
{
|
||||
CInternetSession isess;
|
||||
CFtpConnection* pFtp = isess.GetFtpConnection( m_strFTPServerAddr, m_strFTPAccount, m_strFTPPassword, m_nFTPPort, m_bPassiveMode);
|
||||
pFtp->SetCurrentDirectory( m_strPackageFilePath );
|
||||
pFtp->GetFile( "PatchInfoV2.zip", m_strDestFilePath+"PatchInfoV2.zip" );
|
||||
pFtp->Close();
|
||||
isess.Close();
|
||||
}
|
||||
break;
|
||||
|
||||
case FILE_ON_LOCAL:
|
||||
CopyFile( m_strPackageFilePath+"PatchInfoV2.zip", m_strDestFilePath+"PatchInfoV2.zip", FALSE );
|
||||
break;
|
||||
}
|
||||
|
||||
// PatchInfo 압축해제후 압축파일 삭제
|
||||
CZipArchive zipArc;
|
||||
zipArc.Open( m_strDestFilePath+"PatchInfoV2.zip", CZipArchive::zipOpen );
|
||||
zipArc.ExtractFile( 0, m_strDestFilePath, false, "PatchInfoV2" );
|
||||
zipArc.Close();
|
||||
DeleteFile( m_strDestFilePath+"PatchInfoV2.zip" );
|
||||
|
||||
// PatchInfo 로드
|
||||
m_ServerPatchInfo.Reset();
|
||||
m_ServerPatchInfo.Load( m_strDestFilePath+"PatchInfoV2" );
|
||||
DeleteFile( m_strDestFilePath+"PatchInfoV2");
|
||||
|
||||
|
||||
// filename-to-index map 생성
|
||||
for( size_t i = 0; i < m_ServerPatchInfo.GetList().size(); ++i )
|
||||
{
|
||||
long lTmp = m_mapFileName2ServerListIndex.size();
|
||||
m_mapFileName2ServerListIndex[ m_ServerPatchInfo.GetList()[i].szFileName ] = lTmp;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// local patch info 작성
|
||||
bool CPatchMaker::BuildLocalPatchInfoList()
|
||||
{
|
||||
WIN32_FIND_DATA w32fd;
|
||||
|
||||
HANDLE hFind = FindFirstFile( m_strLocalFilePath+"*.*", &w32fd );
|
||||
|
||||
if( INVALID_HANDLE_VALUE == hFind )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
CString strCurrentSubPath("");
|
||||
CStringArray astrSubDirList;
|
||||
while( 1 )
|
||||
{
|
||||
if( !IsExcludedFileWithSubDir(strCurrentSubPath+w32fd.cFileName) &&
|
||||
!IsExcludedFile( w32fd.cFileName ) )
|
||||
{
|
||||
if( w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
|
||||
{
|
||||
CString strTmp;
|
||||
strTmp.Format( "%s%s", strCurrentSubPath, w32fd.cFileName );
|
||||
if( !IsExcludedSubDir( strTmp ) )
|
||||
{
|
||||
astrSubDirList.Add( strTmp );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FilePatchInfoRecord fpir;
|
||||
|
||||
|
||||
strcpy( fpir.szFileName, strCurrentSubPath+w32fd.cFileName );
|
||||
CString strFullPathName = m_strLocalFilePath+strCurrentSubPath+w32fd.cFileName;
|
||||
|
||||
m_strStateInfoString.Format( "새 버전의 %s 파일을 검사중", strFullPathName );
|
||||
|
||||
CCrc32Static::FileCrc32Assembly( strFullPathName, fpir.dwCRC32 );
|
||||
HANDLE hFile = CreateFile( strFullPathName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
NULL, OPEN_EXISTING, 0, 0 );
|
||||
fpir.dwSize = GetFileSize ( hFile, NULL );
|
||||
CloseHandle( hFile );
|
||||
|
||||
m_LocalPatchInfo.GetList().push_back( fpir );
|
||||
|
||||
//m_mapFileName2LocalListIndex[fpir.szFileName] = m_LocalPatchInfo.GetList().size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( 0 == FindNextFile( hFind, &w32fd ) )
|
||||
{
|
||||
FindClose( hFind );
|
||||
|
||||
|
||||
// sub dir queue 에 순서를 기다리고 있는 놈이 존재하면
|
||||
if( astrSubDirList.GetSize() > 0 )
|
||||
{
|
||||
// 꺼내서 쓰고
|
||||
strCurrentSubPath = astrSubDirList[0] + "\\";
|
||||
astrSubDirList.RemoveAt(0);
|
||||
hFind = FindFirstFile( m_strLocalFilePath+strCurrentSubPath+"*.*", &w32fd );
|
||||
}
|
||||
else
|
||||
{
|
||||
// 없음 루프 종료
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 기존 패키지 내 파일 중 업데이트 할 파일 & 새로 패키지화되어야 할 파일 목록 작성
|
||||
bool CPatchMaker::CollectUpdateFileList()
|
||||
{
|
||||
size_t i = 0, max = m_LocalPatchInfo.GetList().size();
|
||||
|
||||
for( i = 0; i < max; ++i )
|
||||
{
|
||||
FilePatchInfoRecord &rLocalItem = m_LocalPatchInfo.GetList()[i];
|
||||
|
||||
// bool bFound = false;
|
||||
// for( j = 0; j < m_ServerPatchInfo.GetList().size(); ++j )
|
||||
// {
|
||||
// FilePatchInfoRecord &rServerItem = m_ServerPatchInfo.GetList()[j];
|
||||
//
|
||||
// // 기존 패키지에 존재하는 파일일 경우(로컬 파일이 서버 리스트에서 발견된 경우)
|
||||
// if( 0 == stricmp( rLocalItem.szFileName, rServerItem.szFileName ) )
|
||||
// {
|
||||
// bFound = true;
|
||||
// strcpy( rLocalItem.szPackageFileName, rServerItem.szPackageFileName );
|
||||
//
|
||||
// // size와 CRC32 체크해 다르면 업데이트 대상에 등록
|
||||
// if( rLocalItem.dwCRC32 != rServerItem.dwCRC32 ||
|
||||
// rLocalItem.dwSize != rServerItem.dwSize )
|
||||
// {
|
||||
// m_arrIndexToUpdateLocalFile.Add( i );
|
||||
//
|
||||
// rLocalItem.dwVersion = m_dwUpdateVersion;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rLocalItem.dwVersion = rServerItem.dwVersion;
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // 기존 패키지에 존재하지 않는 파일
|
||||
// if( false == bFound )
|
||||
// {
|
||||
// m_arrIndexToUpdateLocalFile.Add( i );
|
||||
//
|
||||
// rLocalItem.dwVersion = m_dwUpdateVersion;
|
||||
// }
|
||||
|
||||
std::map< PTR_STRING, int, PTR_STRING_LESS >::iterator it;
|
||||
it = m_mapFileName2ServerListIndex.find( rLocalItem.szFileName );
|
||||
if( m_mapFileName2ServerListIndex.end() == it )
|
||||
{
|
||||
// 기존 패키지에 존재하지 않는 파일
|
||||
m_arrIndexToUpdateLocalFile.Add( i );
|
||||
|
||||
rLocalItem.dwVersion = m_dwUpdateVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
long lIdx = it->second;
|
||||
FilePatchInfoRecord &rServerItem = m_ServerPatchInfo.GetList()[it->second];
|
||||
|
||||
strcpy( rLocalItem.szPackageFileName, rServerItem.szPackageFileName );
|
||||
|
||||
// size와 CRC32 체크해 다르면 업데이트 대상에 등록
|
||||
if( rLocalItem.dwCRC32 != rServerItem.dwCRC32 ||
|
||||
rLocalItem.dwSize != rServerItem.dwSize )
|
||||
{
|
||||
m_arrIndexToUpdateLocalFile.Add( i );
|
||||
|
||||
rLocalItem.dwVersion = m_dwUpdateVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
rLocalItem.dwVersion = rServerItem.dwVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// 패키지 파일 업데이트 & 신규 패키지 작성
|
||||
bool CPatchMaker::UpdatePackage()
|
||||
{
|
||||
int i;
|
||||
|
||||
std::set<CString> setUpdatePackageFileList;
|
||||
|
||||
for( i = 0; i < m_arrIndexToUpdateLocalFile.GetSize(); ++i )
|
||||
{
|
||||
FilePatchInfoRecord &rFpir = m_LocalPatchInfo.GetList()[ m_arrIndexToUpdateLocalFile[i] ];
|
||||
|
||||
if( '\0' != rFpir.szPackageFileName[0] ) // 패키지 파일 이름이 빈 문자열이 아닐 경우(이미 패키지에 들어가 있는 파일)
|
||||
{
|
||||
// 받아올 패키지 파일 목록에 이미 등록되어있는지 확인(없으면 추가)
|
||||
setUpdatePackageFileList.insert( CString(rFpir.szPackageFileName) );
|
||||
}
|
||||
}
|
||||
|
||||
// 패키지 파일 복사(혹은 다운로드)
|
||||
std::set<CString>::iterator it;
|
||||
switch( m_SourceType )
|
||||
{
|
||||
case FILE_ON_LOCAL:
|
||||
{
|
||||
// copy packages from src to dest
|
||||
for(it = setUpdatePackageFileList.begin();
|
||||
it != setUpdatePackageFileList.end(); ++it )
|
||||
{
|
||||
CString &rstr = *it;
|
||||
CopyFile( m_strPackageFilePath+(*it)+".zip", m_strDestFilePath+(*it)+".zip", FALSE );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case FILE_ON_FTP:
|
||||
{
|
||||
CInternetSession isess;
|
||||
CFtpConnection* pFtp = isess.GetFtpConnection( m_strFTPServerAddr, m_strFTPAccount, m_strFTPPassword, m_nFTPPort, m_bPassiveMode );
|
||||
pFtp->SetCurrentDirectory( m_strPackageFilePath );
|
||||
for(it = setUpdatePackageFileList.begin(); it != setUpdatePackageFileList.end(); ++it )
|
||||
{
|
||||
pFtp->GetFile( (*it)+".zip", m_strDestFilePath+(*it)+".zip" );
|
||||
Sleep(1);
|
||||
}
|
||||
pFtp->Close();
|
||||
isess.Close();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// package update, 혹은 신규 package 작성
|
||||
for( i = 0; i < m_arrIndexToUpdateLocalFile.GetSize(); ++i )
|
||||
{
|
||||
Sleep(1);
|
||||
|
||||
FilePatchInfoRecord &rFpir = m_LocalPatchInfo.GetList()[ m_arrIndexToUpdateLocalFile[i] ];
|
||||
|
||||
if( '\0' == rFpir.szPackageFileName[0] )
|
||||
{
|
||||
// 파일의 패키지 이름 필드가 비어 있으면 -> 신규 or 마지막 패키지에 추가
|
||||
//
|
||||
// 주의 : 패키지 이름 필드가 비어 있다고 해서 항상 신규 패키지를 만드는게 아니다.
|
||||
// 최근에 만든 신규 패키지가 다 채워지지 않았으면 거기에 들어가는 것임
|
||||
|
||||
if( m_strCurrentNewPackageFileName == "" )
|
||||
{
|
||||
// 패키지 파일을 신규로 만들거나
|
||||
m_strCurrentNewPackageFileName = GetNextPackageFileName();
|
||||
m_ZipArc.Open( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip", CZipArchive::zipCreate );
|
||||
}
|
||||
else
|
||||
{
|
||||
// granular 용량이 다 채워지지않은 패키지가 마지막일 경우 그것을 오픈
|
||||
m_ZipArc.Open( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip", CZipArchive::zipOpen );
|
||||
}
|
||||
|
||||
m_ZipArc.SetRootPath( m_strLocalFilePath );
|
||||
CZipAddNewFileInfo zanfi( m_strLocalFilePath+rFpir.szFileName, false );
|
||||
zanfi.Defaults();
|
||||
m_ZipArc.AddNewFile( zanfi );
|
||||
m_ZipArc.Close();
|
||||
// patchinfo 에 기록될 패키지 이름 필드 업데이트
|
||||
strcpy( rFpir.szPackageFileName, m_strCurrentNewPackageFileName );
|
||||
|
||||
DWORD dwPackageSize = GetFileSize( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip" );
|
||||
|
||||
// 패키지 최대 사이즈를 넘어갔을 경우 or 단독패키지화 해야 할 파일(Client.exe 같은) 일 경우
|
||||
bool bSoleFile = IsSoleFileWithSubDir( rFpir.szFileName );
|
||||
if( dwPackageSize > m_dwPackageMaxSize || bSoleFile )
|
||||
{
|
||||
m_ZipArc.Open( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip", CZipArchive::zipOpen );
|
||||
if( 1 == m_ZipArc.GetCount( true ) )
|
||||
{
|
||||
// 파일이 하나뿐일경우 어쩔수 없으므로 패스
|
||||
m_ZipArc.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 파일이 여러개일 경우, 마지막으로 추가된 파일 삭제
|
||||
int nIdx = m_ZipArc.FindFile( rFpir.szFileName, CZipArchive::ffCaseSens, false );
|
||||
m_ZipArc.DeleteFile( nIdx );
|
||||
m_ZipArc.Close();
|
||||
|
||||
// ...한 다음, 다음 패키지 파일을 생성해 거기에 냅다 추가
|
||||
m_strCurrentNewPackageFileName = GetNextPackageFileName();
|
||||
m_ZipArc.Open( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip", CZipArchive::zipCreate );
|
||||
m_ZipArc.SetRootPath( m_strLocalFilePath );
|
||||
CZipAddNewFileInfo zanfi( m_strLocalFilePath+rFpir.szFileName, false );
|
||||
zanfi.Defaults();
|
||||
m_ZipArc.AddNewFile( zanfi );
|
||||
m_ZipArc.Close();
|
||||
// patchinfo 에 기록될 패키지 이름 필드 업데이트
|
||||
strcpy( rFpir.szPackageFileName, m_strCurrentNewPackageFileName );
|
||||
}
|
||||
|
||||
// 단독패키지화 해야 할 파일의 경우 이후에 추가되는 파일이 없어야한다.
|
||||
// (current패키지 이름을 비움 -> 다음 턴에 새 파일을 만들게됨)
|
||||
if( bSoleFile )
|
||||
{
|
||||
/*
|
||||
m_strCurrentNewPackageFileName = GetNextPackageFileName();
|
||||
m_ZipArc.Open( m_strDestFilePath+m_strCurrentNewPackageFileName+".zip", CZipArchive::zipCreate );
|
||||
m_ZipArc.SetRootPath( m_strLocalFilePath );
|
||||
m_ZipArc.Close();
|
||||
*/
|
||||
m_strCurrentNewPackageFileName = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//strcpy( rFpir.szPackageFileName, m_strCurrentNewPackageFileName );
|
||||
}
|
||||
else
|
||||
{
|
||||
// 기존패키지 업데이트(replace file)
|
||||
m_ZipArc.Open( m_strDestFilePath+rFpir.szPackageFileName+".zip", CZipArchive::zipOpen );
|
||||
|
||||
int nIdx = m_ZipArc.FindFile( rFpir.szFileName, CZipArchive::ffCaseSens, false );
|
||||
if( -1 == nIdx )
|
||||
{
|
||||
CString strErr;
|
||||
strErr.Format( "%s 패키지 파일 내에 %s 파일이 존재하지 않구마이", rFpir.szPackageFileName, rFpir.szFileName );
|
||||
AfxMessageBox( strErr );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ZipArc.DeleteFile( nIdx );
|
||||
}
|
||||
|
||||
m_ZipArc.SetRootPath( m_strLocalFilePath );
|
||||
CZipAddNewFileInfo zanfi( m_strLocalFilePath+rFpir.szFileName, false );
|
||||
zanfi.Defaults();
|
||||
m_ZipArc.AddNewFile( zanfi );
|
||||
|
||||
m_ZipArc.Close( CZipArchive::afNoException, true );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// PatchInfo 파일 저장&압축
|
||||
bool CPatchMaker::UpdatePatchInfo()
|
||||
{
|
||||
// PatchInfo 저장
|
||||
m_LocalPatchInfo.SetVersion( m_dwUpdateVersion );
|
||||
m_LocalPatchInfo.Save( m_strDestFilePath+"PatchInfoV2" );
|
||||
|
||||
// PatchInfo 압축후 원본파일 삭제
|
||||
CZipArchive zipArc;
|
||||
zipArc.Open( m_strDestFilePath+"PatchInfoV2.zip", CZipArchive::zipCreate );
|
||||
zipArc.AddNewFile( m_strDestFilePath+"PatchInfoV2", "PatchInfoV2" );
|
||||
zipArc.Close();
|
||||
|
||||
DeleteFile( m_strDestFilePath+"PatchInfoV2");
|
||||
|
||||
// CInternetSession isess;
|
||||
// CFtpConnection* pFtp = isess.GetFtpConnection( "211.233.42.245", "ryl", "fldjzk!$", 21, m_bPassiveMode );
|
||||
// pFtp->SetCurrentDirectory( m_strPackageFilePath );
|
||||
// pFtp->GetFile( "PatchInfo.zip", m_strDestFilePath+"PatchInfo.zip" );
|
||||
// pFtp->Close();
|
||||
// isess.Close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 새 패키지 파일 이름 생성
|
||||
// (파일 이름 중 확장자 제외)
|
||||
const char* CPatchMaker::GetNextPackageFileName()
|
||||
{
|
||||
static char szBuff[MAX_PACKAGE_FILE_NAME_LENGTH*2];
|
||||
|
||||
CTime t = CTime::GetCurrentTime();
|
||||
|
||||
CString strHeader = t.Format( "%Y%m%d_%H%M_" );
|
||||
|
||||
int n = 0;
|
||||
char szTmp[4];
|
||||
while( n < 1000 )
|
||||
{
|
||||
sprintf( szTmp, "%03d", n );
|
||||
CString strFileName = m_strDestFilePath + strHeader + szTmp + ".zip";
|
||||
|
||||
// if( 0xFFFFFFFF == GetFileAttributes( strFileName ) )
|
||||
// {
|
||||
// if( ERROR_FILE_NOT_FOUND == GetLastError() )
|
||||
// {
|
||||
// strcpy( szBuff, strHeader+szTmp );
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
if( !IsFileExist( strFileName ) )
|
||||
{
|
||||
strcpy( szBuff, strHeader+szTmp );
|
||||
break;
|
||||
}
|
||||
|
||||
++n;
|
||||
}
|
||||
|
||||
if( 1000 == n )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return szBuff;
|
||||
}
|
||||
|
||||
|
||||
bool CPatchMaker::IsExcludedFile( const char* szFileName )
|
||||
{
|
||||
for( int i = 0; i < m_astrFileNameExclusionList.GetSize(); ++i )
|
||||
{
|
||||
if( 0 == stricmp( szFileName, m_astrFileNameExclusionList[i] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// hard-coded exclusion list
|
||||
if( 0 == stricmp( szFileName, "." ) ) return true;
|
||||
if( 0 == stricmp( szFileName, ".." ) ) return true;
|
||||
if( 0 == stricmp( szFileName, "vssver.scc" ) ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CPatchMaker::IsExcludedFileWithSubDir( const char* szFileNameWithSubDir )
|
||||
{
|
||||
for( int i = 0; i < m_astrFileNameWithSubDirExclusionList.GetSize(); ++i )
|
||||
{
|
||||
if( 0 == stricmp( szFileNameWithSubDir, m_astrFileNameWithSubDirExclusionList[i] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// hard-coded exclusion list
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "mp.ini" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "RenderOption.dat" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "ClientOption.dat" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Patchinfo.pat" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "UpdateFileList.txt" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "VersionInfo.dat" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Login.dat" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "LoginRes.dll" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Patchinfo.cache" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Patchinfo.local" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "LC2.OGG" ) ) return true;
|
||||
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Z3D_SetupDirectX.exe" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "DirectXInstaller.exe" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "FileChecker.exe" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "DSETUP.dll" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "dsetup32.dll" ) ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CPatchMaker::IsExcludedSubDir( const char* szSubDir )
|
||||
{
|
||||
for( int i = 0; i < m_astrSubDirExclusionList.GetSize(); ++i )
|
||||
{
|
||||
if( 0 == stricmp( szSubDir, m_astrSubDirExclusionList[i] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// hard-coded exclusion list
|
||||
//if( 0 == stricmp( szSubDir, "GameGuard" ) ) return true;
|
||||
if( !m_bCheckNoticeFolder && 0 == stricmp( szSubDir, "Notice" ) ) return true;
|
||||
|
||||
//if( 0 == stricmp( szSubDir, "update" ) ) return true;
|
||||
if( 0 == stricmp( szSubDir, "DirectX" ) ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 단일 패키지로 만들어야 하는 파일인가?
|
||||
bool CPatchMaker::IsSoleFileWithSubDir( const char* szFileNameWithSubDir )
|
||||
{
|
||||
// for( int i = 0; i < m_astrSubDirSoleFileList.GetSize(); ++i )
|
||||
// {
|
||||
// if( 0 == stricmp( szSubDir, m_astrSubDirSoleFileList[i] ) )
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// hard-coded sole file list
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Client.exe" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Login.new" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "ItemScript.gsf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "MonsterProtoType.gsf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "script1.gsf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "SkillScript.gsf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "npcscript.mcf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "quest.mcf" ) ) return true;
|
||||
if( 0 == stricmp( szFileNameWithSubDir, "Script.mcf" ) ) return true;
|
||||
|
||||
// if( 0 == stricmp( szSubDir, "" ) ) return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int CPatchMaker::GetPatchInfoVersion()
|
||||
{
|
||||
if( false == LoadServerPatchInfoList() )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (int)m_ServerPatchInfo.GetVersion();
|
||||
}
|
||||
134
Tools/NeoPatchMaker/PatchMaker.h
Normal file
134
Tools/NeoPatchMaker/PatchMaker.h
Normal file
@@ -0,0 +1,134 @@
|
||||
// PatchMaker.h: interface for the CPatchMaker class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_PATCHMAKER_H__6D7C0314_CD51_4721_AC77_D3CFB22F57F7__INCLUDED_)
|
||||
#define AFX_PATCHMAKER_H__6D7C0314_CD51_4721_AC77_D3CFB22F57F7__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "ZipArchive.h"
|
||||
#include "PatchInfoList.h"
|
||||
|
||||
#include "Patch_Util.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
enum FILE_LOCATION_TYPE { FILE_NONE, FILE_ON_FTP, FILE_ON_HTTP, FILE_ON_LOCAL };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CPatchMaker
|
||||
{
|
||||
public:
|
||||
|
||||
CPatchMaker();
|
||||
virtual ~CPatchMaker();
|
||||
|
||||
bool Go( CEdit* pEditOutput );
|
||||
|
||||
enum PATCHMAKER_STATE
|
||||
{
|
||||
PMS_IDLE,
|
||||
PMS_LOAD_SERVER_PATCHINFO_LIST,
|
||||
PMS_BUILD_LOCAL_PATCHINFO_LIST,
|
||||
PMS_COLLECT_UPDATE_FILE_LIST,
|
||||
PMS_UPDATE_PACKAGE,
|
||||
PMS_UPDATE_PATCHINFO
|
||||
};
|
||||
|
||||
PATCHMAKER_STATE GetState()
|
||||
{
|
||||
return m_PatchmakerState;
|
||||
}
|
||||
|
||||
void SetPackageFilePath(const char* sz) { m_strPackageFilePath = sz; }
|
||||
void SetLocalFilePath(const char* sz) { m_strLocalFilePath = sz; }
|
||||
void SetDestFilePath(const char* sz) { m_strDestFilePath = sz; }
|
||||
void SetSourceType(FILE_LOCATION_TYPE tp) { m_SourceType = tp; }
|
||||
void SetDestType(FILE_LOCATION_TYPE tp) { m_DestType = tp; }
|
||||
void SetPackageSize(DWORD dw) { m_dwPackageMaxSize = dw; }
|
||||
void SetUpdateVersion(DWORD dw) { m_dwUpdateVersion = dw; }
|
||||
void SetFTPServerAddr(const char* sz) { m_strFTPServerAddr = sz; }
|
||||
void SetFTPAccount(const char* sz) { m_strFTPAccount = sz; }
|
||||
void SetFTPPassword(const char* sz) { m_strFTPPassword = sz; }
|
||||
void SetFTPPort(int n) { m_nFTPPort = n; }
|
||||
void SetPassiveMode(BOOL b) { m_bPassiveMode = b; }
|
||||
void SetPartialFileCompare(bool b) { m_bPartialFileCompare = b; }
|
||||
void SetCheckNoticeFolder(bool b) { m_bCheckNoticeFolder = b; }
|
||||
|
||||
int GetPatchInfoVersion();
|
||||
|
||||
protected:
|
||||
|
||||
CZipArchive m_ZipArc;
|
||||
CArray<int, int> m_arrIndexToUpdateLocalFile;
|
||||
|
||||
CPatchInfoList m_LocalPatchInfo;
|
||||
CPatchInfoList m_ServerPatchInfo;
|
||||
|
||||
std::map< PTR_STRING, int, PTR_STRING_LESS > m_mapFileName2ServerListIndex;
|
||||
|
||||
// 각각의 패스들. 반드시 path seperator( \ ) 로 끝나야 한다.
|
||||
// -> CPatchMaker 클래스 내에서 seperator 자동 추가로 변경
|
||||
CString m_strPackageFilePath;
|
||||
CString m_strLocalFilePath;
|
||||
CString m_strDestFilePath;
|
||||
|
||||
FILE_LOCATION_TYPE m_SourceType;
|
||||
FILE_LOCATION_TYPE m_DestType;
|
||||
|
||||
CStringArray m_astrFileNameWithSubDirExclusionList;
|
||||
// 제외 파일 중 특정 서브폴더상에 위치하는 파일
|
||||
CStringArray m_astrFileNameExclusionList;
|
||||
// 제외 파일 중 서브폴더와는 상관없이 파일이름만으로 판별하는것
|
||||
// . .. 과 같은 디렉토리명, vssver.scc 같은 필요없는 파일들
|
||||
CStringArray m_astrSubDirExclusionList;
|
||||
|
||||
|
||||
long m_dwUpdateVersion; // 업데이트 할 새 버전
|
||||
|
||||
CString m_strFTPServerAddr;
|
||||
CString m_strFTPAccount;
|
||||
CString m_strFTPPassword;
|
||||
|
||||
int m_nFTPPort;
|
||||
BOOL m_bPassiveMode;
|
||||
|
||||
bool m_bPartialFileCompare;
|
||||
bool m_bCheckNoticeFolder;
|
||||
|
||||
CString m_strCurrentNewPackageFileName;
|
||||
|
||||
DWORD m_dwPackageMaxSize;
|
||||
|
||||
PATCHMAKER_STATE m_PatchmakerState;
|
||||
|
||||
CString m_strStateInfoString;
|
||||
|
||||
|
||||
bool CheckValidity( CEdit* pEditOutput );
|
||||
|
||||
bool LoadServerPatchInfoList();
|
||||
bool BuildLocalPatchInfoList();
|
||||
bool CollectUpdateFileList();
|
||||
bool UpdatePackage();
|
||||
bool UpdatePatchInfo();
|
||||
|
||||
const char* GetNextPackageFileName();
|
||||
bool IsExcludedFile( const char* szFileName );
|
||||
bool IsExcludedFileWithSubDir( const char* szFileNameWithSubDir );
|
||||
bool IsExcludedSubDir( const char* szSubDir );
|
||||
bool IsSoleFileWithSubDir( const char* szFileNameWithSubDir );
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_PATCHMAKER_H__6D7C0314_CD51_4721_AC77_D3CFB22F57F7__INCLUDED_)
|
||||
88
Tools/NeoPatchMaker/ReadMe.txt
Normal file
88
Tools/NeoPatchMaker/ReadMe.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
========================================================================
|
||||
MICROSOFT FOUNDATION CLASS LIBRARY : NeoPatchMaker
|
||||
========================================================================
|
||||
|
||||
|
||||
AppWizard has created this NeoPatchMaker application for you. This application
|
||||
not only demonstrates the basics of using the Microsoft Foundation classes
|
||||
but is also a starting point for writing your application.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your NeoPatchMaker application.
|
||||
|
||||
NeoPatchMaker.dsp
|
||||
This file (the project file) contains information at the project level and
|
||||
is used to build a single project or subproject. Other users can share the
|
||||
project (.dsp) file, but they should export the makefiles locally.
|
||||
|
||||
NeoPatchMaker.h
|
||||
This is the main header file for the application. It includes other
|
||||
project specific headers (including Resource.h) and declares the
|
||||
CNeoPatchMakerApp application class.
|
||||
|
||||
NeoPatchMaker.cpp
|
||||
This is the main application source file that contains the application
|
||||
class CNeoPatchMakerApp.
|
||||
|
||||
NeoPatchMaker.rc
|
||||
This is a listing of all of the Microsoft Windows resources that the
|
||||
program uses. It includes the icons, bitmaps, and cursors that are stored
|
||||
in the RES subdirectory. This file can be directly edited in Microsoft
|
||||
Visual C++.
|
||||
|
||||
NeoPatchMaker.clw
|
||||
This file contains information used by ClassWizard to edit existing
|
||||
classes or add new classes. ClassWizard also uses this file to store
|
||||
information needed to create and edit message maps and dialog data
|
||||
maps and to create prototype member functions.
|
||||
|
||||
res\NeoPatchMaker.ico
|
||||
This is an icon file, which is used as the application's icon. This
|
||||
icon is included by the main resource file NeoPatchMaker.rc.
|
||||
|
||||
res\NeoPatchMaker.rc2
|
||||
This file contains resources that are not edited by Microsoft
|
||||
Visual C++. You should place all resources not editable by
|
||||
the resource editor in this file.
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AppWizard creates one dialog class:
|
||||
|
||||
NeoPatchMakerDlg.h, NeoPatchMakerDlg.cpp - the dialog
|
||||
These files contain your CNeoPatchMakerDlg class. This class defines
|
||||
the behavior of your application's main dialog. The dialog's
|
||||
template is in NeoPatchMaker.rc, which can be edited in Microsoft
|
||||
Visual C++.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named NeoPatchMaker.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
Resource.h
|
||||
This is the standard header file, which defines new resource IDs.
|
||||
Microsoft Visual C++ reads and updates this file.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
If your application uses MFC in a shared DLL, and your application is
|
||||
in a language other than the operating system's current language, you
|
||||
will need to copy the corresponding localized resources MFC42XXX.DLL
|
||||
from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
|
||||
and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
|
||||
For example, MFC42DEU.DLL contains resources translated to German.) If you
|
||||
don't do this, some of the UI elements of your application will remain in the
|
||||
language of the operating system.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
47
Tools/NeoPatchMaker/Resource.h
Normal file
47
Tools/NeoPatchMaker/Resource.h
Normal file
@@ -0,0 +1,47 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by NeoPatchMaker.rc
|
||||
//
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_NEOPATCHMAKER_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_BUTTON_GO 1000
|
||||
#define IDC_INFOVIEW 1004
|
||||
#define IDC_LIST_FILE 1005
|
||||
#define IDC_EDIT_FTP_ADDR 1006
|
||||
#define IDC_EDIT_FTP_ACCOUNT 1007
|
||||
#define IDC_EDIT_FTP_PASSWORD 1008
|
||||
#define IDC_EDIT_PACKAGE_LOCATION 1009
|
||||
#define IDC_EDIT_SRC_LOCATION 1010
|
||||
#define IDC_EDIT_DEST_LOCATION 1011
|
||||
#define IDC_RADIO_SRC_TYPE_NONE 1012
|
||||
#define IDC_EDIT_VERSION 1013
|
||||
#define IDC_EDIT_PACKAGE_MAX_SIZE 1014
|
||||
#define IDC_RADIO_SRC_TYPE_LOCAL 1015
|
||||
#define IDC_RADIO_SRC_TYPE_FTP 1016
|
||||
#define IDC_RADIO_DEST_TYPE_LOCAL 1017
|
||||
#define IDC_RADIO_DEST_TYPE_FTP 1018
|
||||
#define IDC_BUTTON_BROWSE_PACKAGE_LOCATION 1019
|
||||
#define IDC_BUTTON_BROWSE_SRC_LOCATION 1020
|
||||
#define IDC_BUTTON_BROWSE_DEST_LOCATION 1021
|
||||
#define IDC_EDIT_FTP_PORT 1022
|
||||
#define IDC_CHECK_PARTIAL_FILE_COMAPARE 1023
|
||||
#define IDC_PROGRESS1 1024
|
||||
#define IDC_EDIT_PATCHINFO_VERSION 1025
|
||||
#define IDC_CHECK_PASSIVE_MODE 1026
|
||||
#define IDC_BUTTON_CHECK_PATCHINFO_VERSION 1027
|
||||
#define IDC_CHECK1 1028
|
||||
#define IDC_NOTICE_CHECK 1028
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1029
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
8
Tools/NeoPatchMaker/StdAfx.cpp
Normal file
8
Tools/NeoPatchMaker/StdAfx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// NeoPatchMaker.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
|
||||
26
Tools/NeoPatchMaker/StdAfx.h
Normal file
26
Tools/NeoPatchMaker/StdAfx.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__A5EDA759_2903_4742_AB92_3F3A7392C6A0__INCLUDED_)
|
||||
#define AFX_STDAFX_H__A5EDA759_2903_4742_AB92_3F3A7392C6A0__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__A5EDA759_2903_4742_AB92_3F3A7392C6A0__INCLUDED_)
|
||||
BIN
Tools/NeoPatchMaker/res/NeoPatchMaker.ico
Normal file
BIN
Tools/NeoPatchMaker/res/NeoPatchMaker.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
13
Tools/NeoPatchMaker/res/NeoPatchMaker.rc2
Normal file
13
Tools/NeoPatchMaker/res/NeoPatchMaker.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// NEOPATCHMAKER.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Reference in New Issue
Block a user