#include <C4Update.h>
Public Member Functions | |
bool | Load (C4Group *pGroup) |
bool | Execute (C4Group *pGroup) |
int | Check (C4Group *pGroup) |
bool | MakeUpdate (const char *strFile1, const char *strFile2, const char *strUpdateFile, const char *strName=nullptr) |
void | CompileFunc (StdCompiler *pComp) |
bool | Load (C4Group &hGroup) |
bool | Save (C4Group &hGroup) |
Static Public Member Functions | |
static bool | Optimize (C4Group *pGrpFrom, const char *strTarget) |
Public Attributes | |
int32_t | RequireVersion [4] = { 0, 0, 0, 0 } |
char | Name [C4MaxName+1] = { 0 } |
char | DestPath [_MAX_PATH_LEN] = { 0 } |
int32_t | GrpUpdate = 0 |
int32_t | UpGrpCnt = 0 |
uint32_t | GrpChks1 [C4UP_MaxUpGrpCnt] = { 0 } |
uint32_t | GrpChks2 = 0 |
Protected Member Functions | |
bool | DoUpdate (C4Group *pGrpFrom, class C4GroupEx *pGrpTo, const char *strFileName) |
bool | DoGrpUpdate (C4Group *pUpdateData, class C4GroupEx *pGrpTo) |
bool | MkUp (C4Group *pGrp1, C4Group *pGrp2, C4GroupEx *pUpGr, bool *fModified) |
bool | OpenUnpackParents (C4GroupEx &rGroup, const char *strGroup, const char *strEnsureMaker) |
void | WriteLog (const char *strMsg,...) GNUC_FORMAT_ATTRIBUTE_O |
Static Protected Member Functions | |
static bool | Optimize (C4Group *pGrpFrom, class C4GroupEx *pGrpTo, const char *strFileName) |
Protected Attributes | |
CStdFile | Log |
Definition at line 46 of file C4Update.h.
int C4UpdatePackage::Check | ( | C4Group * | pGroup | ) |
Definition at line 431 of file C4Update.cpp.
References C4UPD_CHK_ALREADY_UPDATED, C4UPD_CHK_BAD_SOURCE, C4UPD_CHK_BAD_VERSION, C4UPD_CHK_NO_SOURCE, C4UPD_CHK_OK, C4Group::Close(), C4UpdatePackageCore::DestPath, GetFileCRC(), C4UpdatePackageCore::GrpChks1, C4UpdatePackageCore::GrpChks2, C4UpdatePackageCore::GrpUpdate, C4Group::IsPacked(), C4Group::Open(), C4UpdatePackageCore::RequireVersion, and C4UpdatePackageCore::UpGrpCnt.
Referenced by C4Group_ApplyUpdate().
|
inherited |
Definition at line 230 of file C4Update.cpp.
References C4UpdatePackageCore::DestPath, C4UpdatePackageCore::GrpChks1, C4UpdatePackageCore::GrpChks2, C4UpdatePackageCore::GrpUpdate, mkNamingAdapt(), C4UpdatePackageCore::Name, C4UpdatePackageCore::RequireVersion, toC4CArr, toC4CArrU, toC4CStr, C4UpdatePackageCore::UpGrpCnt, and StdCompiler::Value().
Definition at line 527 of file C4Update.cpp.
References _MAX_FNAME, _MAX_FNAME_LEN, C4CFN_UpdateEntries, C4Group::DeleteEntry(), C4Group::FindNextEntry(), C4Group::LoadEntry(), C4Group::ResetSearch(), SAppend(), SAppendChar(), SCopySegment(), SEqual(), C4GroupEx::SetHead(), and C4Group::Sort().
Referenced by DoUpdate(), and Execute().
|
protected |
Definition at line 472 of file C4Update.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4CFN_UpdateCore, C4CFN_UpdateEntries, C4Group_CopyEntry(), C4GroupEx::Close(), DoGrpUpdate(), C4Group::FindNextEntry(), FormatString(), StdStrBuf::getData(), C4Group::GetFullName(), C4UpdatePackageCore::GrpUpdate, C4Group::Move(), C4Group::OpenAsChild(), C4Group::ResetSearch(), C4GroupEx::SaveEntryCore(), SEqual(), C4GroupEx::SetNoSort(), and C4GroupEx::SetSavedEntryCore().
Referenced by Execute().
bool C4UpdatePackage::Execute | ( | C4Group * | pGroup | ) |
Definition at line 303 of file C4Update.cpp.
References _MAX_PATH, C4CFN_UpdateCore, C4CFN_UpdateEntries, C4Group_UnpackDirectory(), C4GroupEx::Close(), CStdFile::Close(), CStdFile::Create(), CreatePath(), C4UpdatePackageCore::DestPath, DoGrpUpdate(), DoUpdate(), C4Group::FindNextEntry(), StdStrBuf::getData(), GetFileCRC(), C4Group::GetFullName(), C4UpdatePackageCore::GrpChks1, C4UpdatePackageCore::GrpChks2, C4UpdatePackageCore::GrpUpdate, iSize, C4Group::IsPacked(), C4Group::Open(), C4Group::ResetSearch(), SCopy(), SEqual(), SEqual2(), C4UpdatePackageCore::UpGrpCnt, and CStdFile::Write().
Referenced by C4Group_ApplyUpdate().
|
inherited |
Definition at line 241 of file C4Update.cpp.
References C4CFN_UpdateCore, C4Group::LoadEntryString(), and mkNamingAdapt().
Referenced by MakeUpdate().
bool C4UpdatePackage::Load | ( | C4Group * | pGroup | ) |
Definition at line 280 of file C4Update.cpp.
References C4CFN_UpdateCore, DirSep, StdStrBuf::getData(), C4Group::GetFullName(), C4Group::LoadEntryString(), mkNamingAdapt(), StdCompiler::Exception::Msg, C4UpdatePackageCore::Name, and WriteLog().
Referenced by C4Group_ApplyUpdate().
bool C4UpdatePackage::MakeUpdate | ( | const char * | strFile1, |
const char * | strFile2, | ||
const char * | strUpdateFile, | ||
const char * | strName = nullptr |
||
) |
Definition at line 600 of file C4Update.cpp.
References _MAX_PATH, C4MaxName, C4GroupEx::Close(), CStdFile::Close(), CStdFile::Create(), C4UpdatePackageCore::DestPath, EraseItem(), GetFileCRC(), GetFilename(), C4UpdatePackageCore::GrpChks1, C4UpdatePackageCore::GrpChks2, C4UpdatePackageCore::GrpUpdate, C4Group::HasPackedMother(), iSize, C4Group::IsPacked(), C4UpdatePackageCore::Load(), Log, MemScramble(), MkUp(), C4UpdatePackageCore::Name, C4Group::Open(), C4UpdatePackageCore::Save(), SCopy(), sprintf, C4UpdatePackageCore::UpGrpCnt, CStdFile::Write(), and WriteLog().
Referenced by ProcessGroup().
|
protected |
Definition at line 694 of file C4Update.cpp.
References _MAX_FNAME, _MAX_FNAME_LEN, _MAX_PATH, C4Group::Add(), StdStrBuf::AppendChar(), StdStrBuf::AppendFormat(), C4CFN_UpdateEntries, C4Group_CopyEntry(), C4Group_SortList, C4Group_TempPath, C4GroupEx::Close(), C4Group::EntryCount(), C4Group::EntryCRC32(), C4Group::EntrySize(), EraseItem(), C4Group::FindNextEntry(), StdStrBuf::getData(), C4Group::GetFullName(), C4Group::GetName(), MakeTempFilename(), C4Group::Move(), C4Group::Open(), C4Group::OpenAsChild(), C4Group::ResetSearch(), SAppend(), C4GroupEx::SaveEntryCore(), SCopy(), SEqual(), C4GroupEx::SetHead(), C4GroupEx::SetSavedEntryCore(), C4Group::SortByList(), and WriteLog().
Referenced by MakeUpdate().
|
protected |
|
staticprotected |
Definition at line 572 of file C4Update.cpp.
References _MAX_PATH, C4GroupEx::Close(), C4Group::FindNextEntry(), C4GroupEx::HeadIdentical(), C4Group::OpenAsChild(), Optimize(), C4Group::ResetSearch(), C4GroupEx::SaveEntryCore(), C4GroupEx::SetHead(), and C4GroupEx::SetSavedEntryCore().
|
static |
Definition at line 398 of file C4Update.cpp.
References _MAX_PATH, C4CFN_UpdateCore, C4CFN_UpdateEntries, C4GroupEx::Close(), C4Group::FindNextEntry(), C4GroupEx::HeadIdentical(), C4Group::IsPacked(), C4Group::Open(), C4Group::ResetSearch(), SEqual(), and C4GroupEx::SetHead().
Referenced by Optimize().
|
inherited |
Definition at line 260 of file C4Update.cpp.
References C4Group::Add(), C4CFN_UpdateCore, StdStrBuf::getLength(), StdStrBuf::getMData(), and mkNamingAdapt().
Referenced by MakeUpdate().
|
protected |
Definition at line 825 of file C4Update.cpp.
References CStdFile::Flush(), Log, and CStdFile::Write().
Referenced by Load(), MakeUpdate(), and MkUp().
|
inherited |
Definition at line 30 of file C4Update.h.
Referenced by C4Group_ApplyUpdate(), Check(), C4UpdatePackageCore::CompileFunc(), Execute(), and MakeUpdate().
|
inherited |
Definition at line 33 of file C4Update.h.
Referenced by Check(), C4UpdatePackageCore::CompileFunc(), Execute(), and MakeUpdate().
|
inherited |
Definition at line 33 of file C4Update.h.
Referenced by Check(), C4UpdatePackageCore::CompileFunc(), Execute(), and MakeUpdate().
|
inherited |
Definition at line 31 of file C4Update.h.
Referenced by Check(), C4UpdatePackageCore::CompileFunc(), DoUpdate(), Execute(), and MakeUpdate().
|
protected |
Definition at line 65 of file C4Update.h.
Referenced by MakeUpdate(), and WriteLog().
|
inherited |
Definition at line 29 of file C4Update.h.
Referenced by C4Group_ApplyUpdate(), C4UpdatePackageCore::CompileFunc(), Load(), and MakeUpdate().
|
inherited |
Definition at line 28 of file C4Update.h.
Referenced by C4Group_ApplyUpdate(), Check(), and C4UpdatePackageCore::CompileFunc().
|
inherited |
Definition at line 32 of file C4Update.h.
Referenced by Check(), C4UpdatePackageCore::CompileFunc(), Execute(), and MakeUpdate().