4.50 beta

This commit is contained in:
Igor Pavlov
2007-07-24 00:00:00 +00:00
committed by Kornel Lesiński
parent 7038848692
commit 980e181dcc
104 changed files with 1419 additions and 4952 deletions

View File

@@ -6,9 +6,6 @@
#include "Common/StringConvert.h"
#include "Common/IntToString.h"
#include "../../Common/FileStreams.h"
#include "../../Archive/IArchive.h"
#include "../../IPassword.h"
#include "Windows/PropVariant.h"
#include "Windows/PropVariantConversions.h"
@@ -17,13 +14,24 @@
#include "Windows/FileName.h"
#include "Windows/FileFind.h"
#include "../../Common/FileStreams.h"
#include "../../Archive/IArchive.h"
#include "../../IPassword.h"
#include "../../MyVersion.h"
// {23170F69-40C1-278A-1000-000110070000}
DEFINE_GUID(CLSID_CFormat7z,
0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
using namespace NWindows;
static const char *kCopyrightString = "7-Zip (7za.DLL client example) (c) 1999-2007 Igor Pavlov 2007-03-30\n";
#define kDllName "7z.dll"
static const char *kCopyrightString = MY_7ZIP_VERSION
" (" kDllName " client) "
MY_COPYRIGHT " " MY_DATE;
static const char *kHelpString =
"Usage: Client7z.exe [a | l | x ] archive.7z [fileName ...]\n"
"Examples:\n"
@@ -115,12 +123,12 @@ public:
CArchiveOpenCallback() : PasswordIsDefined(false) {}
};
STDMETHODIMP CArchiveOpenCallback::SetTotal(const UInt64 *files, const UInt64 *bytes)
STDMETHODIMP CArchiveOpenCallback::SetTotal(const UInt64 * /* files */, const UInt64 * /* bytes */)
{
return S_OK;
}
STDMETHODIMP CArchiveOpenCallback::SetCompleted(const UInt64 *files, const UInt64 *bytes)
STDMETHODIMP CArchiveOpenCallback::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */)
{
return S_OK;
}
@@ -211,12 +219,12 @@ void CArchiveExtractCallback::Init(IInArchive *archiveHandler, const UString &di
NFile::NName::NormalizeDirPathPrefix(_directoryPath);
}
STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 size)
STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 /* size */)
{
return S_OK;
}
STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 *completeValue)
STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 * /* completeValue */)
{
return S_OK;
}
@@ -244,6 +252,9 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
_filePath = fullPath;
}
if (askExtractMode != NArchive::NExtract::NAskMode::kExtract)
return S_OK;
{
// Get Attributes
NCOM::CPropVariant propVariant;
@@ -481,23 +492,23 @@ public:
}
};
STDMETHODIMP CArchiveUpdateCallback::SetTotal(UInt64 size)
STDMETHODIMP CArchiveUpdateCallback::SetTotal(UInt64 /* size */)
{
return S_OK;
}
STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const UInt64 *completeValue)
STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const UInt64 * /* completeValue */)
{
return S_OK;
}
STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG **enumerator)
STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG ** /* enumerator */)
{
return E_NOTIMPL;
}
STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 index,
STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 /* index */,
Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive)
{
if(newData != NULL)
@@ -602,7 +613,7 @@ STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream
return S_OK;
}
STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 operationResult)
STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 /* operationResult */)
{
m_NeedBeClosed = true;
return S_OK;
@@ -679,7 +690,7 @@ main(int argc, char* argv[])
return 1;
}
NWindows::NDLL::CLibrary library;
if (!library.Load(TEXT("7za.dll")))
if (!library.Load(TEXT(kDllName)))
{
PrintStringLn("Can not load library");
return 1;
@@ -843,7 +854,7 @@ main(int argc, char* argv[])
extractCallbackSpec->PasswordIsDefined = false;
// extractCallbackSpec->PasswordIsDefined = true;
// extractCallbackSpec->Password = L"1";
archive->Extract(0, (UInt32)(Int32)(-1), false, extractCallback);
archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback);
}
}
return 0;

View File

@@ -36,7 +36,7 @@ OBJS = \
!include "../../../Build.mak"
$(CONSOLE_OBJS): $(*B).cpp
$(COMPL_O1_W3)
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp