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:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

100
Tools/PatchSFX/LogEdit.cpp Normal file
View File

@@ -0,0 +1,100 @@
// LogEdit.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
//
#include "stdafx.h"
#include "LogEdit.h"
// CLogEdit
IMPLEMENT_DYNAMIC(CLogEdit, CEdit)
CLogEdit::CLogEdit()
{
}
CLogEdit::~CLogEdit()
{
}
BEGIN_MESSAGE_MAP(CLogEdit, CEdit)
ON_WM_CHAR()
ON_WM_RBUTTONDOWN()
END_MESSAGE_MAP()
// CLogEdit <20>޽<EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
void CLogEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: <20><><EFBFBD><20>޽<EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20><EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
// CEdit::OnChar(nChar, nRepCnt, nFlags);
}
void CLogEdit::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: <20><><EFBFBD><20>޽<EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20><EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
CEdit::OnRButtonDown(nFlags, point);
}
void CLogEdit::AddLine(LPCTSTR szLine, int nIndex, bool bNewLine)
{
m_szTempLine.SetString(szLine);
if (bNewLine) { m_szTempLine.Append("\r\n"); }
if (OpenClipboard())
{
BOOL bAddedLine = FALSE;
int nLength = m_szTempLine.GetLength();
HANDLE hGlobalCopy = GlobalAlloc(GMEM_MOVEABLE, (nLength + 1) * sizeof(TCHAR));
if (0 != hGlobalCopy)
{
// Lock the handle and copy the text to the buffer.
LPTSTR lptstrCopy = reinterpret_cast<LPTSTR>(GlobalLock(hGlobalCopy));
memcpy(lptstrCopy, m_szTempLine.GetString(), nLength * sizeof(TCHAR));
lptstrCopy[nLength] = _T('\0');
GlobalUnlock(hGlobalCopy);
// Place the handle on the clipboard.
if(0 != SetClipboardData(CF_TEXT, hGlobalCopy))
{
bAddedLine = TRUE;
}
else
{
GlobalFree(hGlobalCopy);
}
}
CloseClipboard();
if (bAddedLine)
{
int nCharPos = 0;
int nLinePos = 0;
if (-1 == nIndex || -1 == (nCharPos = LineIndex(nIndex)))
{
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20>߰<EFBFBD>
nLinePos = GetLineCount();
nCharPos = GetWindowTextLength();
SetSel(nCharPos, nCharPos);
}
else
{
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20>߰<EFBFBD>
SetSel(nCharPos, nCharPos);
nLinePos = LineFromChar(nCharPos);
}
Paste();
LineScroll(nLinePos);
}
}
}

29
Tools/PatchSFX/LogEdit.h Normal file
View File

@@ -0,0 +1,29 @@
#pragma once
// CLogEdit
class CLogEdit : public CEdit
{
DECLARE_DYNAMIC(CLogEdit)
public:
CLogEdit();
virtual ~CLogEdit();
protected:
DECLARE_MESSAGE_MAP()
public:
void AddLine(LPCTSTR szLine, int nIndex = -1, bool bNewLine = true);
void Clear() { SetWindowText(""); }
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
protected:
CString m_szTempLine;
};

View File

@@ -0,0 +1,73 @@
// PatchSFX.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "PatchSFX.h"
#include "PatchSFXDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CPatchSFXApp
BEGIN_MESSAGE_MAP(CPatchSFXApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CPatchSFXApp construction
CPatchSFXApp::CPatchSFXApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
// The one and only CPatchSFXApp object
CPatchSFXApp theApp;
// CPatchSFXApp initialization
BOOL CPatchSFXApp::InitInstance()
{
// InitCommonControls() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
InitCommonControls();
CWinApp::InitInstance();
AfxEnableControlContainer();
// 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
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
CPatchSFXDlg dlg;
m_pMainWnd = &dlg;
INT_PTR 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;
}

31
Tools/PatchSFX/PatchSFX.h Normal file
View File

@@ -0,0 +1,31 @@
// PatchSFX.h : main header file for the PROJECT_NAME application
//
#pragma once
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
// CPatchSFXApp:
// See PatchSFX.cpp for the implementation of this class
//
class CPatchSFXApp : public CWinApp
{
public:
CPatchSFXApp();
// Overrides
public:
virtual BOOL InitInstance();
// Implementation
DECLARE_MESSAGE_MAP()
};
extern CPatchSFXApp theApp;

222
Tools/PatchSFX/PatchSFX.rc Normal file
View File

@@ -0,0 +1,222 @@
// 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
/////////////////////////////////////////////////////////////////////////////
// <20>ѱ<EFBFBD><D1B1><EFBFBD> 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_ENU)\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#include ""res\\PatchSFX.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""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\\PatchSFX.ico"
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// <20><><EFBFBD><EFBFBD>(<28>̱<EFBFBD>) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "About PatchSFX"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
LTEXT "PatchSFX Version 1.1",IDC_STATIC,40,10,119,8,
SS_NOPREFIX
LTEXT "Copyright (C) 2008 Youxiland",IDC_STATIC,40,25,119,8
DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP
END
IDD_PATCHSFX_DIALOG DIALOGEX 0, 0, 474, 154
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP |
WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "ROW Patch"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
PUSHBUTTON "Patch Now!",IDC_BTN_PATCH_NOW,362,131,50,16
PUSHBUTTON "Cancel",IDCANCEL,417,131,50,16
EDITTEXT IDC_EXTRACT_POS,7,7,404,14,ES_AUTOHSCROLL | ES_READONLY
PUSHBUTTON "Extract To..",IDC_BTN_EXTRACT_TO,417,7,50,14
EDITTEXT IDC_CONSOLE,7,68,460,59,ES_MULTILINE | ES_AUTOHSCROLL |
WS_VSCROLL
CONTROL "",IDC_EXTRACT_PROGRESS,"msctls_progress32",WS_BORDER |
0x1,7,49,460,14
RTEXT "0/0",IDC_PROGRESS_FILE,216,36,248,8
LTEXT "",IDC_CURRENT_EXTRACT,12,26,448,8
PUSHBUTTON "Patch from PatchList (Advanced user Only!)",
IDC_BTN_PATCH_LIST,7,133,150,14
PUSHBUTTON "D o n e !",IDC_PATCH_DONE,362,131,105,16,NOT WS_VISIBLE
END
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,2
PRODUCTVERSION 1,0,0,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Youxiland Co. Ltd."
VALUE "FileDescription", "Manual Patch SFX file"
VALUE "FileVersion", "1, 0, 0, 2"
VALUE "InternalName", "PatchSFX.exe"
VALUE "LegalCopyright", "Copyright (C) 2004 Youxiland Co. Ltd. All rights reserved."
VALUE "OriginalFilename", "PatchSFX.exe"
VALUE "ProductName", "ROW Patch"
VALUE "ProductVersion", "1, 0, 0, 2"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
END
IDD_PATCHSFX_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 467
TOPMARGIN, 7
BOTTOMMARGIN, 147
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_ABOUTBOX "&About PatchSFX..."
END
#endif // <20><><EFBFBD><EFBFBD>(<28>̱<EFBFBD>) 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_ENU)
LANGUAGE 9, 1
#pragma code_page(1252)
#include "res\PatchSFX.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,205 @@
<?xml version="1.0" encoding="ks_c_5601-1987"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="PatchSFX"
ProjectGUID="{B86B2447-1DE2-4953-9474-9A6472FDABCC}"
SccProjectName=""
SccLocalPath=""
Keyword="MFCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
UseOfMFC="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../ZipArchive/Include"
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
TreatWChar_tAsBuiltInType="TRUE"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="../ZipArchive/Lib/ZipArchive_MFCSTATIC_d.lib"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="FALSE"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"/>
<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"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="1"
AdditionalIncludeDirectories="../ZipArchive/Include"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
MinimalRebuild="FALSE"
RuntimeLibrary="0"
TreatWChar_tAsBuiltInType="TRUE"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="../ZipArchive/Lib/ZipArchive_MFCSTATIC.lib"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="FALSE"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\LogEdit.cpp">
</File>
<File
RelativePath=".\PatchSFX.cpp">
</File>
<File
RelativePath=".\PatchSFXDlg.cpp">
</File>
<File
RelativePath=".\stdafx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\LogEdit.h">
</File>
<File
RelativePath=".\PatchSFX.h">
</File>
<File
RelativePath=".\PatchSFXDlg.h">
</File>
<File
RelativePath=".\Resource.h">
</File>
<File
RelativePath=".\stdafx.h">
</File>
</Filter>
<Filter
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
RelativePath=".\res\PatchSFX.ico">
</File>
<File
RelativePath=".\PatchSFX.rc">
</File>
<File
RelativePath=".\res\PatchSFX.rc2">
</File>
</Filter>
<File
RelativePath=".\res\PatchSFX.manifest">
</File>
<File
RelativePath=".\ReadMe.txt">
</File>
</Files>
<Globals>
<Global
Name="RESOURCE_FILE"
Value="PatchSFX.rc"/>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,156 @@
<?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>{B86B2447-1DE2-4953-9474-9A6472FDABCC}</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'">true</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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>../ZipArchive/Lib/ZipArchive_MFCSTATIC_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>../ZipArchive/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>../ZipArchive/Lib/ZipArchive_MFCSTATIC.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="LogEdit.cpp" />
<ClCompile Include="PatchSFX.cpp" />
<ClCompile Include="PatchSFXDlg.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="LogEdit.h" />
<ClInclude Include="PatchSFX.h" />
<ClInclude Include="PatchSFXDlg.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<None Include="res\PatchSFX.ico" />
<None Include="res\PatchSFX.rc2" />
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PatchSFX.rc" />
</ItemGroup>
<ItemGroup>
<Manifest Include="res\PatchSFX.manifest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties RESOURCE_FILE="PatchSFX.rc" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="소스 파일">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="헤더 파일">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="리소스 파일">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="LogEdit.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="PatchSFX.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="PatchSFXDlg.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="LogEdit.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="PatchSFX.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="PatchSFXDlg.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>헤더 파일</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="res\PatchSFX.ico">
<Filter>리소스 파일</Filter>
</None>
<None Include="res\PatchSFX.rc2">
<Filter>리소스 파일</Filter>
</None>
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PatchSFX.rc">
<Filter>리소스 파일</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="res\PatchSFX.manifest" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,750 @@
// PatchSFXDlg.cpp : implementation file
//
#include "stdafx.h"
#include "PatchSFX.h"
#include "PatchSFXDlg.h"
#include "ZipArchive.h"
#include "ZipStorage.h"
#include "atlenc.h"
#include <process.h>
#include ".\patchsfxdlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CPatchSFXDlg dialog
UINT IID_PROGRESS_EXTRACT_SFXFILES = 1;
UINT PROGRESS_UPDATE_TIME = 200;
void GetCurrentFolderName(CString& szCurrentFolderName)
{
TCHAR szFullPathName[MAX_PATH * 2];
GetModuleFileName(NULL, szFullPathName, MAX_PATH * 2 - 1);
szFullPathName[MAX_PATH * 2 - 1] = 0;
TCHAR szDrive[MAX_PATH];
TCHAR szDirectory[MAX_PATH];
_tsplitpath(szFullPathName, szDrive, szDirectory, 0, 0);
szCurrentFolderName.Format("%s%s", szDrive, szDirectory);
}
CPatchSFXDlg::CPatchSFXDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPatchSFXDlg::IDD, pParent)
, m_szFileProgress(_T("0/0"))
, m_szPatchFileName(_T(""))
, m_szInstalledPathKey(_T(""))
, m_szRegKeyValue(_T(""))
, m_dwTotalFileSize(0LL)
, m_dwMinver(0L)
, m_dwMaxver(0L)
, m_nTotalFileNum(0)
, m_hExtractThread(0)
, m_nExtractThreadID(0)
, m_szCurrentExtract(_T(""))
{
m_SharedData.InitSharedData();
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CPatchSFXDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EXTRACT_POS, m_edExtractPos);
DDX_Control(pDX, IDC_EXTRACT_PROGRESS, m_prgExtract);
DDX_Control(pDX, IDC_BTN_PATCH_NOW, m_btnPatchNow);
DDX_Control(pDX, IDC_BTN_PATCH_LIST, m_btnPatchAdvanced);
DDX_Control(pDX, IDC_CONSOLE, m_edLog);
DDX_Text(pDX, IDC_PROGRESS_FILE, m_szFileProgress);
DDX_Text(pDX, IDC_CURRENT_EXTRACT, m_szCurrentExtract);
DDX_Control(pDX, IDC_BTN_EXTRACT_TO, m_btnExtractPos);
DDX_Control(pDX, IDC_PATCH_DONE, m_btnPatchDone);
DDX_Control(pDX, IDCANCEL, m_btnPatchCancel);
}
BEGIN_MESSAGE_MAP(CPatchSFXDlg, CDialog)
ON_WM_PAINT()
ON_WM_TIMER()
ON_WM_CLOSE()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BTN_EXTRACT_TO, OnBnClickedBtnExtractTo)
ON_BN_CLICKED(IDC_BTN_PATCH_NOW, OnBnClickedBtnPatchNow)
ON_BN_CLICKED(IDC_BTN_PATCH_LIST, OnBnClickedBtnPatchList)
ON_BN_CLICKED(IDC_PATCH_DONE, OnBnClickedPatchDone)
END_MESSAGE_MAP()
// CPatchSFXDlg message handlers
BOOL CPatchSFXDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// 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
m_edLog.SetLimitText(UINT_MAX);
// <20>ڱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>о, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>.
CZipArchive zipFile;
CString szError;
TCHAR szBuff[MAX_PATH * 2];
if (!GetModuleFileName(NULL, szBuff, MAX_PATH * 2))
{
szError.Format(_T("Unable to find patch file : code(%d)"), GetLastError());
MessageBox(szError, _T("Patch error"), MB_OK | MB_ICONERROR);
PostQuitMessage(0);
}
else
{
szBuff[MAX_PATH * 2 - 1] = (TCHAR)0;
m_szPatchFileName.SetString(szBuff);
}
TRY
{
zipFile.Open(m_szPatchFileName, CZipArchive::zipOpenReadOnly);
CZipString szComment = zipFile.GetGlobalComment();
m_nTotalFileNum = zipFile.GetCount(true);
zipFile.Close();
int nDecodeBufferLen = Base64DecodeGetRequiredLength(szComment.GetLength());
int nDecodedDataLen = nDecodeBufferLen;
LPBYTE lpData = (LPBYTE) malloc(sizeof(BYTE) * nDecodeBufferLen);
if (!Base64Decode(szComment.GetString(), szComment.GetLength(), lpData, &nDecodedDataLen))
{
free(lpData);
szError.Format(_T("Unable to decode patch header : code(%d)"), GetLastError());
MessageBox(szError, _T("Patch error"), MB_OK | MB_ICONERROR);
PostQuitMessage(0);
}
else
{
CMemFile srcData(lpData, nDecodeBufferLen);
srcData.Read(&m_dwTotalFileSize, sizeof(m_dwTotalFileSize));
srcData.Read(&m_dwMinver, sizeof(m_dwMinver));
srcData.Read(&m_dwMaxver, sizeof(m_dwMaxver));
int nInstalledPathLen = 0;
int nValueNameLen = 0;
TCHAR szInstalledPathKey[MAX_PATH];
TCHAR szRegKeyValue[MAX_PATH];
srcData.Read(&nInstalledPathLen, sizeof(nInstalledPathLen));
srcData.Read(&nValueNameLen, sizeof(nValueNameLen));
srcData.Read(szInstalledPathKey, sizeof(TCHAR) * nInstalledPathLen);
m_szInstalledPathKey.SetString(szInstalledPathKey, nInstalledPathLen);
srcData.Read(szRegKeyValue, sizeof(TCHAR) * nValueNameLen);
m_szRegKeyValue.SetString(szRegKeyValue, nValueNameLen);
}
}
CATCH_ALL(e)
{
DWORD dwError = GetLastError();
if (e->IsKindOf(RUNTIME_CLASS(CZipException)))
{
szError.Format(_T("Read Patch Header From Archive Error : code(%d)"), dwError);
}
else
{
szError.Format(_T("Invalid Patch Header : code(%d)"), dwError);
}
MessageBox(szError, _T("Patch error"), MB_OK | MB_ICONERROR);
PostQuitMessage(0);
}
END_CATCH_ALL;
CRegKey regKey;
TCHAR szInstalledBuffer[MAX_PATH * 2];
ULONG nBufferSize = MAX_PATH * 2 - 1;
if (ERROR_SUCCESS == regKey.Open(HKEY_LOCAL_MACHINE, m_szInstalledPathKey, KEY_READ) &&
ERROR_SUCCESS == regKey.QueryStringValue(m_szRegKeyValue, szInstalledBuffer, &nBufferSize))
{
szInstalledBuffer[MAX_PATH * 2 - 1] = (TCHAR)0;
CString szInstalledPath(szInstalledBuffer);
szInstalledPath.Trim();
int nLength = szInstalledPath.GetLength();
if (1 < nLength && szInstalledPath.GetString()[nLength - 1] != _T('\\'))
{
szInstalledPath.Append(_T("\\"));
}
m_edExtractPos.SetWindowText(szInstalledPath);
UpdateData(FALSE);
}
CString szWindowTitle;
/*
if (m_dwMaxver < 1000)
{
szWindowTitle.Format(_T("RYL Part1 Patch (version %d to %d)"),
m_dwMinver + 100, m_dwMaxver + 100);
}
else
{
szWindowTitle.Format(_T("RYL Part2 Patch (version %d to %d)"),
m_dwMinver, m_dwMaxver);
}
*/
szWindowTitle.Format(_T("Return of Warrior Patch (version %d to %d)"),
m_dwMinver, m_dwMaxver);
SetWindowText(szWindowTitle);
return TRUE; // return TRUE unless you set the focus to a control
}
// 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 CPatchSFXDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND,
reinterpret_cast<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 function to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CPatchSFXDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void CPatchSFXDlg::OnBnClickedBtnExtractTo()
{
CString szFolderName;
BROWSEINFO brInfo;
memset(&brInfo, 0, sizeof(BROWSEINFO));
TCHAR szTemp[MAX_PATH * 2];
brInfo.hwndOwner = GetSafeHwnd();
brInfo.pidlRoot = NULL;
brInfo.pszDisplayName = szTemp;
brInfo.lpszTitle = _T("Select patch extract folder");
brInfo.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
LPITEMIDLIST lpItemIDList = SHBrowseForFolder(&brInfo);
if (NULL != lpItemIDList && SHGetPathFromIDList(lpItemIDList, szTemp))
{
szTemp[MAX_PATH * 2 - 1] = (TCHAR)0;
szFolderName.SetString(szTemp);
szFolderName.Trim();
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٿ<EFBFBD> <20>ش<EFBFBD>.
int nLength = szFolderName.GetLength();
if (1 < nLength && _T('\\') != szFolderName.GetString()[nLength - 1])
{
szFolderName.Append(_T("\\"));
}
}
if (!szFolderName.IsEmpty())
{
m_edExtractPos.SetWindowText(szFolderName);
m_btnPatchDone.ShowWindow(SW_HIDE);
m_btnPatchNow.ShowWindow(SW_SHOW);
m_btnPatchCancel.ShowWindow(SW_SHOW);
UpdateData(FALSE);
}
}
struct ExtractWorkerData
{
CPatchSFXDlg* m_lpDlg;
CString m_szExtractPos;
DWORD m_dwMinver;
DWORD m_dwMaxver;
};
unsigned __stdcall CPatchSFXDlg::ExtractWorker(void *pArg)
{
ExtractWorkerData* lpWorkerData =
reinterpret_cast<ExtractWorkerData*>(pArg);
CPatchSFXDlg* lpDlg = lpWorkerData->m_lpDlg;
SharedData sharedData;
TCHAR szFileName[MAX_PATH * 2];
GetModuleFileName(NULL, szFileName, MAX_PATH * 2);
szFileName[MAX_PATH * 2 - 1] = 0;
CZipArchive zipFile;
CZipFileHeader fhInfo;
CString szError;
const int MAX_ERROR_LEN = 256;
TCHAR szErrorMsg[MAX_ERROR_LEN];
bool bFailedExtract = false;
TRY
{
zipFile.Open(szFileName, CZipArchive::zipOpenReadOnly);
int nTotalFileNum = zipFile.GetCount();
zipFile.SetRootPath(lpWorkerData->m_szExtractPos);
for (; !sharedData.m_bStopWorkerThread && sharedData.m_nCurrentFiles < nTotalFileNum;
++sharedData.m_nCurrentFiles)
{
if (!zipFile.GetFileInfo(fhInfo, sharedData.m_nCurrentFiles))
{
szError.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szError.AppendFormat(_T("Get fileinfo failed : index(%d)"),
sharedData.m_nCurrentFiles);
sharedData.m_ProgressList.AddTail(szError);
bFailedExtract = true;
}
else
{
sharedData.m_szCurrentExtract.SetString(
zipFile.PredictExtractedFileName(fhInfo.GetFileName(),
lpWorkerData->m_szExtractPos, true));
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD><D3BC><EFBFBD> Normal<61><6C>
SetFileAttributes(sharedData.m_szCurrentExtract,
FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE);
lpDlg->UpdateProgress(sharedData);
if (!zipFile.ExtractFile(sharedData.m_nCurrentFiles, lpWorkerData->m_szExtractPos))
{
szError.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szError.AppendFormat(_T("Extract file failed! : %s%s"),
lpWorkerData->m_szExtractPos, fhInfo.GetFileName());
sharedData.m_ProgressList.AddTail(szError);
bFailedExtract = true;
}
sharedData.m_nCurrentDataSize += fhInfo.m_uUncomprSize;
}
lpDlg->UpdateProgress(sharedData);
}
szError.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
if (sharedData.m_bStopWorkerThread)
{
szError.AppendFormat(_T("Canceled extract patch."));
}
else if (bFailedExtract)
{
szError.AppendFormat(_T("Failed to extract patch."));
}
else
{
CString szVersionInfoFileName;
CString szCurrentVersion;
szVersionInfoFileName.Format(_T("%sVersionInfo.dat"),
lpWorkerData->m_szExtractPos);
szCurrentVersion.Format(_T("%d"), lpWorkerData->m_dwMaxver);
CStdioFile file;
if (!file.Open(szVersionInfoFileName,
CFile::modeCreate | CFile::modeWrite | CFile::typeText))
{
szError.AppendFormat(_T("Failed to write version info!"));
}
else
{
file.WriteString(szCurrentVersion);
szError.AppendFormat(_T("Patch Complete! : %s"), lpWorkerData->m_szExtractPos);
}
}
sharedData.m_ProgressList.AddTail(szError);
zipFile.Close();
}
CATCH_ALL(e)
{
e->GetErrorMessage(szErrorMsg, MAX_ERROR_LEN - 1);
szErrorMsg[MAX_ERROR_LEN - 1] = 0;
if (e->IsKindOf(RUNTIME_CLASS(CZipException)))
{
szError.Format(_T("Extract failed : zipArchive error! (%s)"), szErrorMsg);
}
else
{
szError.Format(_T("Extract failed : unknown error! (%s)"), szErrorMsg);
}
sharedData.m_ProgressList.AddTail(szError);
}
END_CATCH_ALL;
delete lpWorkerData;
lpDlg->UpdateProgress(sharedData);
return 0;
}
void CPatchSFXDlg::UpdateProgress(SharedData& sharedData)
{
m_csProgress.Lock();
sharedData.m_bStopWorkerThread = m_SharedData.m_bStopWorkerThread;
m_SharedData.m_nCurrentFiles = sharedData.m_nCurrentFiles;
m_SharedData.m_nCurrentDataSize = sharedData.m_nCurrentDataSize;
m_SharedData.m_szCurrentExtract = sharedData.m_szCurrentExtract;
m_SharedData.m_ProgressList.AddTail(&sharedData.m_ProgressList);
m_csProgress.Unlock();
sharedData.m_ProgressList.RemoveAll();
}
afx_msg void CPatchSFXDlg::OnTimer(UINT_PTR nIDEvent)
{
if (nIDEvent == IID_PROGRESS_EXTRACT_SFXFILES)
{
// <20><><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
int nLower = 0;
int nUpper = 0;
m_prgExtract.GetRange(nLower, nUpper);
int nCurrentPos = m_prgExtract.GetPos();
// <20><><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD>
m_csProgress.Lock();
if (nUpper != static_cast<int>(m_dwTotalFileSize))
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
m_prgExtract.SetRange32(0, static_cast<int>(m_dwTotalFileSize));
}
if (nCurrentPos != m_SharedData.m_nCurrentDataSize)
{
// <20><><EFBFBD><EFBFBD> <20><>ġ <20><><EFBFBD><EFBFBD>
m_prgExtract.SetPos(m_SharedData.m_nCurrentDataSize);
}
m_szCurrentExtract.SetString(m_SharedData.m_szCurrentExtract);
m_szFileProgress.Format(_T("%d/%d"),
m_SharedData.m_nCurrentFiles, m_nTotalFileNum);
// <20>α<EFBFBD> <20>޽<EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> ȭ<><20>Ѹ<EFBFBD><D1B8><EFBFBD>.
POSITION pos = m_SharedData.m_ProgressList.GetHeadPosition();
while(0 != pos) { m_edLog.AddLine(m_SharedData.m_ProgressList.GetNext(pos)); }
m_SharedData.m_ProgressList.RemoveAll();
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
m_csProgress.Unlock();
UpdateData(FALSE);
if (WAIT_OBJECT_0 == WaitForSingleObject(m_hExtractThread, 0))
{
StopWorker();
if (!m_PatchFolderList.IsEmpty())
{
m_edExtractPos.SetWindowText(m_PatchFolderList.RemoveHead());
UpdateData(FALSE);
// <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><>ġ<EFBFBD><C4A1> <20>Ѵ<EFBFBD>..
PostMessage(WM_COMMAND, MAKEWPARAM(IDC_BTN_PATCH_NOW, BN_CLICKED));
}
else
{
m_btnPatchDone.ShowWindow(SW_SHOW);
m_btnPatchNow.ShowWindow(SW_HIDE);
m_btnPatchCancel.ShowWindow(SW_HIDE);
}
}
}
}
bool CPatchSFXDlg::CheckExtractPosVersion()
{
// <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> VersionInfo.dat<61><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֳ<EFBFBD> <20><><EFBFBD><20>ڿ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ּҹ<D6BC><D2B9><EFBFBD> / <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ɴ<EFBFBD>.
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD≯<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><> <20><><EFBFBD><EFBFBD><EEBABB>.
UpdateData(TRUE);
CString szError;
CString szVersion;
CString szExtractPos;
CString szVersionInfoFileName;
m_edExtractPos.GetWindowText(szExtractPos);
szVersionInfoFileName.Format(_T("%sVersionInfo.dat"), szExtractPos);
CStdioFile file;
if (file.Open(szVersionInfoFileName, CFile::modeRead | CFile::typeText))
{
file.ReadString(szVersion);
DWORD dwVersion = _ttol(szVersion);
if (dwVersion < m_dwMinver)
{
MessageBox(_T("Current version is too low, try other patch first"),
_T("Patch error"), MB_OK | MB_ICONERROR);
return false;
}
else if (m_dwMaxver < dwVersion &&
IDNO == MessageBox(_T("Current version is higher than this patch version. Overwrite it?"),
_T("Question"), MB_YESNO | MB_ICONEXCLAMATION))
{
return false;
}
}
return true;
}
void CPatchSFXDlg::OnBnClickedBtnPatchNow()
{
// TODO: <20><><EFBFBD><20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
UpdateData(TRUE);
CString szError;
CString szPatchFolder;
bool bFailedAndCleanup = true;
ExtractWorkerData* lpWorkerData = new ExtractWorkerData;
if (0 != lpWorkerData)
{
m_edExtractPos.GetWindowText(szPatchFolder);
lpWorkerData->m_lpDlg = this;
lpWorkerData->m_dwMinver = m_dwMinver;
lpWorkerData->m_dwMaxver = m_dwMaxver;
lpWorkerData->m_szExtractPos.SetString(szPatchFolder);
if (0 != m_hExtractThread)
{
// <20><><EFBFBD><EFBFBD><EFBFBD><20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><>ư<EFBFBD><C6B0> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>þ<EFBFBD><C3BE>ݽô<DDBD>.
}
else if (lpWorkerData->m_szExtractPos.IsEmpty())
{
MessageBox(_T("Invalid Extract Position. Please set extract position"),
_T("Patch Error"), MB_OK | MB_ICONERROR);
PostMessage(WM_COMMAND, MAKEWPARAM(IDC_BTN_EXTRACT_TO, BN_CLICKED));
}
else if (CheckExtractPosVersion())
{
m_hExtractThread = reinterpret_cast<HANDLE>(
_beginthreadex(0, 0, ExtractWorker, lpWorkerData, 0, &m_nExtractThreadID));
if (0 == m_hExtractThread)
{
szError.Format(_T("Create extract thread failed : code(%d)"), GetLastError());
MessageBox(szError, _T("Patch Error"), MB_OK | MB_ICONERROR);
}
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
bFailedAndCleanup = false;
// ȭ<><C8AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> Ÿ<≯Ӹ<CCB8> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
SetTimer(IID_PROGRESS_EXTRACT_SFXFILES, PROGRESS_UPDATE_TIME, NULL);
// <20><>ġ <20><>ư<EFBFBD><C6B0> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
m_btnPatchNow.EnableWindow(FALSE);
m_btnPatchAdvanced.EnableWindow(FALSE);
m_btnExtractPos.EnableWindow(FALSE);
}
}
}
if (bFailedAndCleanup)
{
delete lpWorkerData;
}
}
void CPatchSFXDlg::StopWorker()
{
if (0 != m_hExtractThread)
{
m_csProgress.Lock();
m_SharedData.m_bStopWorkerThread = TRUE;
m_csProgress.Unlock();
WaitForSingleObject(m_hExtractThread, INFINITE);
KillTimer(IID_PROGRESS_EXTRACT_SFXFILES);
// <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD>.
CloseHandle(m_hExtractThread);
m_hExtractThread = 0;
m_nExtractThreadID = 0;
m_SharedData.InitSharedData();
m_btnPatchNow.EnableWindow(TRUE);
m_btnPatchAdvanced.EnableWindow(TRUE);
m_btnExtractPos.EnableWindow(TRUE);
}
}
void CPatchSFXDlg::OnClose()
{
// TODO: <20><><EFBFBD><20>޽<EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20><EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
m_PatchFolderList.RemoveAll();
StopWorker();
CDialog::OnClose();
}
void CPatchSFXDlg::OnBnClickedBtnPatchList()
{
// TODO: <20><><EFBFBD><20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
// <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ã<>Ƽ<EFBFBD> <20>д´<D0B4>.
// <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>д´<D0B4>.
// ù<><C3B9>° <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
// <20><>ġ <20><>ư<EFBFBD><C6B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
CString szLog;
CString szPatchFolder;
CString szFolderListFile;
GetCurrentFolderName(szFolderListFile);
szFolderListFile.AppendFormat(_T("PatchFolders.ini"));
CStdioFile folderList;
if (folderList.Open(szFolderListFile,
CFile::modeCreate | CFile::modeNoTruncate | CFile::modeRead | CFile::shareDenyNone | CFile::typeText))
{
while(folderList.ReadString(szPatchFolder))
{
szPatchFolder.Trim();
szPatchFolder.Replace(_T('/'), _T('\\'));
int nLength = szPatchFolder.GetLength();
if (1 < nLength && szPatchFolder.GetString()[nLength - 1] != _T('\\'))
{
szPatchFolder.Append(_T("\\"));
}
if (INVALID_FILE_ATTRIBUTES != GetFileAttributes(szPatchFolder))
{
m_PatchFolderList.AddTail(szPatchFolder);
}
else
{
szLog.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szLog.AppendFormat(_T("Invalid folder %s : Please write existing folder"),
szPatchFolder);
m_edLog.AddLine(szLog);
}
}
if (!m_PatchFolderList.IsEmpty())
{
POSITION pos = m_PatchFolderList.GetHeadPosition();
while (0 != pos)
{
CString& szReadyPatchFolder = m_PatchFolderList.GetNext(pos);
szLog.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szLog.AppendFormat(_T("Ready to patch %s folder now!"), szReadyPatchFolder);
m_edLog.AddLine(szLog);
}
m_btnPatchDone.ShowWindow(SW_HIDE);
m_btnPatchNow.ShowWindow(SW_SHOW);
m_btnPatchCancel.ShowWindow(SW_SHOW);
m_edExtractPos.SetWindowText(m_PatchFolderList.RemoveHead());
UpdateData(FALSE);
// <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><>ġ<EFBFBD><C4A1> <20>Ѵ<EFBFBD>..
PostMessage(WM_COMMAND, MAKEWPARAM(IDC_BTN_PATCH_NOW, BN_CLICKED));
}
else
{
szLog.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szLog.AppendFormat(_T("There is no folder list in %s file\nPlease edit contents"),
szFolderListFile);
MessageBox(szLog, "Patch Error", MB_OK | MB_ICONEXCLAMATION);
}
}
else
{
szLog.SetString(CTime::GetCurrentTime().Format(_T("[%H:%M:%S]")));
szLog.AppendFormat(_T("Open %s file failed\nPlease edit contents"), szFolderListFile);
MessageBox(szLog, "Patch Error", MB_OK | MB_ICONEXCLAMATION);
}
}
void CPatchSFXDlg::OnBnClickedPatchDone()
{
// TODO: <20><><EFBFBD><20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
PostQuitMessage(0);
}

View File

@@ -0,0 +1,103 @@
// PatchSFXDlg.h : header file
//
#pragma once
#include "afxwin.h"
#include "afxcmn.h"
#include "afxmt.h"
#include "afxtempl.h"
#include "logedit.h"
struct SharedData
{
SharedData() { InitSharedData(); }
void InitSharedData()
{
m_bStopWorkerThread = FALSE;
m_nCurrentFiles = 0;
m_nCurrentDataSize = 0;
m_szCurrentExtract.Empty();
m_ProgressList.RemoveAll();
}
BOOL m_bStopWorkerThread;
int m_nCurrentFiles;
int m_nCurrentDataSize;
CString m_szCurrentExtract;
CList<CString> m_ProgressList;
};
// CPatchSFXDlg dialog
class CPatchSFXDlg : public CDialog
{
// Construction
public:
CPatchSFXDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
enum { IDD = IDD_PATCHSFX_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnBnClickedBtnExtractTo();
afx_msg void OnBnClickedBtnPatchNow();
afx_msg void OnClose();
afx_msg void OnBnClickedBtnPatchList();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
private:
static unsigned __stdcall ExtractWorker(void *pArg);
bool CheckExtractPosVersion();
void UpdateProgress(SharedData& sharedData);
void StopWorker();
CEdit m_edExtractPos;
CLogEdit m_edLog;
CString m_szFileProgress;
CProgressCtrl m_prgExtract;
CButton m_btnExtractPos;
CButton m_btnPatchAdvanced;
CButton m_btnPatchDone;
CButton m_btnPatchNow;
CButton m_btnPatchCancel;
CString m_szPatchFileName;
CString m_szInstalledPathKey;
CString m_szRegKeyValue;
ULONGLONG m_dwTotalFileSize;
DWORD m_dwMinver;
DWORD m_dwMaxver;
int m_nTotalFileNum;
HANDLE m_hExtractThread;
UINT m_nExtractThreadID;
CCriticalSection m_csProgress;
SharedData m_SharedData;
CString m_szCurrentExtract;
CList<CString> m_PatchFolderList;
public:
afx_msg void OnBnClickedPatchDone();
};

90
Tools/PatchSFX/ReadMe.txt Normal file
View File

@@ -0,0 +1,90 @@
================================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : PatchSFX Project Overview
===============================================================================
The application wizard has created this PatchSFX 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 PatchSFX application.
PatchSFX.vcproj
This is the main project file for VC++ projects generated using an application wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
application wizard.
PatchSFX.h
This is the main header file for the application. It includes other
project specific headers (including Resource.h) and declares the
CPatchSFXApp application class.
PatchSFX.cpp
This is the main application source file that contains the application
class CPatchSFXApp.
PatchSFX.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++. Your project resources are in 1033.
res\PatchSFX.ico
This is an icon file, which is used as the application's icon. This
icon is included by the main resource file PatchSFX.rc.
res\PatchSFX.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.
/////////////////////////////////////////////////////////////////////////////
The application wizard creates one dialog class:
PatchSFXDlg.h, PatchSFXDlg.cpp - the dialog
These files contain your CPatchSFXDlg class. This class defines
the behavior of your application's main dialog. The dialog's template is
in PatchSFX.rc, which can be edited in Microsoft Visual C++.
/////////////////////////////////////////////////////////////////////////////
Other Features:
ActiveX Controls
The application includes support to use ActiveX controls.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named PatchSFX.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.
PatchSFX.manifest
Application manifest files are used by Windows XP to describe an applications
dependency on specific versions of Side-by-Side assemblies. The loader uses this
information to load the appropriate assembly from the assembly cache or private
from the application. The Application manifest maybe included for redistribution
as an external .manifest file that is installed in the same folder as the application
executable or it may be included in the executable in the form of a resource.
/////////////////////////////////////////////////////////////////////////////
Other notes:
The application wizard 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 MFC70XXX.DLL from the Microsoft
Visual C++ CD-ROM under the Win\System directory to your computer's system or
system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the
language abbreviation. For example, MFC70DEU.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.
/////////////////////////////////////////////////////////////////////////////

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Microsoft.Windows.PatchSFX"
type="win32"
/>
<description>Your app description here</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View File

@@ -0,0 +1,13 @@
//
// PatchSFX.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...
/////////////////////////////////////////////////////////////////////////////

30
Tools/PatchSFX/resource.h Normal file
View File

@@ -0,0 +1,30 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by PatchSFX.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_PATCHSFX_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_EXTRACT_POS 1000
#define IDC_BTN_EXTRACT_TO 1001
#define IDC_BTN_PATCH_NOW 1002
#define IDC_CONSOLE 1004
#define IDC_EXTRACT_PROGRESS 1005
#define IDC_PROGRESS_FILE 1006
#define IDC_CURRENT_EXTRACT 1007
#define IDC_BTN_PATCH_LIST 1008
#define IDC_BUTTON1 1009
#define IDC_PATCH_DONE 1009
// 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 1010
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,7 @@
// stdafx.cpp : source file that includes just the standard includes
// PatchSFX.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

42
Tools/PatchSFX/stdafx.h Normal file
View File

@@ -0,0 +1,42 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#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