mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-15 02:11:43 -06:00
3.13
This commit is contained in:
287
7zip/Archive/cpio/CpioHandler.cpp
Executable file
287
7zip/Archive/cpio/CpioHandler.cpp
Executable file
@@ -0,0 +1,287 @@
|
||||
// Archive/cpio/Handler.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "CpioHandler.h"
|
||||
|
||||
#include "Common/Defs.h"
|
||||
#include "Common/StringConvert.h"
|
||||
#include "Common/NewHandler.h"
|
||||
#include "Common/ComTry.h"
|
||||
|
||||
#include "Windows/Time.h"
|
||||
#include "Windows/PropVariant.h"
|
||||
|
||||
#include "../../Common/ProgressUtils.h"
|
||||
#include "../../Common//LimitedStreams.h"
|
||||
|
||||
#include "../../Compress/Copy/CopyCoder.h"
|
||||
#include "../Common/ItemNameUtils.h"
|
||||
#include "CpioIn.h"
|
||||
|
||||
using namespace NWindows;
|
||||
using namespace NTime;
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
enum // PropID
|
||||
{
|
||||
kpidinode = kpidUserDefined,
|
||||
kpidiChkSum
|
||||
};
|
||||
|
||||
STATPROPSTG kProperties[] =
|
||||
{
|
||||
{ NULL, kpidPath, VT_BSTR},
|
||||
{ NULL, kpidIsFolder, VT_BOOL},
|
||||
{ NULL, kpidSize, VT_UI8},
|
||||
{ NULL, kpidPackedSize, VT_UI8},
|
||||
{ NULL, kpidLastWriteTime, VT_FILETIME},
|
||||
// { NULL, kpidUser, VT_BSTR},
|
||||
// { NULL, kpidGroup, VT_BSTR},
|
||||
// { L"inode", kpidinode, VT_UI4}
|
||||
// { L"CheckSum", kpidiChkSum, VT_UI4}
|
||||
};
|
||||
|
||||
STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
|
||||
{
|
||||
value->vt = VT_EMPTY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetNumberOfProperties(UINT32 *numProperties)
|
||||
{
|
||||
*numProperties = sizeof(kProperties) / sizeof(kProperties[0]);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetPropertyInfo(UINT32 index,
|
||||
BSTR *name, PROPID *propID, VARTYPE *varType)
|
||||
{
|
||||
if(index >= sizeof(kProperties) / sizeof(kProperties[0]))
|
||||
return E_INVALIDARG;
|
||||
const STATPROPSTG &srcItem = kProperties[index];
|
||||
*propID = srcItem.propid;
|
||||
*varType = srcItem.vt;
|
||||
*name = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UINT32 *numProperties)
|
||||
{
|
||||
*numProperties = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetArchivePropertyInfo(UINT32 index,
|
||||
BSTR *name, PROPID *propID, VARTYPE *varType)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::Open(IInStream *inStream,
|
||||
const UINT64 *maxCheckStartPosition,
|
||||
IArchiveOpenCallback *openArchiveCallback)
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
bool mustBeClosed = true;
|
||||
// try
|
||||
{
|
||||
CInArchive archive;
|
||||
|
||||
if(archive.Open(inStream) != S_OK)
|
||||
return S_FALSE;
|
||||
|
||||
m_Items.Clear();
|
||||
|
||||
if (openArchiveCallback != NULL)
|
||||
{
|
||||
RINOK(openArchiveCallback->SetTotal(NULL, NULL));
|
||||
UINT64 numFiles = m_Items.Size();
|
||||
RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL));
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
CItemEx itemInfo;
|
||||
bool filled;
|
||||
HRESULT result = archive.GetNextItem(filled, itemInfo);
|
||||
if (result == S_FALSE)
|
||||
return S_FALSE;
|
||||
if (result != S_OK)
|
||||
return S_FALSE;
|
||||
if (!filled)
|
||||
break;
|
||||
m_Items.Add(itemInfo);
|
||||
archive.SkeepDataRecords(itemInfo.Size, itemInfo.OldHeader);
|
||||
if (openArchiveCallback != NULL)
|
||||
{
|
||||
UINT64 numFiles = m_Items.Size();
|
||||
RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL));
|
||||
}
|
||||
}
|
||||
if (m_Items.Size() == 0)
|
||||
return S_FALSE;
|
||||
|
||||
m_InStream = inStream;
|
||||
}
|
||||
/*
|
||||
catch(...)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
*/
|
||||
return S_OK;
|
||||
COM_TRY_END
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::Close()
|
||||
{
|
||||
m_InStream.Release();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetNumberOfItems(UINT32 *numItems)
|
||||
{
|
||||
*numItems = m_Items.Size();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::GetProperty(UINT32 index, PROPID propID, PROPVARIANT *value)
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
NWindows::NCOM::CPropVariant propVariant;
|
||||
const CItemEx &item = m_Items[index];
|
||||
|
||||
switch(propID)
|
||||
{
|
||||
case kpidPath:
|
||||
propVariant = (const wchar_t *)NItemName::GetOSName(
|
||||
MultiByteToUnicodeString(item.Name, CP_OEMCP));
|
||||
break;
|
||||
case kpidIsFolder:
|
||||
propVariant = item.IsDirectory();
|
||||
break;
|
||||
case kpidSize:
|
||||
case kpidPackedSize:
|
||||
propVariant = item.Size;
|
||||
break;
|
||||
case kpidLastWriteTime:
|
||||
{
|
||||
FILETIME utcFileTime;
|
||||
if (item.ModificationTime != 0)
|
||||
NTime::UnixTimeToFileTime(item.ModificationTime, utcFileTime);
|
||||
else
|
||||
{
|
||||
utcFileTime.dwLowDateTime = 0;
|
||||
utcFileTime.dwHighDateTime = 0;
|
||||
}
|
||||
propVariant = utcFileTime;
|
||||
break;
|
||||
}
|
||||
case kpidinode:
|
||||
propVariant = item.inode;
|
||||
break;
|
||||
/*
|
||||
case kpidiChkSum:
|
||||
propVariant = item.ChkSum;
|
||||
break;
|
||||
*/
|
||||
}
|
||||
propVariant.Detach(value);
|
||||
return S_OK;
|
||||
COM_TRY_END
|
||||
}
|
||||
|
||||
STDMETHODIMP CHandler::Extract(const UINT32* indices, UINT32 numItems,
|
||||
INT32 _aTestMode, IArchiveExtractCallback *extractCallback)
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
bool allFilesMode = (numItems == UINT32(-1));
|
||||
if (allFilesMode)
|
||||
numItems = m_Items.Size();
|
||||
if(numItems == 0)
|
||||
return S_OK;
|
||||
bool testMode = (_aTestMode != 0);
|
||||
UINT64 totalSize = 0;
|
||||
for(UINT32 i = 0; i < numItems; i++)
|
||||
totalSize += m_Items[allFilesMode ? i : indices[i]].Size;
|
||||
extractCallback->SetTotal(totalSize);
|
||||
|
||||
UINT64 currentTotalSize = 0;
|
||||
UINT64 currentItemSize;
|
||||
|
||||
CMyComPtr<ICompressCoder> copyCoder;
|
||||
|
||||
for(i = 0; i < numItems; i++, currentTotalSize += currentItemSize)
|
||||
{
|
||||
RINOK(extractCallback->SetCompleted(¤tTotalSize));
|
||||
CMyComPtr<ISequentialOutStream> realOutStream;
|
||||
INT32 askMode;
|
||||
askMode = testMode ? NArchive::NExtract::NAskMode::kTest :
|
||||
NArchive::NExtract::NAskMode::kExtract;
|
||||
INT32 index = allFilesMode ? i : indices[i];
|
||||
const CItemEx &itemInfo = m_Items[index];
|
||||
|
||||
RINOK(extractCallback->GetStream(index, &realOutStream, askMode));
|
||||
|
||||
currentItemSize = itemInfo.Size;
|
||||
|
||||
if(itemInfo.IsDirectory())
|
||||
{
|
||||
RINOK(extractCallback->PrepareOperation(askMode));
|
||||
RINOK(extractCallback->SetOperationResult(NArchive::NExtract::NOperationResult::kOK));
|
||||
continue;
|
||||
}
|
||||
if(!testMode && (!realOutStream))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
RINOK(extractCallback->PrepareOperation(askMode));
|
||||
{
|
||||
if (testMode)
|
||||
{
|
||||
RINOK(extractCallback->SetOperationResult(NArchive::NExtract::NOperationResult::kOK));
|
||||
continue;
|
||||
}
|
||||
|
||||
RINOK(m_InStream->Seek(itemInfo.GetDataPosition(), STREAM_SEEK_SET, NULL));
|
||||
CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream;
|
||||
CMyComPtr<ISequentialInStream> inStream(streamSpec);
|
||||
streamSpec->Init(m_InStream, itemInfo.Size);
|
||||
|
||||
CLocalProgress *localProgressSpec = new CLocalProgress;
|
||||
CMyComPtr<ICompressProgressInfo> progress = localProgressSpec;
|
||||
localProgressSpec->Init(extractCallback, false);
|
||||
|
||||
CLocalCompressProgressInfo *localCompressProgressSpec =
|
||||
new CLocalCompressProgressInfo;
|
||||
CMyComPtr<ICompressProgressInfo> compressProgress = localCompressProgressSpec;
|
||||
localCompressProgressSpec->Init(progress,
|
||||
¤tTotalSize, ¤tTotalSize);
|
||||
|
||||
if(copyCoder == NULL)
|
||||
{
|
||||
copyCoder = new NCompress::CCopyCoder;
|
||||
}
|
||||
try
|
||||
{
|
||||
RINOK(copyCoder->Code(inStream, realOutStream,
|
||||
NULL, NULL, compressProgress));
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
realOutStream.Release();
|
||||
RINOK(extractCallback->SetOperationResult(NArchive::NExtract::NOperationResult::kDataError));
|
||||
continue;
|
||||
}
|
||||
realOutStream.Release();
|
||||
RINOK(extractCallback->SetOperationResult(NArchive::NExtract::NOperationResult::kOK));
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
COM_TRY_END
|
||||
}
|
||||
|
||||
}}
|
||||
49
7zip/Archive/cpio/CpioHandler.h
Executable file
49
7zip/Archive/cpio/CpioHandler.h
Executable file
@@ -0,0 +1,49 @@
|
||||
// Archive/cpio/Handler.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_CPIO_HANDLER_H
|
||||
#define __ARCHIVE_CPIO_HANDLER_H
|
||||
|
||||
#include "Common/MyCom.h"
|
||||
#include "../IArchive.h"
|
||||
|
||||
#include "CpioItem.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
class CHandler:
|
||||
public IInArchive,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
public:
|
||||
MY_UNKNOWN_IMP
|
||||
|
||||
STDMETHOD(Open)(IInStream *stream,
|
||||
const UINT64 *maxCheckStartPosition,
|
||||
IArchiveOpenCallback *openArchiveCallback);
|
||||
STDMETHOD(Close)();
|
||||
STDMETHOD(GetNumberOfItems)(UINT32 *numItems);
|
||||
STDMETHOD(GetProperty)(UINT32 index, PROPID propID, PROPVARIANT *value);
|
||||
STDMETHOD(Extract)(const UINT32* indices, UINT32 numItems,
|
||||
INT32 testMode, IArchiveExtractCallback *extractCallback);
|
||||
|
||||
STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value);
|
||||
|
||||
STDMETHOD(GetNumberOfProperties)(UINT32 *numProperties);
|
||||
STDMETHOD(GetPropertyInfo)(UINT32 index,
|
||||
BSTR *name, PROPID *propID, VARTYPE *varType);
|
||||
|
||||
STDMETHOD(GetNumberOfArchiveProperties)(UINT32 *numProperties);
|
||||
STDMETHOD(GetArchivePropertyInfo)(UINT32 index,
|
||||
BSTR *name, PROPID *propID, VARTYPE *varType);
|
||||
|
||||
private:
|
||||
CObjectVector<CItemEx> m_Items;
|
||||
CMyComPtr<IInStream> m_InStream;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
22
7zip/Archive/cpio/CpioHeader.cpp
Executable file
22
7zip/Archive/cpio/CpioHeader.cpp
Executable file
@@ -0,0 +1,22 @@
|
||||
// Archive/cpio/Header.h
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "CpioHeader.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
namespace NFileHeader {
|
||||
|
||||
namespace NMagic
|
||||
{
|
||||
extern const char *kMagic1 = "070701";
|
||||
extern const char *kMagic2 = "070702";
|
||||
extern const char *kEndName = "TRAILER!!!";
|
||||
|
||||
extern unsigned short kMagicForRecord2 = 0x71C7;
|
||||
extern unsigned short kMagicForRecord2BE = 0xC771;
|
||||
}
|
||||
|
||||
}}}
|
||||
|
||||
69
7zip/Archive/cpio/CpioHeader.h
Executable file
69
7zip/Archive/cpio/CpioHeader.h
Executable file
@@ -0,0 +1,69 @@
|
||||
// Archive/cpio/Header.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_CPIO_HEADER_H
|
||||
#define __ARCHIVE_CPIO_HEADER_H
|
||||
|
||||
#include "Common/Types.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
#pragma pack( push, PragmacpioHeaders)
|
||||
#pragma pack( push, 1)
|
||||
|
||||
namespace NFileHeader
|
||||
{
|
||||
namespace NMagic
|
||||
{
|
||||
extern const char *kMagic1;
|
||||
extern const char *kMagic2;
|
||||
extern const char *kEndName;
|
||||
extern unsigned short kMagicForRecord2;
|
||||
extern unsigned short kMagicForRecord2BE;
|
||||
}
|
||||
|
||||
struct CRecord2
|
||||
{
|
||||
unsigned short c_magic;
|
||||
short c_dev;
|
||||
unsigned short c_ino;
|
||||
unsigned short c_mode;
|
||||
unsigned short c_uid;
|
||||
unsigned short c_gid;
|
||||
unsigned short c_nlink;
|
||||
short c_rdev;
|
||||
unsigned short c_mtimes[2];
|
||||
unsigned short c_namesize;
|
||||
unsigned short c_filesizes[2];
|
||||
};
|
||||
|
||||
struct CRecord
|
||||
{
|
||||
char Magic[6]; /* "070701" for "new" portable format, "070702" for CRC format */
|
||||
char inode[8];
|
||||
char Mode[8];
|
||||
char UID[8];
|
||||
char GID[8];
|
||||
char nlink[8];
|
||||
char mtime[8];
|
||||
char Size[8]; /* must be 0 for FIFOs and directories */
|
||||
char DevMajor[8];
|
||||
char DevMinor[8];
|
||||
char RDevMajor[8]; /*only valid for chr and blk special files*/
|
||||
char RDevMinor[8]; /*only valid for chr and blk special files*/
|
||||
char NameSize[8]; /*count includes terminating NUL in pathname*/
|
||||
char ChkSum[8]; /* 0 for "new" portable format; for CRC format the sum of all the bytes in the file */
|
||||
bool CheckMagic()
|
||||
{ return memcmp(Magic, NMagic::kMagic1, 6) == 0 ||
|
||||
memcmp(Magic, NMagic::kMagic2, 6) == 0; };
|
||||
};
|
||||
}
|
||||
|
||||
#pragma pack(pop)
|
||||
#pragma pack(pop, PragmacpioHeaders)
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
167
7zip/Archive/cpio/CpioIn.cpp
Executable file
167
7zip/Archive/cpio/CpioIn.cpp
Executable file
@@ -0,0 +1,167 @@
|
||||
// Archive/cpioIn.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "CpioIn.h"
|
||||
|
||||
#include "Windows/Defs.h"
|
||||
|
||||
#include "CpioHeader.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
HRESULT CInArchive::ReadBytes(void *data, UINT32 size, UINT32 &processedSize)
|
||||
{
|
||||
RINOK(m_Stream->Read(data, size, &processedSize));
|
||||
m_Position += processedSize;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInArchive::Open(IInStream *inStream)
|
||||
{
|
||||
RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &m_Position));
|
||||
m_Stream = inStream;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static bool HexStringToNumber(const char *s, UINT32 &resultValue)
|
||||
{
|
||||
resultValue = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
char c = s[i];
|
||||
int d;
|
||||
if (c >= '0' && c <= '9')
|
||||
d = c - '0';
|
||||
else if (c >= 'A' && c <= 'F')
|
||||
d = 10 + c - 'A';
|
||||
else if (c >= 'a' && c <= 'f')
|
||||
d = 10 + c - 'a';
|
||||
else
|
||||
return false;
|
||||
resultValue *= 0x10;
|
||||
resultValue += d;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#define GetFromHex(x, y) { if (!HexStringToNumber((x), (y))) return E_FAIL; }
|
||||
|
||||
static inline unsigned short ConvertValue(
|
||||
unsigned short value, bool convert)
|
||||
{
|
||||
if (!convert)
|
||||
return value;
|
||||
return (((unsigned short)(value & 0xFF)) << 8) | (value >> 8);
|
||||
}
|
||||
|
||||
HRESULT CInArchive::GetNextItem(bool &filled, CItemEx &item)
|
||||
{
|
||||
union
|
||||
{
|
||||
NFileHeader::CRecord record;
|
||||
NFileHeader::CRecord2 record2;
|
||||
};
|
||||
filled = false;
|
||||
|
||||
UINT32 processedSize;
|
||||
item.HeaderPosition = m_Position;
|
||||
|
||||
RINOK(ReadBytes(&record2, 2, processedSize));
|
||||
if (processedSize != 2)
|
||||
return S_FALSE;
|
||||
|
||||
UINT32 nameSize;
|
||||
|
||||
unsigned short signature = *(unsigned short *)&record;
|
||||
bool oldBE = (signature == NFileHeader::NMagic::kMagicForRecord2BE);
|
||||
|
||||
if (signature == NFileHeader::NMagic::kMagicForRecord2 || oldBE)
|
||||
{
|
||||
RINOK(ReadBytes((BYTE *)(&record2) + 2,
|
||||
sizeof(record2) - 2, processedSize));
|
||||
if (processedSize != sizeof(record2) - 2)
|
||||
return S_FALSE;
|
||||
|
||||
item.inode = ConvertValue(record2.c_ino, oldBE);
|
||||
item.Mode = ConvertValue(record2.c_mode, oldBE);
|
||||
item.UID = ConvertValue(record2.c_uid, oldBE);
|
||||
item.GID = ConvertValue(record2.c_gid, oldBE);
|
||||
item.Size =
|
||||
(UINT32(ConvertValue(record2.c_filesizes[0], oldBE)) << 16)
|
||||
+ ConvertValue(record2.c_filesizes[1], oldBE);
|
||||
item.ModificationTime =
|
||||
(UINT32(ConvertValue(record2.c_mtimes[0], oldBE)) << 16) +
|
||||
ConvertValue(record2.c_mtimes[1], oldBE);
|
||||
item.NumLinks = ConvertValue(record2.c_nlink, oldBE);
|
||||
item.DevMajor = 0;
|
||||
item.DevMinor = ConvertValue(record2.c_dev, oldBE);
|
||||
item.RDevMajor =0;
|
||||
item.RDevMinor = ConvertValue(record2.c_rdev, oldBE);
|
||||
item.ChkSum = 0;
|
||||
nameSize = ConvertValue(record2.c_namesize, oldBE);
|
||||
item.HeaderSize =
|
||||
(((nameSize + sizeof(NFileHeader::CRecord2) - 1) / 2) + 1) * 2; /* 4 byte padding for ("new cpio header" + "filename") */
|
||||
// nameSize + sizeof(NFileHeader::CRecord2);
|
||||
nameSize = item.HeaderSize - sizeof(NFileHeader::CRecord2);
|
||||
item.OldHeader = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RINOK(ReadBytes((BYTE *)(&record) + 2, sizeof(record) - 2, processedSize));
|
||||
if (processedSize != sizeof(record) - 2)
|
||||
return S_FALSE;
|
||||
|
||||
if (!record.CheckMagic())
|
||||
return S_FALSE;
|
||||
|
||||
GetFromHex(record.inode, item.inode);
|
||||
GetFromHex(record.Mode, item.Mode);
|
||||
GetFromHex(record.UID, item.UID);
|
||||
GetFromHex(record.GID, item.GID);
|
||||
GetFromHex(record.nlink, item.NumLinks);
|
||||
GetFromHex(record.mtime, *(UINT32 *)&item.ModificationTime);
|
||||
GetFromHex(record.Size, item.Size);
|
||||
GetFromHex(record.DevMajor, item.DevMajor);
|
||||
GetFromHex(record.DevMinor, item.DevMinor);
|
||||
GetFromHex(record.RDevMajor, item.RDevMajor);
|
||||
GetFromHex(record.RDevMinor, item.RDevMinor);
|
||||
GetFromHex(record.ChkSum, item.ChkSum);
|
||||
GetFromHex(record.NameSize, nameSize)
|
||||
item.HeaderSize =
|
||||
(((nameSize + sizeof(NFileHeader::CRecord) - 1) / 4) + 1) * 4; /* 4 byte padding for ("new cpio header" + "filename") */
|
||||
nameSize = item.HeaderSize - sizeof(NFileHeader::CRecord);
|
||||
item.OldHeader = false;
|
||||
}
|
||||
if (nameSize == 0 || nameSize >= (1 << 27))
|
||||
return E_FAIL;
|
||||
RINOK(ReadBytes(item.Name.GetBuffer(nameSize),
|
||||
nameSize, processedSize));
|
||||
if (processedSize != nameSize)
|
||||
return E_FAIL;
|
||||
item.Name.ReleaseBuffer();
|
||||
if (item.Name == NFileHeader::NMagic::kEndName)
|
||||
return S_OK;
|
||||
filled = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInArchive::Skeep(UINT64 aNumBytes)
|
||||
{
|
||||
UINT64 aNewPostion;
|
||||
RINOK(m_Stream->Seek(aNumBytes, STREAM_SEEK_CUR, &aNewPostion));
|
||||
m_Position += aNumBytes;
|
||||
if (m_Position != aNewPostion)
|
||||
return E_FAIL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CInArchive::SkeepDataRecords(UINT64 aDataSize, bool OldHeader)
|
||||
{
|
||||
if (OldHeader)
|
||||
return Skeep((aDataSize + 1) & 0xFFFFFFFFFFFFFFFE);
|
||||
return Skeep((aDataSize + 3) & 0xFFFFFFFFFFFFFFFC);
|
||||
}
|
||||
|
||||
}}
|
||||
31
7zip/Archive/cpio/CpioIn.h
Executable file
31
7zip/Archive/cpio/CpioIn.h
Executable file
@@ -0,0 +1,31 @@
|
||||
// CpioIn.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_CPIO_IN_H
|
||||
#define __ARCHIVE_CPIO_IN_H
|
||||
|
||||
#include "Common/MyCom.h"
|
||||
#include "../../IStream.h"
|
||||
#include "CpioItem.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
class CInArchive
|
||||
{
|
||||
CMyComPtr<IInStream> m_Stream;
|
||||
|
||||
UINT64 m_Position;
|
||||
|
||||
HRESULT ReadBytes(void *data, UINT32 size, UINT32 &aProcessedSize);
|
||||
public:
|
||||
HRESULT Open(IInStream *inStream);
|
||||
HRESULT GetNextItem(bool &filled, CItemEx &anItemInfo);
|
||||
HRESULT Skeep(UINT64 aNumBytes);
|
||||
HRESULT SkeepDataRecords(UINT64 aDataSize, bool OldHeader);
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
53
7zip/Archive/cpio/CpioItem.h
Executable file
53
7zip/Archive/cpio/CpioItem.h
Executable file
@@ -0,0 +1,53 @@
|
||||
// Archive/cpio/ItemInfo.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_CPIO_ITEMINFO_H
|
||||
#define __ARCHIVE_CPIO_ITEMINFO_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "Common/Types.h"
|
||||
#include "Common/String.h"
|
||||
#include "CpioHeader.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
struct CItem
|
||||
{
|
||||
AString Name;
|
||||
UINT32 inode;
|
||||
UINT32 Mode;
|
||||
UINT32 UID;
|
||||
UINT32 GID;
|
||||
UINT32 Size;
|
||||
time_t ModificationTime;
|
||||
|
||||
// char LinkFlag;
|
||||
// AString LinkName; ?????
|
||||
char Magic[8];
|
||||
UINT32 NumLinks;
|
||||
UINT32 DevMajor;
|
||||
UINT32 DevMinor;
|
||||
UINT32 RDevMajor;
|
||||
UINT32 RDevMinor;
|
||||
UINT32 ChkSum;
|
||||
|
||||
bool OldHeader;
|
||||
|
||||
bool IsDirectory() const
|
||||
{ return (Mode & _S_IFMT) == _S_IFDIR; }
|
||||
};
|
||||
|
||||
class CItemEx: public CItem
|
||||
{
|
||||
public:
|
||||
UINT64 HeaderPosition;
|
||||
UINT32 HeaderSize;
|
||||
UINT64 GetDataPosition() const { return HeaderPosition + HeaderSize; };
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
66
7zip/Archive/cpio/DllExports.cpp
Executable file
66
7zip/Archive/cpio/DllExports.cpp
Executable file
@@ -0,0 +1,66 @@
|
||||
// DLLExports.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#define INITGUID
|
||||
|
||||
#include "Common/ComTry.h"
|
||||
#include "Windows/PropVariant.h"
|
||||
#include "CpioHandler.h"
|
||||
#include "../../ICoder.h"
|
||||
|
||||
// {23170F69-40C1-278A-1000-000110080000}
|
||||
DEFINE_GUID(CLSID_CCpioHandler,
|
||||
0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0x00);
|
||||
|
||||
extern "C"
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
STDAPI CreateObject(
|
||||
const GUID *classID,
|
||||
const GUID *interfaceID,
|
||||
void **outObject)
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
*outObject = 0;
|
||||
if (*classID != CLSID_CCpioHandler)
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
if (*interfaceID != IID_IInArchive)
|
||||
return E_NOINTERFACE;
|
||||
CMyComPtr<IInArchive> inArchive = (IInArchive *)new NArchive::NCpio::CHandler;
|
||||
*outObject = inArchive.Detach();
|
||||
COM_TRY_END
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDAPI GetHandlerProperty(PROPID propID, PROPVARIANT *value)
|
||||
{
|
||||
NWindows::NCOM::CPropVariant propVariant;
|
||||
switch(propID)
|
||||
{
|
||||
case NArchive::kName:
|
||||
propVariant = L"Cpio";
|
||||
break;
|
||||
case NArchive::kClassID:
|
||||
{
|
||||
if ((value->bstrVal = ::SysAllocStringByteLen(
|
||||
(const char *)&CLSID_CCpioHandler, sizeof(GUID))) != 0)
|
||||
value->vt = VT_BSTR;
|
||||
return S_OK;
|
||||
}
|
||||
case NArchive::kExtension:
|
||||
propVariant = L"cpio";
|
||||
break;
|
||||
case NArchive::kUpdate:
|
||||
propVariant = false;
|
||||
break;
|
||||
case NArchive::kKeepName:
|
||||
propVariant = false;
|
||||
break;
|
||||
}
|
||||
propVariant.Detach(value);
|
||||
return S_OK;
|
||||
}
|
||||
3
7zip/Archive/cpio/StdAfx.cpp
Executable file
3
7zip/Archive/cpio/StdAfx.cpp
Executable file
@@ -0,0 +1,3 @@
|
||||
// StdAfx.cpp
|
||||
|
||||
#include "stdafx.h"
|
||||
10
7zip/Archive/cpio/StdAfx.h
Executable file
10
7zip/Archive/cpio/StdAfx.h
Executable file
@@ -0,0 +1,10 @@
|
||||
// stdafx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#endif
|
||||
8
7zip/Archive/cpio/cpio.def
Executable file
8
7zip/Archive/cpio/cpio.def
Executable file
@@ -0,0 +1,8 @@
|
||||
; cpio.def
|
||||
|
||||
LIBRARY cpio.dll
|
||||
|
||||
EXPORTS
|
||||
CreateObject PRIVATE
|
||||
GetHandlerProperty PRIVATE
|
||||
|
||||
241
7zip/Archive/cpio/cpio.dsp
Executable file
241
7zip/Archive/cpio/cpio.dsp
Executable file
@@ -0,0 +1,241 @@
|
||||
# Microsoft Developer Studio Project File - Name="cpio" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=cpio - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cpio.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cpio.mak" CFG="cpio - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cpio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "cpio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "cpio - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPIO_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPIO_EXPORTS" /Yu"StdAfx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||
# ADD RSC /l 0x419 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\Program Files\7-Zip\Formats\cpio.dll" /opt:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "cpio - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPIO_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPIO_EXPORTS" /Yu"StdAfx.h" /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||
# ADD RSC /l 0x419 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"C:\Program Files\7-Zip\Formats\cpio.dll" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "cpio - Win32 Release"
|
||||
# Name "cpio - Win32 Debug"
|
||||
# Begin Group "Spec"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cpio.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cpio.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DllExports.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"StdAfx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\NewHandler.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\NewHandler.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringConvert.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringConvert.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\Vector.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\Vector.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Compress"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Copy\CopyCoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Copy\CopyCoder.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Engine"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioHandler.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioHandler.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioHeader.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioHeader.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioIn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioIn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CpioItem.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Windows"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariant.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariant.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Archive Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Common\ItemNameUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Common\ItemNameUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "7zip Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\LimitedStreams.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\LimitedStreams.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\ProgressUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\ProgressUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
7zip/Archive/cpio/cpio.dsw
Executable file
29
7zip/Archive/cpio/cpio.dsw
Executable file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "cpio"=.\cpio.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
7zip/Archive/cpio/cpio.ico
Executable file
BIN
7zip/Archive/cpio/cpio.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
16
7zip/Archive/cpio/resource.h
Executable file
16
7zip/Archive/cpio/resource.h
Executable file
@@ -0,0 +1,16 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDI_ICON1 101
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
130
7zip/Archive/cpio/resource.rc
Executable file
130
7zip/Archive/cpio/resource.rc
Executable file
@@ -0,0 +1,130 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Russian resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(1251)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // Russian resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON DISCARDABLE "cpio.ico"
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,9,2,0
|
||||
PRODUCTVERSION 3,9,2,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "Igor Pavlov\0"
|
||||
VALUE "FileDescription", "cpio Plugin for 7-Zip\0"
|
||||
VALUE "FileVersion", "3, 9, 2, 0\0"
|
||||
VALUE "InternalName", "cpio\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1999-2003 Igor Pavlov\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "cpio .dll\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "7-Zip\0"
|
||||
VALUE "ProductVersion", "3, 9, 2, 0\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
Reference in New Issue
Block a user